Commit 019efa8 1 parent 3c79e3c commit 019efa8 Copy full SHA for 019efa8
File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ template("base64_gn_build") {
32
32
" HAVE_SSE42=1" ,
33
33
" HAVE_AVX=1" ,
34
34
" HAVE_AVX2=1" ,
35
+ " HAVE_AVX512=1" ,
35
36
]
36
37
}
37
38
if (target_cpu == " arm" ) {
@@ -65,6 +66,7 @@ template("base64_gn_build") {
65
66
" :base64_sse42" ,
66
67
" :base64_avx" ,
67
68
" :base64_avx2" ,
69
+ " :base64_avx512" ,
68
70
" :base64_neon32" ,
69
71
" :base64_neon64" ,
70
72
]
@@ -111,6 +113,7 @@ template("base64_gn_build") {
111
113
}
112
114
}
113
115
}
116
+
114
117
source_set (" base64_avx2" ) {
115
118
configs += [ " :base64_internal_config" ]
116
119
sources = [ " base64/lib/arch/avx2/codec.c" ]
@@ -123,6 +126,21 @@ template("base64_gn_build") {
123
126
}
124
127
}
125
128
129
+ source_set (" base64_avx512" ) {
130
+ configs += [ " :base64_internal_config" ]
131
+ sources = [ " base64/lib/arch/avx512/codec.c" ]
132
+ if (target_cpu == " x86" || target_cpu == " x64" ) {
133
+ if (is_clang || ! is_win ) {
134
+ cflags_c = [
135
+ " -mavx512vl" ,
136
+ " -mavx512vbmi" ,
137
+ ]
138
+ } else if (is_win ) {
139
+ cflags_c = [ " /arch:AVX512" ]
140
+ }
141
+ }
142
+ }
143
+
126
144
source_set (" base64_neon32" ) {
127
145
configs += [ " :base64_internal_config" ]
128
146
sources = [ " base64/lib/arch/neon32/codec.c" ]
You can’t perform that action at this time.
0 commit comments