Function nvcvTensorLayoutMakeFirst

Function Documentation

NVCVStatus nvcvTensorLayoutMakeFirst(NVCVTensorLayout in, int32_t n, NVCVTensorLayout *layout)

Makes a tensor layout from the first n labels of an existing layout.

Parameters:
  • layout[in] Layout to copy from

  • n[in] Number of labels from start of the layout.

    • If 0, returns an empty layout.

    • If negative, returns the -n last labels instead.

    • If >= rank or <= -rank, returns a copy of the input layout.

  • layout[out] Where the output layout will be written to

    • Must not be NULL

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.

  • NVCV_SUCCESS – Operation executed successfully.