Gromacs  2022.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
impl_reference_definitions.h File Reference
+ This graph shows which files directly or indirectly include this file:

Description

Reference SIMD implementation, including SIMD documentation.

Author
Erik Lindahl erik..nosp@m.lind.nosp@m.ahl@s.nosp@m.cili.nosp@m.felab.nosp@m..se

Macros

SIMD implementation capability definitions
#define GMX_SIMD   1
 1 if any SIMD support is present, otherwise 0.
 
#define GMX_SIMD_HAVE_FLOAT   1
 1 when SIMD float support is present, otherwise 0 More...
 
#define GMX_SIMD_HAVE_DOUBLE   1
 1 if SIMD double support is present, otherwise 0
 
#define GMX_SIMD_HAVE_LOADU   1
 1 if the SIMD implementation supports unaligned loads, otherwise 0
 
#define GMX_SIMD_HAVE_STOREU   1
 1 if the SIMD implementation supports unaligned stores, otherwise 0
 
#define GMX_SIMD_HAVE_FMA   0
 1 if the SIMD implementation has fused-multiply add hardware More...
 
#define GMX_SIMD_HAVE_LOGICAL   1
 1 if SIMD impl has logical operations on floating-point data, otherwise 0
 
#define GMX_SIMD_HAVE_FINT32_EXTRACT   1
 Support for extracting integers from gmx::SimdFInt32 (1/0 for present/absent)
 
#define GMX_SIMD_HAVE_FINT32_LOGICAL   1
 1 if SIMD logical ops are supported for gmx::SimdFInt32, otherwise 0
 
#define GMX_SIMD_HAVE_FINT32_ARITHMETICS   1
 1 if SIMD arithmetic ops are supported for gmx::SimdFInt32, otherwise 0
 
#define GMX_SIMD_HAVE_DINT32_EXTRACT   1
 Support for extracting integer from gmx::SimdDInt32 (1/0 for present/absent)
 
#define GMX_SIMD_HAVE_DINT32_LOGICAL   1
 1 if logical operations are supported for gmx::SimdDInt32, otherwise 0
 
#define GMX_SIMD_HAVE_DINT32_ARITHMETICS   1
 1 if SIMD arithmetic ops are supported for gmx::SimdDInt32, otherwise 0
 
#define GMX_SIMD_HAVE_NATIVE_COPYSIGN_FLOAT   0
 1 if implementation provides single precision copysign() More...
 
#define GMX_SIMD_HAVE_NATIVE_RSQRT_ITER_FLOAT   0
 1 if implementation provides single precision 1/sqrt(x) N-R iterations faster than simd_math.h More...
 
#define GMX_SIMD_HAVE_NATIVE_RCP_ITER_FLOAT   0
 1 if implementation provides single precision 1/x N-R iterations faster than simd_math.h More...
 
#define GMX_SIMD_HAVE_NATIVE_LOG_FLOAT   0
 1 if implementation provides single precision log() faster than simd_math.h More...
 
#define GMX_SIMD_HAVE_NATIVE_EXP2_FLOAT   0
 1 if implementation provides single precision exp2() faster than simd_math.h More...
 
#define GMX_SIMD_HAVE_NATIVE_EXP_FLOAT   0
 1 if implementation provides single precision exp() faster than simd_math.h More...
 
#define GMX_SIMD_HAVE_NATIVE_COPYSIGN_DOUBLE   0
 1 if implementation provides double precision copysign() More...
 
#define GMX_SIMD_HAVE_NATIVE_RSQRT_ITER_DOUBLE   0
 1 if implementation provides double precision 1/sqrt(x) N-R iterations faster than simd_math.h More...
 
#define GMX_SIMD_HAVE_NATIVE_RCP_ITER_DOUBLE   0
 1 if implementation provides double precision 1/x N-R iterations faster than simd_math.h More...
 
#define GMX_SIMD_HAVE_NATIVE_LOG_DOUBLE   0
 1 if implementation provides double precision log() faster than simd_math.h More...
 
#define GMX_SIMD_HAVE_NATIVE_EXP2_DOUBLE   0
 1 if implementation provides double precision exp2() faster than simd_math.h More...
 
#define GMX_SIMD_HAVE_NATIVE_EXP_DOUBLE   0
 1 if implementation provides double precision exp() faster than simd_math.h More...
 
#define GMX_SIMD_HAVE_GATHER_LOADU_BYSIMDINT_TRANSPOSE_FLOAT   1
 1 if gmx::gatherLoadUBySimdIntTranspose is present, otherwise 0
 
#define GMX_SIMD_HAVE_GATHER_LOADU_BYSIMDINT_TRANSPOSE_DOUBLE   1
 1 if gmx::gatherLoadUBySimdIntTranspose is present, otherwise 0
 
#define GMX_SIMD_HAVE_HSIMD_UTIL_FLOAT   1
 1 if float half-register load/store/reduce utils present, otherwise 0
 
#define GMX_SIMD_HAVE_HSIMD_UTIL_DOUBLE   1
 1 if double half-register load/store/reduce utils present, otherwise 0
 
#define GMX_SIMD_FLOAT_WIDTH   4
 Width of the gmx::SimdFloat datatype.
 
#define GMX_SIMD_DOUBLE_WIDTH   4
 Width of the gmx::SimdDouble datatype.
 
#define GMX_SIMD_HAVE_4NSIMD_UTIL_FLOAT   1
 1 if float 4xN load utils present, otherwise 0
 
#define GMX_SIMD_HAVE_4NSIMD_UTIL_DOUBLE   1
 1 if double 4xN load utils present, otherwise 0
 
#define GMX_SIMD4_HAVE_FLOAT   1
 1 if implementation provides gmx::Simd4Float, otherwise 0.
 
#define GMX_SIMD4_HAVE_DOUBLE   1
 1 if the implementation provides gmx::Simd4Double, otherwise 0.
 
#define GMX_SIMD_FINT32_WIDTH   GMX_SIMD_FLOAT_WIDTH
 Width of the gmx::SimdFInt32 datatype.
 
#define GMX_SIMD_DINT32_WIDTH   GMX_SIMD_DOUBLE_WIDTH
 Width of the gmx::SimdDInt32 datatype.
 
#define GMX_SIMD4_WIDTH   4
 The SIMD4 type is always four units wide, but this makes code more explicit.
 
#define GMX_SIMD_ALIGNMENT   (GMX_SIMD_FLOAT_WIDTH * 4)
 Maximum required alignment in bytes for aligned load/store of multiple values (maximum required for either float or double).
 
#define GMX_SIMD_RSQRT_BITS   23
 Accuracy of SIMD 1/sqrt(x) lookup. Used to determine number of iterations.
 
#define GMX_SIMD_RCP_BITS   23
 Accuracy of SIMD 1/x lookup. Used to determine number of iterations.
 

Macro Definition Documentation

#define GMX_SIMD_HAVE_FLOAT   1

1 when SIMD float support is present, otherwise 0

You should only use this to specifically check for single precision SIMD, support, even when the rest of Gromacs uses double precision.

#define GMX_SIMD_HAVE_FMA   0

1 if the SIMD implementation has fused-multiply add hardware

Note
All the fused multiply-add functions are always available and can be used in any code (by executing separate multiply and add ops), but in a few very tight loops you might be able to save a few instructions with a separate non-FMA code path.
#define GMX_SIMD_HAVE_NATIVE_COPYSIGN_DOUBLE   0

1 if implementation provides double precision copysign()

Only used in simd_math.h to selectively override the generic implementation.

#define GMX_SIMD_HAVE_NATIVE_COPYSIGN_FLOAT   0

1 if implementation provides single precision copysign()

Only used in simd_math.h to selectively override the generic implementation.

#define GMX_SIMD_HAVE_NATIVE_EXP2_DOUBLE   0

1 if implementation provides double precision exp2() faster than simd_math.h

Only used in simd_math.h to selectively override the generic implementation.

#define GMX_SIMD_HAVE_NATIVE_EXP2_FLOAT   0

1 if implementation provides single precision exp2() faster than simd_math.h

Only used in simd_math.h to selectively override the generic implementation.

#define GMX_SIMD_HAVE_NATIVE_EXP_DOUBLE   0

1 if implementation provides double precision exp() faster than simd_math.h

Only used in simd_math.h to selectively override the generic implementation.

#define GMX_SIMD_HAVE_NATIVE_EXP_FLOAT   0

1 if implementation provides single precision exp() faster than simd_math.h

Only used in simd_math.h to selectively override the generic implementation.

#define GMX_SIMD_HAVE_NATIVE_LOG_DOUBLE   0

1 if implementation provides double precision log() faster than simd_math.h

Only used in simd_math.h to selectively override the generic implementation.

#define GMX_SIMD_HAVE_NATIVE_LOG_FLOAT   0

1 if implementation provides single precision log() faster than simd_math.h

Only used in simd_math.h to selectively override the generic implementation.

#define GMX_SIMD_HAVE_NATIVE_RCP_ITER_DOUBLE   0

1 if implementation provides double precision 1/x N-R iterations faster than simd_math.h

Only used in simd_math.h to selectively override the generic implementation.

#define GMX_SIMD_HAVE_NATIVE_RCP_ITER_FLOAT   0

1 if implementation provides single precision 1/x N-R iterations faster than simd_math.h

Only used in simd_math.h to selectively override the generic implementation.

#define GMX_SIMD_HAVE_NATIVE_RSQRT_ITER_DOUBLE   0

1 if implementation provides double precision 1/sqrt(x) N-R iterations faster than simd_math.h

Only used in simd_math.h to selectively override the generic implementation.

#define GMX_SIMD_HAVE_NATIVE_RSQRT_ITER_FLOAT   0

1 if implementation provides single precision 1/sqrt(x) N-R iterations faster than simd_math.h

Only used in simd_math.h to selectively override the generic implementation.