Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.9 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

    Detailed Description

    For the NHWC tensor, assuming p,q,r,s correspond to N,H,W,C dimensions, the offset from the base address of the tensor to access a tensor value at coordinate (p,q,r,s) is calculated using the expression below:

    offset = p * tensormetadata.dimstrides[NVM_TENSOR_NHWC_N_STRIDE_INDEX] +
    q * tensormetadata.dimstrides[NVM_TENSOR_NHWC_H_STRIDE_INDEX] +
    r * tensormetadata.dimstrides[NVM_TENSOR_NHWC_W_STRIDE_INDEX] +
    s * tensormetadata.dimstrides[NVM_TENSOR_NHWC_C_STRIDE_INDEX]

    Macros

    #define NVM_TENSOR_NHWC_E_STRIDE_INDEX   0U
     Defines the stride index for NHWC element. More...
     
    #define NVM_TENSOR_NHWC_C_STRIDE_INDEX   NVM_TENSOR_NHWC_E_STRIDE_INDEX
     Defines the stride index for NHWC channel. More...
     
    #define NVM_TENSOR_NHWC_W_STRIDE_INDEX   1U
     Defines the stride index for NHWC column along the W dimension. More...
     
    #define NVM_TENSOR_NHWC_H_STRIDE_INDEX   2U
     Defines the stride index for NHWC line along the H dimension. More...
     
    #define NVM_TENSOR_NHWC_N_STRIDE_INDEX   3U
     Defines the stride index for NHWC plane along the N dimension. More...
     

    Macro Definition Documentation

    ◆ NVM_TENSOR_NHWC_C_STRIDE_INDEX

    #define NVM_TENSOR_NHWC_C_STRIDE_INDEX   NVM_TENSOR_NHWC_E_STRIDE_INDEX

    Defines the stride index for NHWC channel.

    tensormetadata.dimstrides[NVM_TENSOR_NHWC_C_STRIDE_INDEX] is stride in bytes to go from current channel(C) to the next channel(C) for NHWC tensor. The index is assigned to the same index as for the element stride.

    Definition at line 122 of file nvmedia_tensormetadata.h.

    ◆ NVM_TENSOR_NHWC_E_STRIDE_INDEX

    #define NVM_TENSOR_NHWC_E_STRIDE_INDEX   0U

    Defines the stride index for NHWC element.

    tensormetadata.dimstrides[NVM_TENSOR_NHWC_E_STRIDE_INDEX] is stride in bytes to go from the current element to the next element for NHWC tensor.

    Definition at line 113 of file nvmedia_tensormetadata.h.

    ◆ NVM_TENSOR_NHWC_H_STRIDE_INDEX

    #define NVM_TENSOR_NHWC_H_STRIDE_INDEX   2U

    Defines the stride index for NHWC line along the H dimension.

    tensormetadata.dimstrides[NVM_TENSOR_NHWC_H_STRIDE_INDEX] is stride in bytes to go from one line to the next line or along the H dimension for NHWC tensor.

    Definition at line 140 of file nvmedia_tensormetadata.h.

    ◆ NVM_TENSOR_NHWC_N_STRIDE_INDEX

    #define NVM_TENSOR_NHWC_N_STRIDE_INDEX   3U

    Defines the stride index for NHWC plane along the N dimension.

    tensormetadata.dimstrides[NVM_TENSOR_NHWC_N_STRIDE_INDEX] is stride in bytes to go from one plane to the next plane along the N dimension for NHWC tensor.

    Definition at line 149 of file nvmedia_tensormetadata.h.

    ◆ NVM_TENSOR_NHWC_W_STRIDE_INDEX

    #define NVM_TENSOR_NHWC_W_STRIDE_INDEX   1U

    Defines the stride index for NHWC column along the W dimension.

    tensormetadata.dimstrides[NVM_TENSOR_NHWC_W_STRIDE_INDEX] is stride in bytes to go from one column to the next column or along the W dimension for NHWC tensor.

    Definition at line 131 of file nvmedia_tensormetadata.h.

    NVM_TENSOR_NHWC_H_STRIDE_INDEX
    #define NVM_TENSOR_NHWC_H_STRIDE_INDEX
    Defines the stride index for NHWC line along the H dimension.
    Definition: nvmedia_tensormetadata.h:140
    NVM_TENSOR_NHWC_N_STRIDE_INDEX
    #define NVM_TENSOR_NHWC_N_STRIDE_INDEX
    Defines the stride index for NHWC plane along the N dimension.
    Definition: nvmedia_tensormetadata.h:149
    NVM_TENSOR_NHWC_C_STRIDE_INDEX
    #define NVM_TENSOR_NHWC_C_STRIDE_INDEX
    Defines the stride index for NHWC channel.
    Definition: nvmedia_tensormetadata.h:122
    NVM_TENSOR_NHWC_W_STRIDE_INDEX
    #define NVM_TENSOR_NHWC_W_STRIDE_INDEX
    Defines the stride index for NHWC column along the W dimension.
    Definition: nvmedia_tensormetadata.h:131
    人人超碰97caoporen国产