Template Class InterpolationVarShapeWrap< T, B, NVCV_INTERP_NEAREST >
Defined in File InterpolationVarShapeWrap.hpp
Inheritance Relationships
Base Type
public nvcv::cuda::detail::InterpolationVarShapeWrapImpl< T, B, NVCV_INTERP_NEAREST >
(Template Class InterpolationVarShapeWrapImpl)
Class Documentation
-
template<typename T, NVCVBorderType B>
class InterpolationVarShapeWrap<T, B, NVCV_INTERP_NEAREST> : public nvcv::cuda::detail::InterpolationVarShapeWrapImpl<T, B, NVCV_INTERP_NEAREST> Interpolation var-shape wrapper class specialized for NVCV_INTERP_NEAREST.
- Template Parameters:
T – Type (it can be const) of each element inside the border var-shape wrapper.
Public Functions
-
InterpolationVarShapeWrap() = default
-
inline explicit __host__ InterpolationVarShapeWrap(const ImageBatchVarShapeDataStridedCuda &images, ValueType borderValue = {}, float scaleX = {}, float scaleY = {})
Constructs an InterpolationVarShapeWrap by wrapping
images
.- Parameters:
tensor – [in] A TensorDataStridedCuda object to be wrapped.
borderValue – [in] The border value.
scaleX – [in] The scale X value is ignored in non-Area interpolation types.
scaleY – [in] The scale Y value is ignored in non-Area interpolation types.
- template<typename... Args> inline explicit __host__ __device__ InterpolationVarShapeWrap (ImageBatchWrapper imageBatchWrap, ValueType borderValue, float scaleX, float scaleY, Args... tensorShape)
Constructs an InterpolationVarShapeWrap by wrapping an
imageBatchWrap
.- Parameters:
imageBatchWrap – [in] A ImageBatchVarShapeWrap object to be wrapped.
borderValue – [in] The border value.
scaleX – [in] The scale X value is ignored in non-Area interpolation types.
scaleY – [in] The scale Y value is ignored in non-Area interpolation types.
- inline explicit __host__ __device__ InterpolationVarShapeWrap (BorderWrapper borderWrap, float scaleX={}, float scaleY={})
Constructs an InterpolationVarShapeWrap by wrapping a
borderWrap
.- Parameters:
borderWrap – [in] A BorderVarShapeWrap object to be wrapped.
scaleX – [in] The scale X value is ignored in non-Area interpolation types.
scaleY – [in] The scale Y value is ignored in non-Area interpolation types.
- template<typename DimType, class = Require< std::is_same_v<BaseType<DimType>, float> && (NumElements<DimType> == 3 || NumElements<DimType> == 4)>> inline __host__ __device__ ValueType operator[] (DimType c) const
Subscript operator for interpolated value access.
- Parameters:
c – [in] Either 3D (z sample, y row and x column) or 4D coordinate (w sample, z plane, y row and x column) to be accessed with (x, y) interpolation.
- Returns:
Accessed interpolated value.