11 #ifndef MULTI_WRAPPER_IMPLS_ARRAY_HPP_ 12 #define MULTI_WRAPPER_IMPLS_ARRAY_HPP_ 14 #include "../array.hpp" 15 #include "../device.hpp" 16 #include "../event.hpp" 17 #include "../primary_context.hpp" 18 #include "../current_context.hpp" 19 #include "../current_device.hpp" 20 #include "../texture_view.hpp" 26 template <
typename T, dimensionality_t NumDimensions>
31 handle_t handle = detail_::create<T, NumDimensions>(context.handle(), dimensions);
32 return wrap<T, NumDimensions>(context.device_id(), context.handle(), handle, dimensions);
35 template <
typename T, dimensionality_t NumDimensions>
40 auto pc = device.
primary_context(do_not_hold_primary_context_refcount_unit);
41 return create<T, NumDimensions>(pc, dimensions);
59 template <
typename T, dimensionality_t NumDimensions>
65 template <
typename T, dimensionality_t NumDimensions>
74 #endif // MULTI_WRAPPER_IMPLS_ARRAY_HPP_ context_t context() const
Definition: array.hpp:49
Wrapper class for a CUDA context.
Definition: context.hpp:244
Definitions and functionality wrapping CUDA APIs.
Definition: array.hpp:22
Owning wrapper for CUDA 2D and 3D arrays.
Definition: array.hpp:29
array_t< T, NumDimensions > create(const context_t &context, dimensions_t< NumDimensions > dimensions)
Create a new (typed) CUDA array of the specified dimensions.
Definition: array.hpp:27
device::primary_context_t primary_context(bool hold_pc_refcount_unit=false) const
Produce a proxy for the device's primary context - the one used by runtime API calls.
Definition: device.hpp:152
device_t get(id_t id)
Returns a proxy for the CUDA device with a given id.
Definition: device.hpp:837
CUarray handle_t
Raw CUDA driver handle for arrays (of any dimension)
Definition: array.hpp:34
array_t< T, NumDimensions > wrap(device::id_t device_id, context::handle_t context_handle, handle_t handle, dimensions_t< NumDimensions > dimensions) noexcept
Wrap an existing CUDA array in an array_t instance.
Definition: array.hpp:264
device_t device() const
Definition: array.hpp:54
Wrapper class for a CUDA device.
Definition: device.hpp:135
CUDA's array memory-objects are multi-dimensional; but their dimensions, or extents, are not the same as cuda::grid::dimensions_t ; they may be much larger in each axis.
Definition: types.hpp:105