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

MTensor_getFlattenedLength


gets the total number of elements in an MTensor.
  • Used in C/C++ code in a library function called from Mathematica.
  • This the length of a flattened version of the MTensor.
This gets the total number of elements of an MTensor:
This gets the total number of elements of an MTensor:
MTensor T0;
mint len;
...
len = libData->MTensor_getFlattenedLength( T0);