Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gpu_common.h File Reference
#include "config.h"
#include <string>
#include "cuda/nbnxm_cuda_types.h"
#include "opencl/nbnxm_ocl_types.h"
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/listed_forces/gpubonded.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdtypes/simulation_workload.h"
#include "gromacs/nbnxm/nbnxm.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/timing/gpu_timing.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/stringutil.h"
#include "gpu_common_utils.h"
#include "nbnxm_gpu.h"
+ Include dependency graph for gpu_common.h:
+ This graph shows which files directly or indirectly include this file:

Description

Common functions for the different NBNXN GPU implementations.

Author
Szilard Pall pall..nosp@m.szil.nosp@m.ard@g.nosp@m.mail.nosp@m..com

Functions

static void Nbnxm::validateGpuAtomLocality (const AtomLocality atomLocality)
 Check that atom locality values are valid for the GPU module. More...
 
static InteractionLocality Nbnxm::gpuAtomToInteractionLocality (const AtomLocality atomLocality)
 Convert atom locality to interaction locality. More...
 
void Nbnxm::setupGpuShortRangeWork (gmx_nbnxn_gpu_t *nb, const gmx::GpuBonded *gpuBonded, gmx::InteractionLocality iLocality)
 Set up internal flags that indicate what type of short-range work there is. More...
 
static bool Nbnxm::haveGpuShortRangeWork (const gmx_nbnxn_gpu_t &nb, const gmx::InteractionLocality iLocality)
 Returns true if there is GPU short-range work for the given interaction locality. More...
 
bool Nbnxm::haveGpuShortRangeWork (const gmx_nbnxn_gpu_t *nb, gmx::AtomLocality aLocality)
 Returns true if there is GPU short-range work for the given atom locality. More...
 
template<typename AtomDataT >
static void Nbnxm::getGpuAtomRange (const AtomDataT *atomData, const AtomLocality atomLocality, int *atomRangeBegin, int *atomRangeLen)
 Calculate atom range and return start index and length. More...
 
template<typename GpuTimers >
static void Nbnxm::countPruneKernelTime (GpuTimers *timers, gmx_wallclock_gpu_nbnxn_t *timings, const InteractionLocality iloc)
 Count pruning kernel time if either kernel has been triggered. More...
 
template<typename StagingData >
static void Nbnxm::gpu_reduce_staged_outputs (const StagingData &nbst, const InteractionLocality iLocality, const bool reduceEnergies, const bool reduceFshift, real *e_lj, real *e_el, rvec *fshift)
 Reduce data staged internally in the nbnxn module. More...
 
template<typename GpuTimers , typename GpuPairlist >
static void Nbnxm::gpu_accumulate_timings (gmx_wallclock_gpu_nbnxn_t *timings, GpuTimers *timers, const GpuPairlist *plist, AtomLocality atomLocality, const gmx::StepWorkload &stepWork, bool doTiming)
 Do the per-step timing accounting of the nonbonded tasks. More...
 
bool Nbnxm::gpu_try_finish_task (gmx_nbnxn_gpu_t *nb, const gmx::StepWorkload &stepWork, const AtomLocality aloc, real *e_lj, real *e_el, gmx::ArrayRef< gmx::RVec > shiftForces, GpuTaskCompletion completionKind, gmx_wallcycle *wcycle)
 Attempts to complete nonbonded GPU task. More...
 
float Nbnxm::gpu_wait_finish_task (gmx_nbnxn_gpu_t *nb, const gmx::StepWorkload &stepWork, AtomLocality aloc, real *e_lj, real *e_el, gmx::ArrayRef< gmx::RVec > shiftForces, gmx_wallcycle *wcycle)
 Wait for the asynchronously launched nonbonded tasks and data transfers to finish. More...