mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
SIMD vector length sanity checks
This commit is contained in:
parent
486a01294a
commit
7fe797daf8
@ -747,6 +747,15 @@ typedef Grid_simd<std::complex<float>, SIMD_Ftype> vComplexF;
|
|||||||
typedef Grid_simd<std::complex<double>, SIMD_Dtype> vComplexD;
|
typedef Grid_simd<std::complex<double>, SIMD_Dtype> vComplexD;
|
||||||
typedef Grid_simd<Integer, SIMD_Itype> vInteger;
|
typedef Grid_simd<Integer, SIMD_Itype> vInteger;
|
||||||
|
|
||||||
|
// Check our vector types are of an appropriate size.
|
||||||
|
#if defined QPX
|
||||||
|
static_assert(2*sizeof(SIMD_Ftype) == sizeof(SIMD_Dtype), "SIMD vector lengths incorrect");
|
||||||
|
static_assert(2*sizeof(SIMD_Ftype) == sizeof(SIMD_Itype), "SIMD vector lengths incorrect");
|
||||||
|
#else
|
||||||
|
static_assert(sizeof(SIMD_Ftype) == sizeof(SIMD_Dtype), "SIMD vector lengths incorrect");
|
||||||
|
static_assert(sizeof(SIMD_Ftype) == sizeof(SIMD_Itype), "SIMD vector lengths incorrect");
|
||||||
|
#endif
|
||||||
|
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
// Some traits to recognise the types
|
// Some traits to recognise the types
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user