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_getDimensions


gets an array of the dimensions of an MTensor.
  • Used in C/C++ code in a library function called from Mathematica.
  • The dimensions array has a length equal to the rank.
  • The dimensions array has the qualifier since the elements should not be modified.
This gets the dimensions of an MTensor:
This gets the dimensions of an MTensor:
MTensor T0;
mint const* dims;
...
dims = libData->MTensor_getDimensions( T0);