Gromacs  2021.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
bootstrap_loadstore.cpp File Reference
#include "gmxpre.h"
#include "config.h"
#include <gtest/gtest.h>
#include "gromacs/simd/simd.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
+ Include dependency graph for bootstrap_loadstore.cpp:

Description

Separate test of SIMD load/store, before we use them in the SIMD test classes.

Simple tests without using any classes/utilities, so we can use load/store functions inside our test utilities after this has passed.

This file tests both the aligned and (if available) unaligned load and store operatations for SimdReal, SimdInt32, and Simd4Real.

Note that you probably do not have to add more tests in this (complicated) file; once the bootstrapping tests have passed we can use the working basic load/store operations to test higher-level load/store operations too.

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

Functions

template<typename T , typename TSimd , int simdWidth>
void gmx::test::anonymous_namespace{bootstrap_loadstore.cpp}::loadStoreTester (TSimd gmx_simdcall loadFn(const T *mem), void gmx_simdcall storeFn(T *mem, TSimd), const int loadOffset, const int storeOffset)
 Generic routine to test load & store of SIMD, and check for side effects. More...
 
template<typename T , typename TSimd >
TSimd gmx_simdcall gmx::test::anonymous_namespace{bootstrap_loadstore.cpp}::loadWrapper (const T *m)
 Wrapper to handle proxy objects returned by some load functions. More...
 
template<typename T , typename TSimd >
TSimd gmx_simdcall gmx::test::anonymous_namespace{bootstrap_loadstore.cpp}::loadUWrapper (const T *m)
 Wrapper to handle proxy objects returned by some loadU functions. More...