LibraryLink`
LibraryLink`

MTensor_getRank (C Function)

gets the rank of an MTensor.

Details

  • Used in C/C++ code in a library function called from the Wolfram Language.
  • The rank shows the number of indices that are needed to reference each element.

Examples

Basic Examples  (1)

This gets the rank of an MTensor:

MTensor T0;
mint rank;
...
rank = libData->MTensor_getRank( T0);