cuda::experimental::stf::make_slice
#
Overloads#
make_slice(data, extents, strides)
#
-
template<typename ElementType, typename ...Extents, typename ...Strides>
auto cuda::experimental::stf::make_slice( - ElementType *data,
- const ::std::tuple<Extents...> &extents,
- const Strides&... strides,
Returns a
slice
object starting atdata
with the given extents and strides.- Template Parameters:
ElementType – Element type of the slice
Extents – Extents of the slice in each dimension packed in a tuple
Strides – Strides of the slice in each dimension
- Parameters:
data – pointer to the beginning of data
extents – Values for the extents, e.g.
std::tuple{1024, 512}
strides – Values for the strides; fastest-moving one is implicitly 1.
- Returns:
auto
slice<ElementType, sizeof...(Extents)>
make_slice(data, extents)
#
-
template<typename T, typename ...Extents>
auto cuda::experimental::stf::make_slice(
) Returns a contiguous mdspan for a dense multidimensional array.
- Template Parameters:
T – Element type
- Parameters:
data – Pointer to first element of the data
extents – Sizes
- Returns:
auto