Gromacs  2024.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Typedefs | Functions
simd_load_store_functions.h File Reference
#include "config.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/simd/simd.h"
#include "gromacs/utility/real.h"
+ Include dependency graph for simd_load_store_functions.h:
+ This graph shows which files directly or indirectly include this file:

Description

Defines functions to load data to and store data from SIMD registers for the SIMD 4xM and 2xMM kernels.

Author
Berk Hess hess@.nosp@m.kth..nosp@m.se

Typedefs

typedef SimdReal gmx::SimdBitMask
 Define SimdBitMask as a real SIMD register.
 

Functions

template<KernelLayoutClusterRatio clusterRatio>
static int gmx::cjFromCi (const int iCluster)
 Returns the j-cluster index for the given i-cluster index. More...
 
template<KernelLayout kernelLayout>
std::enable_if_t< kernelLayout==KernelLayout::r4xM,
SimdReal > 
gmx::loadIAtomData (const real *ptr, const int offset, const int iRegister)
 Load a single real for an i-atom into iRegister.
 
template<KernelLayout kernelLayout>
std::enable_if_t< kernelLayout==KernelLayout::r2xMM,
SimdReal > 
gmx::loadIAtomData (const real *ptr, const int offset, const int iRegister)
 Load a pair of consecutive reals for two i-atom into the respective halves of iRegister.
 
template<KernelLayout kernelLayout>
std::enable_if_t< kernelLayout==KernelLayout::r4xM,
SimdReal > 
gmx::loadJAtomData (const real *ptr, const int offset)
 Returns a SIMD register containing GMX_SIMD_REAL_WIDTH reals loaded from ptr + offset.
 
template<KernelLayout kernelLayout>
std::enable_if_t< kernelLayout==KernelLayout::r2xMM,
SimdReal > 
gmx::loadJAtomData (const real *ptr, const int offset)
 Returns a SIMD register containing a duplicate sequence of GMX_SIMD_REAL_WIDTH/2 reals loaded from ptr + offset.
 
template<bool loadMasks, KernelLayout kernelLayout>
std::enable_if_t<!loadMasks,
std::array< SimdBool, 0 > > 
gmx::loadSimdPairInteractionMasks (const int excl, SimdBitMask *filterBitMasksV)
 Loads no interaction masks, returns an empty array.
 
template<bool loadMasks, KernelLayout kernelLayout>
std::enable_if_t< loadMasks
&&kernelLayout==KernelLayout::r4xM,
std::array< SimdBool,
c_nbnxnCpuIClusterSize > > 
gmx::loadSimdPairInteractionMasks (const int excl, SimdBitMask *filterBitMasksV)
 Loads interaction masks for a cluster pair for 4xM kernel layout.
 
template<bool loadMasks, KernelLayout kernelLayout>
std::enable_if_t< loadMasks
&&kernelLayout==KernelLayout::r2xMM,
std::array< SimdBool,
c_nbnxnCpuIClusterSize/2 > > 
gmx::loadSimdPairInteractionMasks (const int excl, SimdBitMask *filterBitMasksV)
 Loads interaction masks for a cluster pair for 2xMM kernel layout.
 
template<KernelLayout kernelLayout, std::size_t offsetJJSize>
void gmx::accumulateGroupPairEnergies4xM (SimdReal energies, real *groupPairEnergyBuffersPtr, const std::array< int, offsetJJSize > &offsetJJ)
 Adds energies to temporary energy group pair buffers for the 4xM kernel layout.
 
template<KernelLayout kernelLayout, std::size_t offsetJJSize>
void gmx::accumulateGroupPairEnergies2xMM (SimdReal energies, real *groupPairEnergyBuffersPtr0, real *groupPairEnergyBuffersPtr1, const std::array< int, offsetJJSize > &offsetJJ)
 Adds energies to temporary energy group pair buffers for the 2xMM kernel layout.
 
template<int nR>
int gmx::pairCountWithinCutoff (SimdReal rSquaredV[nR], SimdReal cutoffSquared)
 Return the number of atoms pairs that are within the cut-off distance.