cuda::experimental::places::localized_array#

class localized_array#

An allocator that takes a mapping function to dispatch an allocation over multiple data places.

This is the mechanism used to implement the data_place of a grid of execution places. Uses CUDA Virtual Memory Management (VMM) to create a contiguous virtual address range backed by physical allocations on different devices according to the partitioner.

Public Functions

template<typename F>
inline localized_array(
exec_place grid,
partition_fn_t mapper,
F &&delinearize,
size_t total_size,
size_t elemsize,
dim4 data_dims,
size_t probes = localized_placement_default_probes
)#
inline localized_array(
exec_place grid,
const ::std::function<pos4(size_t)> &owner_of,
size_t total_size,
size_t elemsize,
dim4 data_dims,
size_t probes = localized_placement_default_probes
)#

Construct from a generic owner function instead of a raw partition_fn_t mapper (e.g.

a stateful partition object). The owner function maps a linear element index to the grid position owning it and is only used during construction.

localized_array() = delete#
localized_array(const localized_array&) = delete#
localized_array(localized_array&&) = delete#
localized_array &operator=(const localized_array&) = delete#
localized_array &operator=(localized_array&&) = delete#
inline ~localized_array()#
inline void *get_base_ptr() const#
inline const localized_stats &get_stats() const#

Placement statistics of this allocation (see localized_stats)

template<typename ...P>
inline bool operator==(
::cuda::std::tuple<P&...> t
) const#