LibraryLink`
LibraryLink`

MNumericArray_clone (C Function)

errcode_t MNumericArray_clone(const MNumericArray in, MNumericArray *out)

is a library callback function that puts a clone of into .

Details

  • Used in C/C++ code in a library function called from the Wolfram Language.
  • A nonzero error code value will be returned if there is not sufficient memory.
  • The destination should either be null (0) or an MNumericArray allocated with MNumericArray_new.
  • If is null then a new MNumericArray is created.
  • If is an allocated MNumericArray then the data in *out will be modified.

Examples

Basic Examples  (1)

This clones an MNumericArray:

MNumericArray A0, A1;
errcode_t err;
...
A1 = 0;
err = libData->numericarrayLibraryFunctions->MNumericArray_clone(A0, &A1);