LibraryLink`
LibraryLink`

MTensor_getType (C Function)

gets the type of an MTensor.

Details

  • Used in C/C++ code in a library function called from the Wolfram Language.
  • Returns one of MType_Integer, MType_Real, or MType_Complex.

Examples

Basic Examples  (1)

This checks that this is an integer MTensor:

MTensor T0;
mint type;
...
type = libData->MTensor_getType( T0);
if ( type != MType_Integer) {
processError();
}