Обсуждение: pgsql: Fix broken cast on MSVC

Поиск
Список
Период
Сортировка

pgsql: Fix broken cast on MSVC

От
John Naylor
Дата:
Fix broken cast on MSVC

Per buildfarm animal drongo, casting a vector type to the same type
causes a compile error. We still need the cast on ARM64, so invent a
wrapper function that does the casting only where necessary.

Discussion:
https://www.postgresql.org/message-id/CAFBsxsEouaTwbmpqV%2BEW2%3DwFbhw2vHRe26NQTRcd0%3DNaOFDy7A%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c6a43c25a8ba1a825588f7af25a7173f2e66ce8d

Modified Files
--------------
src/include/port/pg_lfind.h |  2 +-
src/include/port/simd.h     | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)


Re: pgsql: Fix broken cast on MSVC

От
Julien Rouhaud
Дата:
Hi,

On Mon, Aug 29, 2022 at 10:45:43AM +0000, John Naylor wrote:
>
> +/*
> + * Exactly like vector32_is_highbit_set except for the input type, so it
> + * looks at each byte separately.
> + *
> + * [...]
> + */
> +#ifndef USE_NO_SIMD
> +static inline bool
> +vector32_is_highbit_set(const Vector32 v)
> [...]

Shouldn't the comment be "Exactly like vector8_is_highbit_set..."?

Also, is there any reason to not have a function prototype for this one?  As
far as I can see that's the only one that doesn't in simd.h.



Re: pgsql: Fix broken cast on MSVC

От
John Naylor
Дата:
On Tue, Aug 30, 2022 at 9:26 AM Julien Rouhaud <rjuju123@gmail.com> wrote:
>
> Shouldn't the comment be "Exactly like vector8_is_highbit_set..."?
>
> Also, is there any reason to not have a function prototype for this one?  As
> far as I can see that's the only one that doesn't in simd.h.

Fixed, thanks!

-- 
John Naylor
EDB: http://www.enterprisedb.com