LibraryLink`
LibraryLink`

MTensor_getRank (C 函数)

gets the rank of an MTensor.

更多信息

  • Used in C/C++ code in a library function called from the Wolfram Language.
  • The rank shows the number of indices that are needed to reference each element.

范例

基本范例  (1)

This gets the rank of an MTensor:

MTensor T0;
mint rank;
...
rank = libData->MTensor_getRank( T0);