Gromacs  2016.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes
#include "config.h"
#include <cstddef>
#include <cstdint>
#include "gromacs/utility/classhelpers.h"
#include "gromacs/utility/real.h"
#include "impl_reference/impl_reference.h"
#include "gromacs/simd/scalar/scalar.h"
#include "gromacs/simd/scalar/scalar_math.h"
#include "gromacs/simd/scalar/scalar_util.h"
+ Include dependency graph for simd.h:
+ This graph shows which files directly or indirectly include this file:

Description

Definitions, capabilities, and wrappers for SIMD module.

The macros in this file are intended to be used for writing architecture-independent SIMD intrinsics code. To support a new architecture, adding a new sub-include with macros here should be (nearly) all that is needed.

The defines in this top-level file will set default Gromacs real precision operations to either single or double precision based on whether GMX_DOUBLE is 1. The actual implementation - including e.g. conversion operations specifically between single and double - is documented in impl_reference.h.

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

SIMD data types

The actual storage of these types is implementation dependent. The documentation is generated from the reference implementation, but for normal usage this will likely not be what you are using.

typedef SimdFloat gmx::SimdReal
 Real precision floating-point SIMD datatype. More...
 
typedef SimdFBool gmx::SimdBool
 Boolean SIMD type for usage with SimdReal. More...
 
typedef SimdFInt32 gmx::SimdInt32
 32-bit integer SIMD type. More...
 
typedef SimdFIBool gmx::SimdIBool
 Boolean SIMD type for usage with SimdInt32. More...
 
typedef Simd4Float gmx::Simd4Real
 Real precision floating-point SIMD4 datatype. More...
 
typedef Simd4FBool gmx::Simd4Bool
 Boolean SIMD4 type for usage with SimdReal. More...
 
const int gmx::c_simdBestPairAlignment = c_simdBestPairAlignmentFloat
 

Classes

class  gmx::SimdLoadFProxyInternal
 Proxy object to enable load() for SIMD and float types. More...
 
class  gmx::SimdLoadUFProxyInternal
 Proxy object to enable loadU() for SIMD and float types. More...
 
class  gmx::SimdLoadDProxyInternal
 Proxy object to enable load() for SIMD and double types. More...
 
class  gmx::SimdLoadUDProxyInternal
 Proxy object to enable loadU() for SIMD and double types. More...
 
class  gmx::SimdLoadIProxyInternal
 Proxy object load() for SimdFInt32, SImdDInt32, and int32. More...
 
class  gmx::SimdLoadUIProxyInternal
 Proxy object - loadU() for SimdFInt32, SImdDInt32, and int32. More...
 
class  gmx::SimdSetZeroProxyInternal
 Proxy object to enable setZero() for SIMD and real types. More...
 

Macros

SIMD predefined macros to describe high-level capabilities

These macros are used to describe the features available in default Gromacs real precision. They are set from the lower-level implementation files that have macros describing single and double precision individually, as well as the implementation details.

#define GMX_SIMD_HAVE_REAL   GMX_SIMD_HAVE_FLOAT
 1 if SimdReal is available, otherwise 0. More...
 
#define GMX_SIMD_REAL_WIDTH   GMX_SIMD_FLOAT_WIDTH
 Width of SimdReal. More...
 
#define GMX_SIMD_HAVE_INT32_EXTRACT   GMX_SIMD_HAVE_FINT32_EXTRACT
 1 if support is available for extracting elements from SimdInt32, otherwise 0 More...
 
#define GMX_SIMD_HAVE_INT32_LOGICAL   GMX_SIMD_HAVE_FINT32_LOGICAL
 1 if logical ops are supported on SimdInt32, otherwise 0. More...
 
#define GMX_SIMD_HAVE_INT32_ARITHMETICS   GMX_SIMD_HAVE_FINT32_ARITHMETICS
 1 if arithmetic ops are supported on SimdInt32, otherwise 0. More...
 
#define GMX_SIMD_HAVE_GATHER_LOADU_BYSIMDINT_TRANSPOSE_REAL   GMX_SIMD_HAVE_GATHER_LOADU_BYSIMDINT_TRANSPOSE_FLOAT
 1 if gmx::simdGatherLoadUBySimdIntTranspose is present, otherwise 0 More...
 
#define GMX_SIMD_HAVE_HSIMD_UTIL_REAL   GMX_SIMD_HAVE_HSIMD_UTIL_FLOAT
 1 if real half-register load/store/reduce utils present, otherwise 0 More...
 
#define GMX_SIMD4_HAVE_REAL   GMX_SIMD4_HAVE_FLOAT
 1 if Simd4Real is available, otherwise 0. More...
 

Functions

High-level SIMD proxy objects to disambiguate load/set operations
static const
SimdLoadFProxyInternal
gmx_simdcall 
gmx::load (const float *m)
 Load function that returns proxy object for SimdFloat and float. More...
 
static const
SimdLoadUFProxyInternal
gmx_simdcall 
gmx::loadU (const float *m)
 LoadU function that returns proxy object for SimdFloat and float. More...
 
static const
SimdLoadDProxyInternal
gmx_simdcall 
gmx::load (const double *m)
 Load function that returns proxy object for SimdDouble and double. More...
 
static const
SimdLoadUDProxyInternal
gmx_simdcall 
gmx::loadU (const double *m)
 Load function that returns proxy object for SimdDouble and double. More...
 
static const
SimdLoadIProxyInternal
gmx_simdcall 
gmx::load (const std::int32_t *m)
 Integer load function (proxy object) for SimdFInt32, SImdDInt32, and int32. More...
 
static const
SimdLoadUIProxyInternal
gmx_simdcall 
gmx::loadU (const std::int32_t *m)
 Integer loadU function (proxy object) for SimdFInt32, SImdDInt32, and int32. More...
 
static const
SimdSetZeroProxyInternal
gmx_simdcall 
gmx::setZero ()
 Proxy object to set any SIMD or scalar variable to zero. More...