Template Function nvcv::cuda::CreateBorderWrapNHWC
Defined in File BorderWrap.hpp
Function Documentation
-
template<typename T, NVCVBorderType B, class = Require<HasTypeTraits<T>>>
__host__ auto nvcv::cuda::CreateBorderWrapNHWC(const TensorDataStridedCuda &tensor, T borderValue = {}) Factory function to create an NHWC border wrap given a tensor data.
The output BorderWrap wraps an NHWC 4D tensor allowing to access data per batch (N), per row (H), per column (W) and per channel (C) of the input tensor border aware in rows (or height H) and columns (or width W). The input tensor data must have either NHWC or HWC layout, where the channel C is of type
T
, e.g. T=uchar for each channel of either RGB8 or RGBA8. The active dimensions are H (second) and W (third).See also
- Template Parameters:
T – Type of the values to be accessed in the border wrap.
B – Border extension to be used when accessing H and W, one of NVCVBorderType
- Parameters:
tensor – [in] Reference to the tensor that will be wrapped.
borderValue – [in] Border value to be used when accessing outside elements in constant border type
- Returns:
Border wrap useful to access tensor data border aware in H and W in CUDA kernels.