Legion Runtime
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Legion::DeferredBuffer< T, DIM, COORD_T, CHECK_BOUNDS > Class Template Reference

#include <legion.h>

Public Member Functions

 DeferredBuffer (Memory::Kind kind, const Domain &bounds, const T *initial_value=NULL, size_t alignment=16, bool fortran_order_dims=false)
 
 DeferredBuffer (const Rect< DIM, COORD_T > &bounds, Memory::Kind kind, const T *initial_value=NULL, size_t alignment=16, bool fortran_order_dims=false)
 
 DeferredBuffer (Memory memory, const Domain &bounds, const T *initial_value=NULL, size_t alignment=16, bool fortran_order_dims=false)
 
 DeferredBuffer (const Rect< DIM, COORD_T > &bounds, Memory memory, const T *initial_value=NULL, size_t alignment=16, bool fortran_order_dims=false)
 
 DeferredBuffer (Memory::Kind kind, const Domain &bounds, std::array< DimensionKind, DIM > ordering, const T *initial_value=NULL, size_t alignment=16)
 
 DeferredBuffer (const Rect< DIM, COORD_T > &bounds, Memory::Kind kind, std::array< DimensionKind, DIM > ordering, const T *initial_value=NULL, size_t alignment=16)
 
 DeferredBuffer (Memory memory, const Domain &bounds, std::array< DimensionKind, DIM > ordering, const T *initial_value=NULL, size_t alignment=16)
 
 DeferredBuffer (const Rect< DIM, COORD_T > &bounds, Memory memory, std::array< DimensionKind, DIM > ordering, const T *initial_value=NULL, size_t alignment=16)
 
__CUDA_HD__ T read (const Point< DIM, COORD_T > &p) const
 
__CUDA_HD__ void write (const Point< DIM, COORD_T > &p, T value) const
 
__CUDA_HD__ T * ptr (const Point< DIM, COORD_T > &p) const
 
__CUDA_HD__ T * ptr (const Rect< DIM, COORD_T > &r) const
 
__CUDA_HD__ T * ptr (const Rect< DIM, COORD_T > &r, size_t strides[DIM]) const
 
__CUDA_HD__ T & operator[] (const Point< DIM, COORD_T > &p) const
 
void destroy ()
 
Realm::RegionInstance get_instance () const
 

Protected Member Functions

Memory get_memory_from_kind (Memory::Kind kind)
 
void initialize_layout (size_t alignment, bool fortran_order_dims)
 
void initialize (Memory memory, DomainT< DIM, COORD_T > bounds, const T *initial_value)
 

Protected Attributes

Realm::RegionInstance instance
 
Realm::AffineAccessor< T, DIM, COORD_T > accessor
 
std::array< DimensionKind, DIM > ordering
 
size_t alignment
 

Detailed Description

template<typename T, int DIM, typename COORD_T = coord_t, bool CHECK_BOUNDS = false>
class Legion::DeferredBuffer< T, DIM, COORD_T, CHECK_BOUNDS >

A deferred buffer is a local instance that can be made inside of a task that will live just for lifetime of the task without needing to be associated with a logical region. The runtime will automatically reclaim the memory associated with it after the task is done. The task must specify the kind of memory to use and the runtime will pick a specific memory of that kind associated with current processor on which the task is executing. Users can provide an optional initialization value for the buffer. Users must guarantee that no instances of the DeferredBuffer object live past the end of the execution of a task. The user must also guarantee that DefferedBuffer objects are not returned as the result of the task. The user can control the layout of dimensions with the 'fortran_order_dims' parameter. The default is C order dimensions (e.g. last changing fastest), but can be switched to fortran order (e.g. first fastest).


The documentation for this class was generated from the following file: