LibraryLink`
LibraryLink`

MTensor_getRank

gets the rank of an MTensor.

Details

  • Used in C/C++ code in a library function called from Mathematica.
  • 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);

Tutorials