This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
MATHEMATICA LIBRARYLINK C FUNCTION|Tutorials »

MTensor_getRank


gets the rank of an MTensor.
  • 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.
This gets the rank of an MTensor:
This gets the rank of an MTensor:
MTensor T0;
mint rank;
...
rank = libData->MTensor_getRank( T0);