cuda::experimental::stf::make_slice

Defined in include/cuda/experimental/__stf/internal/slice.cuh

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 at data 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)>