Template Class TensorDataAccessStridedImagePlanarImpl

Inheritance Relationships

Base Type

Class Documentation

template<typename ShapeInfo>
class TensorDataAccessStridedImagePlanarImpl : public nvcv::detail::TensorDataAccessStridedImageImpl<ShapeInfo>

Provides specialized access methods for strided tensor data representing planar images.

This class is an extension of TensorDataAccessStridedImageImpl and offers specific utilities for accessing the data in planar image tensors using a strided memory layout. It provides methods to retrieve the number of planes, compute the stride for the plane dimension, and access specific planes of the image tensor.

Template Parameters:

ShapeInfo – The type that contains shape information for the planar image tensor.

Public Functions

inline TensorDataAccessStridedImagePlanarImpl(const TensorDataStrided &tdata, const ShapeInfo &infoShape)

Constructor that initializes the object with the given tensor data and shape information.

Parameters:
  • tdata – The strided tensor data.

  • infoShape – The shape information of the tensor.

inline int32_t numPlanes() const

Returns the number of planes in the planar image tensor.

Returns:

The number of planes.

inline int64_t planeStride() const

Computes the stride for the plane dimension.

Returns:

The plane stride, or 0 if the plane dimension is not present or is not first.

inline Byte *planeData(int p) const

Retrieves a pointer to the data of a specific plane.

Parameters:

p – The plane index.

Returns:

A pointer to the plane’s data.

inline Byte *planeData(int p, Byte *base) const

Retrieves a pointer to the data of a specific plane, relative to a given base pointer.

Parameters:
  • p – The plane index.

  • base – The base pointer from which to compute the plane’s data address.

Returns:

A pointer to the plane’s data.