RPPT Tensor Operations - Data Exchange Operations.

RPPT Tensor Operations - Data Exchange Operations.#

RPP: RPPT Tensor Operations - Data Exchange Operations.
RPPT Tensor Operations - Data Exchange Operations.

RPPT Tensor Operations - Data Exchange Operations. More...

Functions

RppStatus rppt_copy_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, rppHandle_t rppHandle)
 Copy operation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_copy_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, rppHandle_t rppHandle)
 Copy operation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_swap_channels_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, rppHandle_t rppHandle)
 Swap channels operation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_swap_channels_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, rppHandle_t rppHandle)
 Swap channels operation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_color_to_greyscale_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptSubpixelLayout srcSubpixelLayout, rppHandle_t rppHandle)
 Color to greyscale operation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_color_to_greyscale_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptSubpixelLayout srcSubpixelLayout, rppHandle_t rppHandle)
 Color to greyscale operation on HIP backend for a NCHW/NHWC layout tensor. More...
 

Detailed Description

RPPT Tensor Operations - Data Exchange Operations.

Function Documentation

◆ rppt_color_to_greyscale_gpu()

RppStatus rppt_color_to_greyscale_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
RpptSubpixelLayout  srcSubpixelLayout,
rppHandle_t  rppHandle 
)

Color to greyscale operation on HIP backend for a NCHW/NHWC layout tensor.

The color to greyscale operation runs for a batch of RGB(3 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).
  • dstPtr depth ranges - Will be same depth as srcPtr.
    Sample Input
    Sample Output
    Parameters
    [in]srcPtrsource tensor in HIP memory
    [in]srcDescPtrsource tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 3)
    [out]dstPtrdestination tensor in HIP memory
    [in]dstDescPtrdestination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)
    [in]srcSubpixelLayoutA RpptSubpixelLayout type enum to specify source subpixel layout (RGBtype or BGRtype)
    [in]rppHandleRPP HIP handle created with rppCreateWithStreamAndBatchSize()
    Returns
    A RppStatus enumeration.
    Return values
    RPP_SUCCESSSuccessful completion.
    RPP_ERROR*Unsuccessful completion.

◆ rppt_color_to_greyscale_host()

RppStatus rppt_color_to_greyscale_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
RpptSubpixelLayout  srcSubpixelLayout,
rppHandle_t  rppHandle 
)

Color to greyscale operation on HOST backend for a NCHW/NHWC layout tensor.

The color to greyscale operation runs for a batch of RGB(3 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).
  • dstPtr depth ranges - Will be same depth as srcPtr.
    Sample Input
    Sample Output
    Parameters
    [in]srcPtrsource tensor in HOST memory
    [in]srcDescPtrsource tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 3)
    [out]dstPtrdestination tensor in HOST memory
    [in]dstDescPtrdestination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)
    [in]srcSubpixelLayoutA RpptSubpixelLayout type enum to specify source subpixel layout (RGBtype or BGRtype)
    [in]rppHandleRPP HOST handle created with rppCreateWithBatchSize()
    Returns
    A RppStatus enumeration.
    Return values
    RPP_SUCCESSSuccessful completion.
    RPP_ERROR*Unsuccessful completion.

◆ rppt_copy_gpu()

RppStatus rppt_copy_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
rppHandle_t  rppHandle 
)

Copy operation on HIP backend for a NCHW/NHWC layout tensor.

The copy operation runs a buffer copy for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).
  • dstPtr depth ranges - Will be same depth as srcPtr.
    Sample Input
    Sample Output
    Parameters
    [in]srcPtrsource tensor in HIP memory
    [in]srcDescPtrsource tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)
    [out]dstPtrdestination tensor in HIP memory
    [in]dstDescPtrdestination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)
    [in]rppHandleRPP HIP handle created with rppCreateWithStreamAndBatchSize()
    Returns
    A RppStatus enumeration.
    Return values
    RPP_SUCCESSSuccessful completion.
    RPP_ERROR*Unsuccessful completion.

◆ rppt_copy_host()

RppStatus rppt_copy_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
rppHandle_t  rppHandle 
)

Copy operation on HOST backend for a NCHW/NHWC layout tensor.

The copy operation runs a buffer copy for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).
  • dstPtr depth ranges - Will be same depth as srcPtr.
    Sample Input
    Sample Output
    Parameters
    [in]srcPtrsource tensor in HOST memory
    [in]srcDescPtrsource tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)
    [out]dstPtrdestination tensor in HOST memory
    [in]dstDescPtrdestination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)
    [in]rppHandleRPP HOST handle created with rppCreateWithBatchSize()
    Returns
    A RppStatus enumeration.
    Return values
    RPP_SUCCESSSuccessful completion.
    RPP_ERROR*Unsuccessful completion.

◆ rppt_swap_channels_gpu()

RppStatus rppt_swap_channels_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
rppHandle_t  rppHandle 
)

Swap channels operation on HIP backend for a NCHW/NHWC layout tensor.

The swap channels operation swaps R and B channels to toggle RGB<->BGR for a batch of RGB(3 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).
  • dstPtr depth ranges - Will be same depth as srcPtr.
    Sample Input
    Sample Output
    Parameters
    [in]srcPtrsource tensor in HIP memory
    [in]srcDescPtrsource tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 3)
    [out]dstPtrdestination tensor in HIP memory
    [in]dstDescPtrdestination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)
    [in]rppHandleRPP HIP handle created with rppCreateWithStreamAndBatchSize()
    Returns
    A RppStatus enumeration.
    Return values
    RPP_SUCCESSSuccessful completion.
    RPP_ERROR*Unsuccessful completion.

◆ rppt_swap_channels_host()

RppStatus rppt_swap_channels_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
rppHandle_t  rppHandle 
)

Swap channels operation on HOST backend for a NCHW/NHWC layout tensor.

The swap channels operation swaps R and B channels to toggle RGB<->BGR for a batch of RGB(3 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).
  • dstPtr depth ranges - Will be same depth as srcPtr.
    Sample Input
    Sample Output
    Parameters
    [in]srcPtrsource tensor in HOST memory
    [in]srcDescPtrsource tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 3)
    [out]dstPtrdestination tensor in HOST memory
    [in]dstDescPtrdestination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)
    [in]rppHandleRPP HOST handle created with rppCreateWithBatchSize()
    Returns
    A RppStatus enumeration.
    Return values
    RPP_SUCCESSSuccessful completion.
    RPP_ERROR*Unsuccessful completion.