Gromacs
5.1.2
|
#include "config.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/simd/simd.h"
#include "gromacs/utility/fatalerror.h"
This file contains a definition, declaration and inline function for SIMD accelerated PBC calculations.
Functions | |
void | set_pbc_simd (const t_pbc *pbc, pbc_simd_t *pbc_simd) |
Set the SIMD PBC data from a normal t_pbc struct. More... | |
static void gmx_simdcall | pbc_correct_dx_simd (gmx_simd_float_t *dx, gmx_simd_float_t *dy, gmx_simd_float_t *dz, const pbc_simd_t *pbc) |
Correct SIMD distance vector *dx,*dy,*dz for PBC using SIMD. More... | |
|
inlinestatic |
Correct SIMD distance vector *dx,*dy,*dz for PBC using SIMD.
For rectangular boxes all returned distance vectors are the shortest. For triclinic boxes only distances up to half the smallest box diagonal element are guaranteed to be the shortest. This means that distances from 0.5/sqrt(2) times a box vector length (e.g. for a rhombic dodecahedron) can use a more distant periodic image. Note that this routine always does PBC arithmetic, even for dimensions without PBC. But on modern processors the overhead of this, often called, routine should be low. On e.g. Intel Haswell/Broadwell it takes 8 cycles.
void set_pbc_simd | ( | const t_pbc * | pbc, |
pbc_simd_t * | pbc_simd | ||
) |
Set the SIMD PBC data from a normal t_pbc struct.
NULL can be passed for pbc
, then no PBC will be used.