qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/2] util: add util function buffer_zero_avx512()


From: Richard Henderson
Subject: Re: [PATCH v2 2/2] util: add util function buffer_zero_avx512()
Date: Thu, 27 Feb 2020 05:23:02 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]