LibraryDataType
LibraryDataType[datatype]
specifies the data type for a LibraryFunction argument or result to be datatype.
LibraryDataType[datatype,etype]
specifies an element type etype for data structures.
LibraryDataType[datatype,etype,d]
specifies an array depth d for array data types.
Details
- Possible library data types include:
-
Null Null type (void) True FalseBoolean values (mbool) String UTF8 encoded strings (char *) Integer machine integers (mint) Real machine reals (mreal) Complex machine complex numbers (mcomplex) List tensors of numerical values (MTensor) NumericArray numeric arrays for LibraryLink (MNumericArray) SparseArray sparse arrays of numerical values for LibraryLink (MSparseArray) ByteArray byte arrays for LibraryLink (MNumericArray) Image 2D images for LibraryLink (MImage) Image3D 3D images for LibraryLink (MImage) Image Image3D2D or 3D images for LibraryLink (MImage) - For an image datatype, LibraryDataType[datatype,itype] specifies an ImageType of itype; LibraryDataType[datatype] allows any image type.
Examples
Basic Examples (1)
Load an example LibraryFunction that accepts a sparse array argument:
Text
Wolfram Research (2014), LibraryDataType, Wolfram Language function, https://reference.wolfram.com/language/ref/LibraryDataType.html (updated 2019).
CMS
Wolfram Language. 2014. "LibraryDataType." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/LibraryDataType.html.
APA
Wolfram Language. (2014). LibraryDataType. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LibraryDataType.html