Gromacs
2018.8
|
#include <cstddef>
#include <memory>
#include <vector>
#include "gromacs/utility/alignedallocator.h"
#include "gromacs/utility/exceptions.h"
Declares gmx::HostAllocationPolicy, gmx::HostAllocator, and gmx::HostVector, which are used to make/be standard library containers that can allocate memory suitable for transfers. Currently the only supported transfers using pinned memory are to CUDA GPUs, but other possibilities exist in future.
Classes | |
class | gmx::HostAllocationPolicy |
Policy class for configuring gmx::Allocator, to manage allocations of memory that may be needed for e.g. GPU transfers. More... | |
Typedefs | |
template<class T > | |
using | gmx::HostAllocator = Allocator< T, HostAllocationPolicy > |
Memory allocator that uses HostAllocationPolicy. More... | |
template<class T > | |
using | gmx::HostVector = std::vector< T, HostAllocator< T > > |
Convenience alias for std::vector that uses HostAllocator. | |
Enumerations | |
enum | gmx::PinningPolicy : int { CannotBePinned, CanBePinned } |
Helper enum for pinning policy of the allocation of HostAllocationPolicy. More... | |
Functions | |
template<class T > | |
void | gmx::changePinningPolicy (HostVector< T > *v, PinningPolicy pinningPolicy) |
Helper function for changing the pinning policy of a HostVector. More... | |