mirror of
https://github.com/matrix-construct/construct
synced 2024-09-26 18:38:52 +02:00
ircd::simd: Add missing support::sse; add alignment constexpr.
This commit is contained in:
parent
04c398cc0c
commit
00ed83e380
2 changed files with 17 additions and 0 deletions
|
@ -18,6 +18,15 @@
|
|||
|
||||
namespace ircd::simd::support
|
||||
{
|
||||
constexpr bool sse
|
||||
{
|
||||
#if defined(__SSE__)
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
};
|
||||
|
||||
constexpr bool sse2
|
||||
{
|
||||
#if defined(__SSE2__)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue