TensorWrap shortcuts

group NVCV_CPP_CUDATOOLS_TENSORWRAPS

Specializes TensorWrap template classes to different dimensions.

The specializations have the last dimension as the only compile-time dimension as size of T. All other dimensions have run-time pitch and must be provided.

Template arguments:

  • T data type of each element in TensorWrap

  • StrideType stride type used in the TensorWrap

  • N (optional) number of dimensions

Typedefs

template<typename T, typename StrideType = int64_t>
using Tensor1DWrap = TensorWrapT<T, StrideType, sizeof(T)>
template<typename T, typename StrideType = int64_t>
using Tensor2DWrap = TensorWrapT<T, StrideType, -1, sizeof(T)>
template<typename T, typename StrideType = int64_t>
using Tensor3DWrap = TensorWrapT<T, StrideType, -1, -1, sizeof(T)>
template<typename T, typename StrideType = int64_t>
using Tensor4DWrap = TensorWrapT<T, StrideType, -1, -1, -1, sizeof(T)>
template<typename T, typename StrideType = int64_t>
using Tensor5DWrap = TensorWrapT<T, StrideType, -1, -1, -1, -1, sizeof(T)>
template<typename T, int N, typename StrideType = int64_t>
using TensorNDWrap = std::conditional_t<N == 1, Tensor1DWrap<T, StrideType>, std::conditional_t<N == 2, Tensor2DWrap<T, StrideType>, std::conditional_t<N == 3, Tensor3DWrap<T, StrideType>, std::conditional_t<N == 4, Tensor4DWrap<T, StrideType>, std::conditional_t<N == 5, Tensor5DWrap<T, StrideType>, void>>>>>