On 2/25/20 7:35 PM, Robert Hoo wrote: > @@ -226,10 +263,16 @@ static void init_accel(unsigned cache) > fn = buffer_zero_avx2; > } > #endif > +#ifdef CONFIG_AVX512F_OPT > + if (cache & CACHE_AVX512F) { > + fn = buffer_zero_avx512; > + length_to_accel = 256; > + } > +#endif > buffer_accel = fn; > }
The other cases within init_accel should also set the length. Otherwise, when unit testing, sse2 will also see 256. Recall that unit testing is done in order of > +#define CACHE_AVX512F 1 > +#define CACHE_AVX2 2 > +#define CACHE_SSE4 4 > +#define CACHE_SSE2 8 Otherwise this looks ok. r~