class buffer_allocation_window
Declaration
template <typename T, int Dims>
class buffer_allocation_window { /* full declaration omitted */ };
Description
In addition to the usual per-item access through the subscript operator, accessors in distributed and collective host tasks can access the underlying memory of the node-local copy of a buffer directly through accessor::get_allocation_window()
. Celerity does not replicate buffers fully on all nodes unless necessary, instead keeping an allocation of a subset that is resized as needed. buffer_allocation_window denotes how indices in the subrange assigned to one node (the window) map to the underlying buffer storage (the allocation). The structure threrefore describes three subranges: The buffer, the allocation, and the window, with the latter being fully contained in the former. Popular third-party APIs, such as HDF5 hyperslabs, can accept parameters from such an explicit description in one or the other form.
Template Parameters
- T
- int Dims
Member Variables
- T* m_allocation
- range<Dims> m_buffer_range
- range<Dims> m_allocation_range
- range<Dims> m_window_range
- id<Dims> m_allocation_offset_in_buffer
- id<Dims> m_window_offset_in_buffer
Member Function Overview
- buffer_allocation_window(T * allocation, const range<Dims> & buffer_range, const range<Dims> & allocation_range, const range<Dims> & window_range, const id<Dims> & allocation_offset_in_buffer, const id<Dims> & window_offset_in_buffer)
- get_allocation() const → T *
- get_allocation_offset_in_buffer() const → id<Dims>
- get_allocation_range() const → range<Dims>
- get_buffer_range() const → range<Dims>
- get_window_offset_in_allocation() const → id<Dims>
- get_window_offset_in_buffer() const → id<Dims>
- get_window_range() const → range<Dims>
Member Functions
¶buffer_allocation_window(
T* allocation,
const range<Dims>& buffer_range,
const range<Dims>& allocation_range,
const range<Dims>& window_range,
const id<Dims>& allocation_offset_in_buffer,
const id<Dims>& window_offset_in_buffer)
buffer_allocation_window(
T* allocation,
const range<Dims>& buffer_range,
const range<Dims>& allocation_range,
const range<Dims>& window_range,
const id<Dims>& allocation_offset_in_buffer,
const id<Dims>& window_offset_in_buffer)
Parameters
- T* allocation
- const range<Dims>& buffer_range
- const range<Dims>& allocation_range
- const range<Dims>& window_range
- const id<Dims>& allocation_offset_in_buffer
- const id<Dims>& window_offset_in_buffer
¶T* get_allocation() const
T* get_allocation() const
¶id<Dims> get_allocation_offset_in_buffer() const
id<Dims> get_allocation_offset_in_buffer() const
¶range<Dims> get_allocation_range() const
range<Dims> get_allocation_range() const
¶range<Dims> get_buffer_range() const
range<Dims> get_buffer_range() const
¶id<Dims> get_window_offset_in_allocation() const
id<Dims> get_window_offset_in_allocation() const
¶id<Dims> get_window_offset_in_buffer() const
id<Dims> get_window_offset_in_buffer() const
¶range<Dims> get_window_range() const
range<Dims> get_window_range() const