Re: support for SSE2 intrinsics - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: support for SSE2 intrinsics
Date
Msg-id 20220802165348.GA476160@nathanxps13
Whole thread Raw
In response to support for SSE2 intrinsics  (John Naylor <john.naylor@enterprisedb.com>)
Responses Re: support for SSE2 intrinsics
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Cutting test runtime for src/test/modules/snapshot_too_old
Next
From: Tom Lane
Date:
Subject: Re: pg15b2: large objects lost on upgrade