0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-26 02:18:53 +02:00

ircd::simd: Add missing support::sse; add alignment constexpr.

This commit is contained in:
Jason Volk 2020-11-12 20:59:00 -08:00
parent 04c398cc0c
commit 00ed83e380
2 changed files with 17 additions and 0 deletions

View file

@ -18,6 +18,15 @@
namespace ircd::simd::support
{
constexpr bool sse
{
#if defined(__SSE__)
true
#else
false
#endif
};
constexpr bool sse2
{
#if defined(__SSE2__)

View file

@ -38,6 +38,14 @@ namespace ircd::simd
extern const u128x1 u128x1_lane_id;
extern const u256x1 u256x1_lane_id;
extern const u512x1 u512x1_lane_id;
constexpr auto alignment
{
support::avx512f? 64:
support::avx? 32:
support::sse? 16:
8
};
}
/// Get number of lanes for vector type (the number after the x in the