pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix broken cast on MSVC
3+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2022-08-30 865424627d  Further code review of port/simd.h
* pgsql: Fix broken cast on MSVC
@ 2022-08-29 10:45 John Naylor <john.naylor@postgresql.org>
  2022-08-30 02:26 ` Re: pgsql: Fix broken cast on MSVC Julien Rouhaud <rjuju123@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: John Naylor @ 2022-08-29 10:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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%40ma...

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(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Fix broken cast on MSVC
  2022-08-29 10:45 pgsql: Fix broken cast on MSVC John Naylor <john.naylor@postgresql.org>
@ 2022-08-30 02:26 ` Julien Rouhaud <rjuju123@gmail.com>
  2022-08-30 02:50   ` Re: pgsql: Fix broken cast on MSVC John Naylor <john.naylor@enterprisedb.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Julien Rouhaud @ 2022-08-30 02:26 UTC (permalink / raw)
  To: John Naylor <john.naylor@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

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.





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Fix broken cast on MSVC
  2022-08-29 10:45 pgsql: Fix broken cast on MSVC John Naylor <john.naylor@postgresql.org>
  2022-08-30 02:26 ` Re: pgsql: Fix broken cast on MSVC Julien Rouhaud <rjuju123@gmail.com>
@ 2022-08-30 02:50   ` John Naylor <john.naylor@enterprisedb.com>
  0 siblings, 0 replies; 3+ messages in thread

From: John Naylor @ 2022-08-30 02:50 UTC (permalink / raw)
  To: Julien Rouhaud <rjuju123@gmail.com>; +Cc: John Naylor <john.naylor@postgresql.org>; pgsql-committers@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2022-08-30 02:50 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29 10:45 pgsql: Fix broken cast on MSVC John Naylor <john.naylor@postgresql.org>
2022-08-30 02:26 ` Julien Rouhaud <rjuju123@gmail.com>
2022-08-30 02:50   ` John Naylor <john.naylor@enterprisedb.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox