Gromacs  2018.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions
hostallocator.h File Reference
#include <cstddef>
#include <memory>
#include <vector>
#include "gromacs/utility/alignedallocator.h"
#include "gromacs/utility/exceptions.h"
+ Include dependency graph for hostallocator.h:
+ This graph shows which files directly or indirectly include this file:

Description

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.

Todo:
This should not be in the public API, but it needs to be for the moment because state.h is in that API.
Author
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m

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...