#include <stdlib.h>
#include "mxarray.h"
Go to the source code of this file.
Defines | |
#define | MXARRAY_TYPEDEFS_ONLY |
#define | mxAssert(expr, msg) |
#define | mxAssertS(expr, msg) |
#define | OCTINTERP_API |
Functions | |
OCTINTERP_API int | mexAtExit (void(*f)(void)) |
OCTINTERP_API int | mexCallMATLAB (int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname) |
OCTINTERP_API void | mexErrMsgIdAndTxt (const char *id, const char *s,...) |
OCTINTERP_API void | mexErrMsgTxt (const char *s) |
OCTINTERP_API int | mexEvalString (const char *s) |
OCTINTERP_API const char * | mexFunctionName (void) |
OCTINTERP_API const mxArray * | mexGet (double handle, const char *property) |
OCTINTERP_API mxArray * | mexGetVariable (const char *space, const char *name) |
OCTINTERP_API const mxArray * | mexGetVariablePtr (const char *space, const char *name) |
OCTINTERP_API int | mexIsGlobal (const mxArray *ptr) |
OCTINTERP_API int | mexIsLocked (void) |
OCTINTERP_API void | mexLock (void) |
OCTINTERP_API void | mexMakeArrayPersistent (mxArray *ptr) |
OCTINTERP_API void | mexMakeMemoryPersistent (void *ptr) |
OCTINTERP_API int | mexPrintf (const char *fmt,...) |
OCTINTERP_API int | mexPutVariable (const char *space, const char *name, mxArray *ptr) |
OCTINTERP_API int | mexSet (double handle, const char *property, mxArray *val) |
OCTINTERP_API void | mexSetTrapFlag (int flag) |
OCTINTERP_API void | mexUnlock (void) |
OCTINTERP_API void | mexWarnMsgIdAndTxt (const char *id, const char *s,...) |
OCTINTERP_API void | mexWarnMsgTxt (const char *s) |
OCTINTERP_API int | mxAddField (mxArray *ptr, const char *key) |
OCTINTERP_API char * | mxArrayToString (const mxArray *ptr) |
OCTINTERP_API mwIndex | mxCalcSingleSubscript (const mxArray *ptr, mwSize nsubs, mwIndex *subs) |
OCTINTERP_API void * | mxCalloc (size_t n, size_t size) |
OCTINTERP_API mxArray * | mxCreateCellArray (mwSize ndims, const mwSize *dims) |
OCTINTERP_API mxArray * | mxCreateCellMatrix (mwSize m, mwSize n) |
OCTINTERP_API mxArray * | mxCreateCharArray (mwSize ndims, const mwSize *dims) |
OCTINTERP_API mxArray * | mxCreateCharMatrixFromStrings (mwSize m, const char **str) |
OCTINTERP_API mxArray * | mxCreateDoubleMatrix (mwSize nr, mwSize nc, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateDoubleScalar (double val) |
OCTINTERP_API mxArray * | mxCreateLogicalArray (mwSize ndims, const mwSize *dims) |
OCTINTERP_API mxArray * | mxCreateLogicalMatrix (mwSize m, mwSize n) |
OCTINTERP_API mxArray * | mxCreateLogicalScalar (mxLogical val) |
OCTINTERP_API mxArray * | mxCreateNumericArray (mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateNumericMatrix (mwSize m, mwSize n, mxClassID class_id, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateSparse (mwSize m, mwSize n, mwSize nzmax, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateSparseLogicalMatrix (mwSize m, mwSize n, mwSize nzmax) |
OCTINTERP_API mxArray * | mxCreateString (const char *str) |
OCTINTERP_API mxArray * | mxCreateStructArray (mwSize ndims, const mwSize *dims, int num_keys, const char **keys) |
OCTINTERP_API mxArray * | mxCreateStructMatrix (mwSize rows, mwSize cols, int num_keys, const char **keys) |
OCTINTERP_API void | mxDestroyArray (mxArray *v) |
OCTINTERP_API mxArray * | mxDuplicateArray (const mxArray *v) |
OCTINTERP_API void | mxFree (void *ptr) |
OCTINTERP_API mxArray * | mxGetCell (const mxArray *ptr, mwIndex idx) |
OCTINTERP_API mxChar * | mxGetChars (const mxArray *ptr) |
OCTINTERP_API mxClassID | mxGetClassID (const mxArray *ptr) |
OCTINTERP_API const char * | mxGetClassName (const mxArray *ptr) |
OCTINTERP_API void * | mxGetData (const mxArray *ptr) |
OCTINTERP_API mwSize * | mxGetDimensions (const mxArray *ptr) |
OCTINTERP_API size_t | mxGetElementSize (const mxArray *ptr) |
OCTINTERP_API double | mxGetEps (void) |
OCTINTERP_API mxArray * | mxGetField (const mxArray *ptr, mwIndex index, const char *key) |
OCTINTERP_API mxArray * | mxGetFieldByNumber (const mxArray *ptr, mwIndex index, int key_num) |
OCTINTERP_API const char * | mxGetFieldNameByNumber (const mxArray *ptr, int key_num) |
OCTINTERP_API int | mxGetFieldNumber (const mxArray *ptr, const char *key) |
OCTINTERP_API void * | mxGetImagData (const mxArray *ptr) |
OCTINTERP_API double | mxGetInf (void) |
OCTINTERP_API mwIndex * | mxGetIr (const mxArray *ptr) |
OCTINTERP_API mwIndex * | mxGetJc (const mxArray *ptr) |
OCTINTERP_API mxLogical * | mxGetLogicals (const mxArray *ptr) |
OCTINTERP_API size_t | mxGetM (const mxArray *ptr) |
OCTINTERP_API size_t | mxGetN (const mxArray *ptr) |
OCTINTERP_API double | mxGetNaN (void) |
OCTINTERP_API mwSize | mxGetNumberOfDimensions (const mxArray *ptr) |
OCTINTERP_API size_t | mxGetNumberOfElements (const mxArray *ptr) |
OCTINTERP_API int | mxGetNumberOfFields (const mxArray *ptr) |
OCTINTERP_API mwSize | mxGetNzmax (const mxArray *ptr) |
OCTINTERP_API double * | mxGetPi (const mxArray *ptr) |
OCTINTERP_API double * | mxGetPr (const mxArray *ptr) |
OCTINTERP_API double | mxGetScalar (const mxArray *ptr) |
OCTINTERP_API int | mxGetString (const mxArray *ptr, char *buf, mwSize buflen) |
OCTINTERP_API int | mxIsCell (const mxArray *ptr) |
OCTINTERP_API int | mxIsChar (const mxArray *ptr) |
OCTINTERP_API int | mxIsClass (const mxArray *ptr, const char *name) |
OCTINTERP_API int | mxIsComplex (const mxArray *ptr) |
OCTINTERP_API int | mxIsDouble (const mxArray *ptr) |
OCTINTERP_API int | mxIsEmpty (const mxArray *ptr) |
OCTINTERP_API int | mxIsFinite (double v) |
OCTINTERP_API int | mxIsFromGlobalWS (const mxArray *ptr) |
OCTINTERP_API int | mxIsFunctionHandle (const mxArray *ptr) |
OCTINTERP_API int | mxIsInf (double v) |
OCTINTERP_API int | mxIsInt16 (const mxArray *ptr) |
OCTINTERP_API int | mxIsInt32 (const mxArray *ptr) |
OCTINTERP_API int | mxIsInt64 (const mxArray *ptr) |
OCTINTERP_API int | mxIsInt8 (const mxArray *ptr) |
OCTINTERP_API int | mxIsLogical (const mxArray *ptr) |
OCTINTERP_API int | mxIsLogicalScalar (const mxArray *ptr) |
OCTINTERP_API int | mxIsLogicalScalarTrue (const mxArray *ptr) |
OCTINTERP_API int | mxIsNaN (double v) |
OCTINTERP_API int | mxIsNumeric (const mxArray *ptr) |
OCTINTERP_API int | mxIsSingle (const mxArray *ptr) |
OCTINTERP_API int | mxIsSparse (const mxArray *ptr) |
OCTINTERP_API int | mxIsStruct (const mxArray *ptr) |
OCTINTERP_API int | mxIsUint16 (const mxArray *ptr) |
OCTINTERP_API int | mxIsUint32 (const mxArray *ptr) |
OCTINTERP_API int | mxIsUint64 (const mxArray *ptr) |
OCTINTERP_API int | mxIsUint8 (const mxArray *ptr) |
OCTINTERP_API void * | mxMalloc (size_t n) |
OCTINTERP_API void * | mxRealloc (void *ptr, size_t size) |
OCTINTERP_API void | mxRemoveField (mxArray *ptr, int key_num) |
OCTINTERP_API void | mxSetCell (mxArray *ptr, mwIndex idx, mxArray *val) |
OCTINTERP_API void | mxSetClassName (mxArray *ptr, const char *name) |
OCTINTERP_API void | mxSetData (mxArray *ptr, void *data) |
OCTINTERP_API void | mxSetDimensions (mxArray *ptr, const mwSize *dims, mwSize ndims) |
OCTINTERP_API void | mxSetField (mxArray *ptr, mwIndex index, const char *key, mxArray *val) |
OCTINTERP_API void | mxSetFieldByNumber (mxArray *ptr, mwIndex index, int key_num, mxArray *val) |
OCTINTERP_API void | mxSetImagData (mxArray *ptr, void *pi) |
OCTINTERP_API void | mxSetIr (mxArray *ptr, mwIndex *ir) |
OCTINTERP_API void | mxSetJc (mxArray *ptr, mwIndex *jc) |
OCTINTERP_API void | mxSetM (mxArray *ptr, mwSize M) |
OCTINTERP_API void | mxSetN (mxArray *ptr, mwSize N) |
OCTINTERP_API void | mxSetNzmax (mxArray *ptr, mwSize nzmax) |
OCTINTERP_API void | mxSetPi (mxArray *ptr, double *pi) |
OCTINTERP_API void | mxSetPr (mxArray *ptr, double *pr) |
#define MXARRAY_TYPEDEFS_ONLY |
Definition at line 70 of file mexproto.h.
#define mxAssert | ( | expr, | ||
msg | ||||
) |
Definition at line 267 of file mexproto.h.
#define mxAssertS | ( | expr, | ||
msg | ||||
) |
Definition at line 268 of file mexproto.h.
#define OCTINTERP_API |
Definition at line 66 of file mexproto.h.
OCTINTERP_API int mexAtExit | ( | void(*)(void) | f | ) |
Definition at line 3446 of file mex.cc.
References octave_mex_function::atexit(), mex::current_mex_function(), and f.
OCTINTERP_API int mexCallMATLAB | ( | int | nargout, | |
mxArray * | argout[], | |||
int | nargin, | |||
mxArray * | argin[], | |||
const char * | fname | |||
) |
Definition at line 3183 of file mex.cc.
References mex::abort(), error_state, feval(), octave_value_list::length(), mex::make_value(), octave_value_list::resize(), and mex::trap_feval_error.
Definition at line 3282 of file mex.cc.
References mex::abort(), error(), mexFunctionName(), OCTAVE_LOCAL_BUFFER, and verror_with_id().
OCTINTERP_API void mexErrMsgTxt | ( | const char * | s | ) |
Definition at line 3270 of file mex.cc.
References mex::abort(), error(), and mexFunctionName().
Referenced by mexGetVariable(), and mexPutVariable().
Definition at line 3249 of file mex.cc.
References error_state, and eval_string().
OCTINTERP_API const char* mexFunctionName | ( | void | ) |
Definition at line 3177 of file mex.cc.
References mex::function_name().
Referenced by mexErrMsgIdAndTxt(), mexErrMsgTxt(), mexIsLocked(), mexLock(), mexUnlock(), and mexWarnMsgIdAndTxt().
Definition at line 3461 of file mex.cc.
References octave_value::as_mxArray(), error_state, get_property_from_handle(), and octave_value::is_defined().
Definition at line 3339 of file mex.cc.
References unwind_protect::add_fcn(), error_state, get_global_value(), octave_call_stack::goto_base_frame(), octave_call_stack::goto_caller_frame(), octave_value::is_defined(), mex::make_value(), mexErrMsgTxt(), octave_call_stack::pop(), and symbol_table::varval().
Referenced by mexGetVariablePtr().
Definition at line 3383 of file mex.cc.
References mexGetVariable().
Definition at line 3472 of file mex.cc.
References mxIsFromGlobalWS().
OCTINTERP_API int mexIsLocked | ( | void | ) |
Definition at line 3478 of file mex.cc.
References mexFunctionName(), and mislocked().
OCTINTERP_API void mexLock | ( | void | ) |
Definition at line 3495 of file mex.cc.
References mexFunctionName(), and mlock().
OCTINTERP_API void mexMakeArrayPersistent | ( | mxArray * | ptr | ) |
Definition at line 3434 of file mex.cc.
References maybe_unmark_array().
OCTINTERP_API void mexMakeMemoryPersistent | ( | void * | ptr | ) |
Definition at line 3440 of file mex.cc.
References maybe_unmark().
Definition at line 3328 of file mex.cc.
References octave_stdout, and octave_vformat().
Definition at line 3389 of file mex.cc.
References unwind_protect::add_fcn(), error_state, octave_call_stack::goto_base_frame(), octave_call_stack::goto_caller_frame(), mexErrMsgTxt(), octave_call_stack::pop(), set_global_value(), and symbol_table::varref().
Definition at line 3511 of file mex.cc.
References set_property_in_handle().
OCTINTERP_API void mexSetTrapFlag | ( | int | flag | ) |
Definition at line 3242 of file mex.cc.
References mex::trap_feval_error.
OCTINTERP_API void mexUnlock | ( | void | ) |
Definition at line 3520 of file mex.cc.
References mexFunctionName(), and munlock().
Definition at line 3309 of file mex.cc.
References mexFunctionName(), OCTAVE_LOCAL_BUFFER, and vwarning_with_id().
OCTINTERP_API void mexWarnMsgTxt | ( | const char * | s | ) |
OCTINTERP_API mwIndex mxCalcSingleSubscript | ( | const mxArray * | ptr, | |
mwSize | nsubs, | |||
mwIndex * | subs | |||
) |
OCTINTERP_API void* mxCalloc | ( | size_t | n, | |
size_t | size | |||
) |
Definition at line 2533 of file mex.cc.
References mex::calloc().
OCTINTERP_API mxArray* mxCreateCellArray | ( | mwSize | ndims, | |
const mwSize * | dims | |||
) |
Definition at line 2567 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateCellMatrix | ( | mwSize | m, | |
mwSize | n | |||
) |
Definition at line 2573 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateCharArray | ( | mwSize | ndims, | |
const mwSize * | dims | |||
) |
Definition at line 2579 of file mex.cc.
References maybe_mark_array().
Definition at line 2585 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateDoubleMatrix | ( | mwSize | nr, | |
mwSize | nc, | |||
mxComplexity | flag | |||
) |
Definition at line 2591 of file mex.cc.
References maybe_mark_array().
Definition at line 2597 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateLogicalArray | ( | mwSize | ndims, | |
const mwSize * | dims | |||
) |
Definition at line 2603 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateLogicalMatrix | ( | mwSize | m, | |
mwSize | n | |||
) |
Definition at line 2609 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateLogicalScalar | ( | mxLogical | val | ) |
Definition at line 2615 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateNumericArray | ( | mwSize | ndims, | |
const mwSize * | dims, | |||
mxClassID | class_id, | |||
mxComplexity | flag | |||
) |
Definition at line 2621 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateNumericMatrix | ( | mwSize | m, | |
mwSize | n, | |||
mxClassID | class_id, | |||
mxComplexity | flag | |||
) |
Definition at line 2628 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateSparse | ( | mwSize | m, | |
mwSize | n, | |||
mwSize | nzmax, | |||
mxComplexity | flag | |||
) |
Definition at line 2634 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateSparseLogicalMatrix | ( | mwSize | m, | |
mwSize | n, | |||
mwSize | nzmax | |||
) |
Definition at line 2640 of file mex.cc.
References maybe_mark_array().
Definition at line 2646 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateStructArray | ( | mwSize | ndims, | |
const mwSize * | dims, | |||
int | num_keys, | |||
const char ** | keys | |||
) |
Definition at line 2652 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API mxArray* mxCreateStructMatrix | ( | mwSize | rows, | |
mwSize | cols, | |||
int | num_keys, | |||
const char ** | keys | |||
) |
Definition at line 2658 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API void mxDestroyArray | ( | mxArray * | v | ) |
Definition at line 2672 of file mex.cc.
References mex::free_value().
Definition at line 2665 of file mex.cc.
References maybe_mark_array().
OCTINTERP_API void mxFree | ( | void * | ptr | ) |
Definition at line 2551 of file mex.cc.
References mex::free(), and xfree().
Referenced by mxArray_struct::add_field(), mxArray_struct::remove_field(), mxArray_matlab::set_class_name(), mex::~mex(), mxArray_cell::~mxArray_cell(), mxArray_matlab::~mxArray_matlab(), mxArray_number::~mxArray_number(), mxArray_octave_value::~mxArray_octave_value(), mxArray_sparse::~mxArray_sparse(), and mxArray_struct::~mxArray_struct().
OCTINTERP_API mxClassID mxGetClassID | ( | const mxArray * | ptr | ) |
OCTINTERP_API mwSize* mxGetDimensions | ( | const mxArray * | ptr | ) |
OCTINTERP_API size_t mxGetElementSize | ( | const mxArray * | ptr | ) |
Definition at line 3026 of file mex.cc.
References mxGetFieldByNumber(), and mxGetFieldNumber().
Definition at line 3033 of file mex.cc.
Referenced by mxGetField().
Definition at line 3064 of file mex.cc.
Referenced by mxGetField(), and mxSetField().
OCTINTERP_API double mxGetInf | ( | void | ) |
Definition at line 2520 of file mex.cc.
References lo_ieee_inf_value().
OCTINTERP_API mxLogical* mxGetLogicals | ( | const mxArray * | ptr | ) |
OCTINTERP_API double mxGetNaN | ( | void | ) |
Definition at line 2526 of file mex.cc.
References lo_ieee_nan_value().
OCTINTERP_API mwSize mxGetNumberOfDimensions | ( | const mxArray * | ptr | ) |
OCTINTERP_API size_t mxGetNumberOfElements | ( | const mxArray * | ptr | ) |
Definition at line 2496 of file mex.cc.
References lo_ieee_finite.
Definition at line 2816 of file mex.cc.
Referenced by mexIsGlobal().
Definition at line 2502 of file mex.cc.
References lo_ieee_isinf.
Definition at line 2508 of file mex.cc.
References lo_ieee_isnan.
OCTINTERP_API void* mxMalloc | ( | size_t | n | ) |
Definition at line 2539 of file mex.cc.
References mex::malloc().
OCTINTERP_API void* mxRealloc | ( | void * | ptr, | |
size_t | size | |||
) |
Definition at line 2545 of file mex.cc.
References mex::realloc().
Referenced by mxArray_struct::add_field().
OCTINTERP_API void mxSetData | ( | mxArray * | ptr, | |
void * | data | |||
) |
Definition at line 2932 of file mex.cc.
References maybe_unmark().
OCTINTERP_API void mxSetDimensions | ( | mxArray * | ptr, | |
const mwSize * | dims, | |||
mwSize | ndims | |||
) |
Definition at line 2868 of file mex.cc.
References maybe_unmark().
Definition at line 3039 of file mex.cc.
References mxGetFieldNumber(), and mxSetFieldByNumber().
Definition at line 3046 of file mex.cc.
Referenced by mxSetField().
OCTINTERP_API void mxSetImagData | ( | mxArray * | ptr, | |
void * | pi | |||
) |
Definition at line 2938 of file mex.cc.
References maybe_unmark().
OCTINTERP_API void mxSetIr | ( | mxArray * | ptr, | |
mwIndex * | ir | |||
) |
Definition at line 2995 of file mex.cc.
References maybe_unmark().
OCTINTERP_API void mxSetJc | ( | mxArray * | ptr, | |
mwIndex * | jc | |||
) |
Definition at line 3001 of file mex.cc.
References maybe_unmark().
OCTINTERP_API void mxSetNzmax | ( | mxArray * | ptr, | |
mwSize | nzmax | |||
) |
Definition at line 2926 of file mex.cc.
References maybe_unmark().
Definition at line 2920 of file mex.cc.
References maybe_unmark().