Re: support for SSE2 intrinsics

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: support for SSE2 intrinsics
Date: 2022-08-02 16:53:48
Message-ID: 20220802165348.GA476160@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 02, 2022 at 05:22:52PM +0700, John Naylor wrote:
> Given all this, the anti-climax is: it seems we can start with something
> like src/include/port/simd.h with:
>
> #if (defined(__x86_64__) || defined(_M_AMD64))
> #include <emmintrin.h>
> #define USE_SSE2
> #endif
>
> (plus a comment summarizing the above)
>
> That we can include into other files, and would be the place to put helper
> functions. Thoughts?

+1

I did a bit of cross-checking, and AFAICT this is a reasonable starting
point. emmintrin.h appears to be sufficient for one of my patches that
makes use of SSE2 instructions. That being said, I imagine it'll be
especially important to keep an eye on the buildfarm when this change is
committed.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-08-02 17:12:13 Re: pg15b2: large objects lost on upgrade
Previous Message Tom Lane 2022-08-02 15:38:22 Cutting test runtime for src/test/modules/snapshot_too_old