Gromacs
2019-beta2
|
#include "config.h"
#include <cstdio>
#include <string>
#include "gromacs/gpu_utils/hostallocator.h"
#include "gromacs/topology/idef.h"
#include "gromacs/utility/arrayref.h"
Declares functions for managing threading of listed forces.
Classes | |
struct | HostInteractionList |
Version of InteractionList that supports pinning. More... | |
struct | GpuBondedLists |
Struct for storing lists of bonded interaction for evaluation on a GPU. More... | |
Typedefs | |
using | HostInteractionLists = std::array< HostInteractionList, F_NRE > |
Convenience alias for set of pinned interaction lists. | |
Functions | |
bool | gmx::buildSupportsGpuBondeds (std::string *error) |
Checks whether the GROMACS build allows to compute bonded interactions on a GPU. More... | |
bool | gmx::inputSupportsGpuBondeds (const t_inputrec &ir, const gmx_mtop_t &mtop, std::string *error) |
Checks whether the input system allows to compute bonded interactions on a GPU. More... | |
void | assign_bondeds_to_gpu (GpuBondedLists *gpuBondedLists, gmx::ArrayRef< const int > nbnxnAtomOrder, const t_idef &idef) |
Copy bonded interactions assigned to the GPU to gpuBondedLists . More... | |
void | setup_bonded_threading (bonded_threading_t *bt, int numAtoms, bool useGpuForBondes, const t_idef &idef) |
Divide the listed interactions over the threads and GPU. More... | |
void | tear_down_bonded_threading (bonded_threading_t *bt) |
Destructor. | |
void | init_bonded_threading (FILE *fplog, int nenergrp, bonded_threading_t **bt_ptr) |
Initialize the bonded threading data structures. More... | |
static bool | bonded_gpu_have_interactions (GpuBondedLists *gpuBondedLists) |
Returns whether there are bonded interactions assigned to the GPU. | |
Variables | |
constexpr int | c_numFtypesOnGpu = 8 |
The number on bonded function types supported on GPUs. | |
constexpr std::array< int, c_numFtypesOnGpu > | ftypesOnGpu |
List of all bonded function types supported on GPUs. More... | |
void assign_bondeds_to_gpu | ( | GpuBondedLists * | gpuBondedLists, |
gmx::ArrayRef< const int > | nbnxnAtomOrder, | ||
const t_idef & | idef | ||
) |
Copy bonded interactions assigned to the GPU to gpuBondedLists
.
Copy bonded interactions assigned to the GPU to gpuBondedLists
.
void init_bonded_threading | ( | FILE * | fplog, |
int | nenergrp, | ||
bonded_threading_t ** | bt_ptr | ||
) |
Initialize the bonded threading data structures.
Allocates and initializes a bonded threading data structure. A pointer to this struct is returned as *bb_ptr
.
void setup_bonded_threading | ( | bonded_threading_t * | bt, |
int | numAtoms, | ||
bool | useGpuForBondes, | ||
const t_idef & | idef | ||
) |
Divide the listed interactions over the threads and GPU.
Uses fr->nthreads for the number of threads, and sets up the thread-force buffer reduction. This should be called each time the bonded setup changes; i.e. at start-up without domain decomposition and at DD.
constexpr std::array<int, c_numFtypesOnGpu> ftypesOnGpu |
List of all bonded function types supported on GPUs.