LibraryLink`
LibraryLink`

MTensor_getDimensions (C Function)

gets an array of the dimensions of an MTensor.

Details

  • Used in C/C++ code in a library function called from the Wolfram Language.
  • The dimensions array has a length equal to the rank.
  • The dimensions array has the qualifier since the elements should not be modified.

Examples

Basic Examples  (1)

This gets the dimensions of an MTensor:

MTensor T0;
mint const* dims;
...
dims = libData->MTensor_getDimensions( T0);