#include <cstdarg>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <limits>
#include <map>
#include <set>
#include <string>
#include "Array.cc"
#include "f77-fcn.h"
#include "lo-ieee.h"
#include "oct-locbuf.h"
#include "quit.h"
#include "Cell.h"
#include "error.h"
#include "interpreter-private.h"
#include "interpreter.h"
#include "mxarray.h"
#include "mexproto.h"
#include "oct-map.h"
#include "ovl.h"
#include "ov.h"
#include "ov-classdef.h"
#include "ov-mex-fcn.h"
#include "ov-usr-fcn.h"
#include "pager.h"
#include "parse.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
#include "graphics.h"
Go to the source code of this file.
Classes | |
class | fp_type_traits< T > |
class | fp_type_traits< Complex > |
class | fp_type_traits< FloatComplex > |
class | mex |
class | mxArray_base_full |
class | mxArray_base_sparse |
class | mxArray_cell |
class | mxArray_interleaved_full |
class | mxArray_interleaved_sparse |
class | mxArray_matlab |
class | mxArray_octave_value |
class | mxArray_separate_full |
class | mxArray_separate_sparse |
class | mxArray_struct |
Macros | |
#define | CONST_MUTATION_METHOD(RET_TYPE, FCN_NAME, ARG_LIST, RET_VAL) RET_TYPE FCN_NAME ARG_LIST const { request_mutation (); return RET_VAL; } |
#define | CONST_VOID_MUTATION_METHOD(FCN_NAME, ARG_LIST) void FCN_NAME ARG_LIST const { request_mutation (); } |
#define | GET_DATA_METHOD(RT, FCN_NAME, ID, COMPLEXITY) RT * FCN_NAME (void) const { return get_data<RT> (ID, COMPLEXITY); } |
#define | MUTATION_METHOD(RET_TYPE, FCN_NAME, ARG_LIST, RET_VAL) RET_TYPE FCN_NAME ARG_LIST { request_mutation (); return RET_VAL; } |
#define | VOID_MUTATION_METHOD(FCN_NAME, ARG_LIST) void FCN_NAME ARG_LIST { request_mutation (); } |
Typedefs | |
typedef void(* | cmex_fptr) (int nlhs, mxArray **plhs, int nrhs, mxArray **prhs) |
typedef F77_RET_T(* | fmex_fptr) (F77_INT &nlhs, mxArray **plhs, F77_INT &nrhs, mxArray **prhs) |
Functions | |
static mwIndex | calc_single_subscript_internal (mwSize ndims, const mwSize *dims, mwSize nsubs, const mwIndex *subs) |
octave_value_list | call_mex (octave_mex_function &mex_fcn, const octave_value_list &args, int nargout_arg) |
static mwSize | max_str_len (mwSize m, const char **str) |
static void | maybe_disown_ptr (void *ptr) |
static mxArray * | maybe_mark_array (mxArray *ptr) |
static void * | maybe_mark_foreign (void *ptr) |
template<typename T > | |
static T * | maybe_unmark (T *ptr) |
static mxArray * | maybe_unmark_array (mxArray *ptr) |
int | mexAtExit (void(*f)(void)) |
int | mexCallMATLAB (int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname) |
mxArray * | mexCallMATLABWithTrap (int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname) |
void | mexErrMsgIdAndTxt (const char *id, const char *fmt,...) |
void | mexErrMsgTxt (const char *s) |
int | mexEvalString (const char *s) |
mxArray * | mexEvalStringWithTrap (const char *s) |
const char * | mexFunctionName (void) |
const mxArray * | mexGet (double handle, const char *property) |
OCTINTERP_API const mxArray * | mexGet_interleaved (double handle, const char *property) |
mxArray * | mexGetVariable (const char *space, const char *name) |
const mxArray * | mexGetVariablePtr (const char *space, const char *name) |
int | mexIsGlobal (const mxArray *ptr) |
int | mexIsLocked (void) |
void | mexLock (void) |
void | mexMakeArrayPersistent (mxArray *ptr) |
void | mexMakeMemoryPersistent (void *ptr) |
int | mexPrintf (const char *fmt,...) |
int | mexPutVariable (const char *space, const char *name, const mxArray *ptr) |
int | mexSet (double handle, const char *property, mxArray *val) |
void | mexSetTrapFlag (int flag) |
void | mexUnlock (void) |
void | mexWarnMsgIdAndTxt (const char *id, const char *fmt,...) |
void | mexWarnMsgTxt (const char *s) |
static octave_value_list | mx_to_ov_args (int nargin, mxArray *argin[]) |
int | mxAddField (mxArray *ptr, const char *key) |
char * | mxArrayToString (const mxArray *ptr) |
mwIndex | mxCalcSingleSubscript (const mxArray *ptr, mwSize nsubs, mwIndex *subs) |
void * | mxCalloc (std::size_t n, std::size_t size) |
OCTINTERP_API mxArray * | mxCreateCellArray (mwSize ndims, const mwSize *dims) |
OCTINTERP_API mxArray * | mxCreateCellArray_interleaved (mwSize ndims, const mwSize *dims) |
OCTINTERP_API mxArray * | mxCreateCellMatrix (mwSize m, mwSize n) |
OCTINTERP_API mxArray * | mxCreateCellMatrix_interleaved (mwSize m, mwSize n) |
OCTINTERP_API mxArray * | mxCreateCharArray (mwSize ndims, const mwSize *dims) |
OCTINTERP_API mxArray * | mxCreateCharArray_interleaved (mwSize ndims, const mwSize *dims) |
OCTINTERP_API mxArray * | mxCreateCharMatrixFromStrings (mwSize m, const char **str) |
OCTINTERP_API mxArray * | mxCreateCharMatrixFromStrings_interleaved (mwSize m, const char **str) |
OCTINTERP_API mxArray * | mxCreateDoubleMatrix (mwSize nr, mwSize nc, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateDoubleMatrix_interleaved (mwSize nr, mwSize nc, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateDoubleScalar (double val) |
OCTINTERP_API mxArray * | mxCreateDoubleScalar_interleaved (double val) |
OCTINTERP_API mxArray * | mxCreateLogicalArray (mwSize ndims, const mwSize *dims) |
OCTINTERP_API mxArray * | mxCreateLogicalArray_interleaved (mwSize ndims, const mwSize *dims) |
OCTINTERP_API mxArray * | mxCreateLogicalMatrix (mwSize m, mwSize n) |
OCTINTERP_API mxArray * | mxCreateLogicalMatrix_interleaved (mwSize m, mwSize n) |
OCTINTERP_API mxArray * | mxCreateLogicalScalar (mxLogical val) |
OCTINTERP_API mxArray * | mxCreateLogicalScalar_interleaved (mxLogical val) |
OCTINTERP_API mxArray * | mxCreateNumericArray (mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateNumericArray_interleaved (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 * | mxCreateNumericMatrix_interleaved (mwSize m, mwSize n, mxClassID class_id, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateSparse (mwSize m, mwSize n, mwSize nzmax, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateSparse_interleaved (mwSize m, mwSize n, mwSize nzmax, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateSparseLogicalMatrix (mwSize m, mwSize n, mwSize nzmax) |
OCTINTERP_API mxArray * | mxCreateSparseLogicalMatrix_interleaved (mwSize m, mwSize n, mwSize nzmax) |
OCTINTERP_API mxArray * | mxCreateString (const char *str) |
OCTINTERP_API mxArray * | mxCreateString_interleaved (const char *str) |
OCTINTERP_API mxArray * | mxCreateStructArray (mwSize ndims, const mwSize *dims, int num_keys, const char **keys) |
OCTINTERP_API mxArray * | mxCreateStructArray_interleaved (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 mxArray * | mxCreateStructMatrix_interleaved (mwSize rows, mwSize cols, int num_keys, const char **keys) |
OCTINTERP_API mxArray * | mxCreateUninitNumericArray (mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateUninitNumericArray_interleaved (mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateUninitNumericMatrix (mwSize m, mwSize n, mxClassID class_id, mxComplexity flag) |
OCTINTERP_API mxArray * | mxCreateUninitNumericMatrix_interleaved (mwSize m, mwSize n, mxClassID class_id, mxComplexity flag) |
void | mxDestroyArray (mxArray *ptr) |
mxArray * | mxDuplicateArray (const mxArray *ptr) |
void | mxFree (void *ptr) |
mxArray * | mxGetCell (const mxArray *ptr, mwIndex idx) |
mxChar * | mxGetChars (const mxArray *ptr) |
mxClassID | mxGetClassID (const mxArray *ptr) |
const char * | mxGetClassName (const mxArray *ptr) |
OCTINTERP_API mxComplexDouble * | mxGetComplexDoubles (const mxArray *p) |
OCTINTERP_API mxComplexSingle * | mxGetComplexSingles (const mxArray *p) |
void * | mxGetData (const mxArray *ptr) |
const mwSize * | mxGetDimensions (const mxArray *ptr) |
OCTINTERP_API mxDouble * | mxGetDoubles (const mxArray *p) |
std::size_t | mxGetElementSize (const mxArray *ptr) |
double | mxGetEps (void) |
mxArray * | mxGetField (const mxArray *ptr, mwIndex index, const char *key) |
mxArray * | mxGetFieldByNumber (const mxArray *ptr, mwIndex index, int key_num) |
const char * | mxGetFieldNameByNumber (const mxArray *ptr, int key_num) |
int | mxGetFieldNumber (const mxArray *ptr, const char *key) |
OCTINTERP_API void * | mxGetImagData (const mxArray *ptr) |
double | mxGetInf (void) |
OCTINTERP_API mxInt16 * | mxGetInt16s (const mxArray *p) |
OCTINTERP_API mxInt32 * | mxGetInt32s (const mxArray *p) |
OCTINTERP_API mxInt64 * | mxGetInt64s (const mxArray *p) |
OCTINTERP_API mxInt8 * | mxGetInt8s (const mxArray *p) |
mwIndex * | mxGetIr (const mxArray *ptr) |
mwIndex * | mxGetJc (const mxArray *ptr) |
mxLogical * | mxGetLogicals (const mxArray *ptr) |
std::size_t | mxGetM (const mxArray *ptr) |
std::size_t | mxGetN (const mxArray *ptr) |
double | mxGetNaN (void) |
mwSize | mxGetNumberOfDimensions (const mxArray *ptr) |
std::size_t | mxGetNumberOfElements (const mxArray *ptr) |
int | mxGetNumberOfFields (const mxArray *ptr) |
mwSize | mxGetNzmax (const mxArray *ptr) |
OCTINTERP_API double * | mxGetPi (const mxArray *ptr) |
double * | mxGetPr (const mxArray *ptr) |
mxArray * | mxGetProperty (const mxArray *ptr, mwIndex idx, const char *property_name) |
double | mxGetScalar (const mxArray *ptr) |
OCTINTERP_API mxSingle * | mxGetSingles (const mxArray *p) |
int | mxGetString (const mxArray *ptr, char *buf, mwSize buflen) |
OCTINTERP_API mxUint16 * | mxGetUint16s (const mxArray *p) |
OCTINTERP_API mxUint32 * | mxGetUint32s (const mxArray *p) |
OCTINTERP_API mxUint64 * | mxGetUint64s (const mxArray *p) |
OCTINTERP_API mxUint8 * | mxGetUint8s (const mxArray *p) |
bool | mxIsCell (const mxArray *ptr) |
bool | mxIsChar (const mxArray *ptr) |
bool | mxIsClass (const mxArray *ptr, const char *name) |
bool | mxIsComplex (const mxArray *ptr) |
bool | mxIsDouble (const mxArray *ptr) |
bool | mxIsEmpty (const mxArray *ptr) |
bool | mxIsFinite (const double v) |
bool | mxIsFromGlobalWS (const mxArray *) |
bool | mxIsFunctionHandle (const mxArray *ptr) |
bool | mxIsInf (const double v) |
bool | mxIsInt16 (const mxArray *ptr) |
bool | mxIsInt32 (const mxArray *ptr) |
bool | mxIsInt64 (const mxArray *ptr) |
bool | mxIsInt8 (const mxArray *ptr) |
bool | mxIsLogical (const mxArray *ptr) |
bool | mxIsLogicalScalar (const mxArray *ptr) |
bool | mxIsLogicalScalarTrue (const mxArray *ptr) |
bool | mxIsNaN (const double v) |
bool | mxIsNumeric (const mxArray *ptr) |
bool | mxIsScalar (const mxArray *ptr) |
bool | mxIsSingle (const mxArray *ptr) |
bool | mxIsSparse (const mxArray *ptr) |
bool | mxIsStruct (const mxArray *ptr) |
bool | mxIsUint16 (const mxArray *ptr) |
bool | mxIsUint32 (const mxArray *ptr) |
bool | mxIsUint64 (const mxArray *ptr) |
bool | mxIsUint8 (const mxArray *ptr) |
OCTINTERP_API int | mxMakeArrayComplex (mxArray *ptr) |
OCTINTERP_API int | mxMakeArrayReal (mxArray *ptr) |
void * | mxMalloc (std::size_t n) |
void * | mxRealloc (void *ptr, std::size_t size) |
void | mxRemoveField (mxArray *ptr, int key_num) |
void | mxSetCell (mxArray *ptr, mwIndex idx, mxArray *val) |
void | mxSetClassName (mxArray *ptr, const char *name) |
OCTINTERP_API int | mxSetComplexDoubles (mxArray *p, mxComplexDouble *d) |
OCTINTERP_API int | mxSetComplexSingles (mxArray *p, mxComplexSingle *d) |
void | mxSetData (mxArray *ptr, void *pr) |
int | mxSetDimensions (mxArray *ptr, const mwSize *dims, mwSize ndims) |
OCTINTERP_API int | mxSetDoubles (mxArray *p, mxDouble *d) |
void | mxSetField (mxArray *ptr, mwIndex index, const char *key, mxArray *val) |
void | mxSetFieldByNumber (mxArray *ptr, mwIndex index, int key_num, mxArray *val) |
OCTINTERP_API void | mxSetImagData (mxArray *ptr, void *pi) |
OCTINTERP_API int | mxSetInt16s (mxArray *p, mxInt16 *d) |
OCTINTERP_API int | mxSetInt32s (mxArray *p, mxInt32 *d) |
OCTINTERP_API int | mxSetInt64s (mxArray *p, mxInt64 *d) |
OCTINTERP_API int | mxSetInt8s (mxArray *p, mxInt8 *d) |
void | mxSetIr (mxArray *ptr, mwIndex *ir) |
void | mxSetJc (mxArray *ptr, mwIndex *jc) |
void | mxSetM (mxArray *ptr, mwSize m) |
void | mxSetN (mxArray *ptr, mwSize n) |
void | mxSetNzmax (mxArray *ptr, mwSize nzmax) |
OCTINTERP_API void | mxSetPi (mxArray *ptr, double *pi) |
void | mxSetPr (mxArray *ptr, double *pr) |
void | mxSetProperty (mxArray *ptr, mwIndex idx, const char *property_name, const mxArray *property_value) |
OCTINTERP_API int | mxSetSingles (mxArray *p, mxSingle *d) |
OCTINTERP_API int | mxSetUint16s (mxArray *p, mxUint16 *d) |
OCTINTERP_API int | mxSetUint32s (mxArray *p, mxUint32 *d) |
OCTINTERP_API int | mxSetUint64s (mxArray *p, mxUint64 *d) |
OCTINTERP_API int | mxSetUint8s (mxArray *p, mxUint8 *d) |
static void | xfree (void *ptr) |
static void * | xmalloc (size_t n) |
static void * | xrealloc (void *ptr, size_t n) |
Variables | |
mex * | mex_context = nullptr |
std::map< std::string, int > | mex_lock_count |
#define CONST_MUTATION_METHOD | ( | RET_TYPE, | |
FCN_NAME, | |||
ARG_LIST, | |||
RET_VAL | |||
) | RET_TYPE FCN_NAME ARG_LIST const { request_mutation (); return RET_VAL; } |
#define CONST_VOID_MUTATION_METHOD | ( | FCN_NAME, | |
ARG_LIST | |||
) | void FCN_NAME ARG_LIST const { request_mutation (); } |
#define GET_DATA_METHOD | ( | RT, | |
FCN_NAME, | |||
ID, | |||
COMPLEXITY | |||
) | RT * FCN_NAME (void) const { return get_data<RT> (ID, COMPLEXITY); } |
#define MUTATION_METHOD | ( | RET_TYPE, | |
FCN_NAME, | |||
ARG_LIST, | |||
RET_VAL | |||
) | RET_TYPE FCN_NAME ARG_LIST { request_mutation (); return RET_VAL; } |
#define VOID_MUTATION_METHOD | ( | FCN_NAME, | |
ARG_LIST | |||
) | void FCN_NAME ARG_LIST { request_mutation (); } |
|
static |
Definition at line 409 of file mex.cc.
Referenced by mxArray_octave_value::calc_single_subscript(), and mxArray_matlab::calc_single_subscript().
octave_value_list call_mex | ( | octave_mex_function & | mex_fcn, |
const octave_value_list & | args, | ||
int | nargout_arg | ||
) |
Definition at line 4778 of file mex.cc.
References mxArray::as_octave_value(), octave_mex_function::is_fmex(), octave_value_list::length(), mex::make_value(), mex_context, octave_mex_function::mex_fcn_ptr(), OCTAVE_LOCAL_BUFFER, and octave_value_list::resize().
Referenced by octave_mex_function::execute().
|
static |
|
inlinestatic |
Definition at line 3759 of file mex.cc.
References mex::global_unmark(), mex::mark_foreign(), mex_context, and mex::unmark().
Referenced by mxArray_base_full::fp_to_ov(), mxArray_base_full::int_to_ov(), and mxArray_base_sparse::to_ov().
Definition at line 3874 of file mex.cc.
References mex::mark_array(), and mex_context.
Referenced by mxCreateCellArray(), mxCreateCellArray_interleaved(), mxCreateCellMatrix(), mxCreateCellMatrix_interleaved(), mxCreateCharArray(), mxCreateCharArray_interleaved(), mxCreateCharMatrixFromStrings(), mxCreateCharMatrixFromStrings_interleaved(), mxCreateDoubleMatrix(), mxCreateDoubleMatrix_interleaved(), mxCreateDoubleScalar(), mxCreateDoubleScalar_interleaved(), mxCreateLogicalArray(), mxCreateLogicalArray_interleaved(), mxCreateLogicalMatrix(), mxCreateLogicalMatrix_interleaved(), mxCreateLogicalScalar(), mxCreateLogicalScalar_interleaved(), mxCreateNumericArray(), mxCreateNumericArray_interleaved(), mxCreateNumericMatrix(), mxCreateNumericMatrix_interleaved(), mxCreateSparse(), mxCreateSparse_interleaved(), mxCreateSparseLogicalMatrix(), mxCreateSparseLogicalMatrix_interleaved(), mxCreateString(), mxCreateString_interleaved(), mxCreateStructArray(), mxCreateStructArray_interleaved(), mxCreateStructMatrix(), mxCreateStructMatrix_interleaved(), mxCreateUninitNumericArray(), mxCreateUninitNumericArray_interleaved(), mxCreateUninitNumericMatrix(), mxCreateUninitNumericMatrix_interleaved(), and mxDuplicateArray().
|
inlinestatic |
Definition at line 3750 of file mex.cc.
References mex::mark_foreign(), and mex_context.
Referenced by mxArray_octave_value::get_data(), mxArray_octave_value::get_ir(), and mxArray_octave_value::get_jc().
|
inlinestatic |
Definition at line 3780 of file mex.cc.
References mex_context, and mex::unmark().
Referenced by mexMakeMemoryPersistent(), mxSetComplexDoubles(), mxSetComplexSingles(), mxSetData(), mxSetDimensions(), mxSetDoubles(), mxSetImagData(), mxSetInt16s(), mxSetInt32s(), mxSetInt64s(), mxSetInt8s(), mxSetIr(), mxSetJc(), mxSetPi(), mxSetPr(), mxSetSingles(), mxSetUint16s(), mxSetUint32s(), mxSetUint64s(), and mxSetUint8s().
Definition at line 3770 of file mex.cc.
References mex_context, and mex::unmark_array().
Referenced by mexMakeArrayPersistent(), mxArray_cell::set_cell(), and mxArray_struct::set_field_by_number().
int mexAtExit | ( | void(*)(void) | f | ) |
Definition at line 5295 of file mex.cc.
References octave_mex_function::atexit(), mex::current_mex_function(), f, and mex_context.
int mexCallMATLAB | ( | int | nargout, |
mxArray * | argout[], | ||
int | nargin, | ||
mxArray * | argin[], | ||
const char * | fname | ||
) |
Definition at line 4886 of file mex.cc.
References octave::__get_interpreter__(), octave::feval(), octave_value_list::length(), mex::make_value(), mex_context, mx_to_ov_args(), octave_value_list::resize(), and mex::trap_feval_error.
Referenced by mexCallMATLABWithTrap().
mxArray * mexCallMATLABWithTrap | ( | int | nargout, |
mxArray * | argout[], | ||
int | nargin, | ||
mxArray * | argin[], | ||
const char * | fname | ||
) |
Definition at line 4953 of file mex.cc.
References mex_context, mexCallMATLAB(), mexSetTrapFlag(), mxCreateCellMatrix(), mxCreateString(), mxCreateStructMatrix(), mxSetFieldByNumber(), and mex::trap_feval_error.
void mexErrMsgIdAndTxt | ( | const char * | id, |
const char * | fmt, | ||
... | |||
) |
Definition at line 5074 of file mex.cc.
References error(), len, mexFunctionName(), OCTAVE_LOCAL_BUFFER, strlen(), and verror_with_id().
void mexErrMsgTxt | ( | const char * | s | ) |
Definition at line 5051 of file mex.cc.
References error(), len, mexFunctionName(), and strlen().
Referenced by mexGetVariable(), mexPutVariable(), and mxIsFromGlobalWS().
int mexEvalString | ( | const char * | s | ) |
Definition at line 4984 of file mex.cc.
References octave::__get_interpreter__().
mxArray * mexEvalStringWithTrap | ( | const char * | s | ) |
Definition at line 5013 of file mex.cc.
References octave::__get_interpreter__(), mxCreateCellMatrix(), mxCreateString(), mxCreateStructMatrix(), and mxSetFieldByNumber().
const char * mexFunctionName | ( | void | ) |
Definition at line 4851 of file mex.cc.
References mex::function_name(), and mex_context.
Referenced by mexErrMsgIdAndTxt(), mexErrMsgTxt(), mexIsLocked(), mexLock(), mexUnlock(), and mexWarnMsgIdAndTxt().
Definition at line 5322 of file mex.cc.
References octave_value::as_mxArray(), get_property_from_handle(), and octave_value::is_defined().
Definition at line 5308 of file mex.cc.
References octave_value::as_mxArray(), get_property_from_handle(), and octave_value::is_defined().
mxArray * mexGetVariable | ( | const char * | space, |
const char * | name | ||
) |
Definition at line 5149 of file mex.cc.
References octave::__get_interpreter__(), octave::action_container::add(), octave_value::is_defined(), mex::make_value(), mex_context, mexErrMsgTxt(), name, mxArray::set_name(), and octave::string::strcmp().
Referenced by mexGetVariablePtr().
const mxArray * mexGetVariablePtr | ( | const char * | space, |
const char * | name | ||
) |
Definition at line 5200 of file mex.cc.
References mexGetVariable(), and name.
Definition at line 5336 of file mex.cc.
References mxIsFromGlobalWS().
int mexIsLocked | ( | void | ) |
Definition at line 5342 of file mex.cc.
References octave::__get_interpreter__(), mex_context, and mexFunctionName().
void mexLock | ( | void | ) |
Definition at line 5361 of file mex.cc.
References octave::__get_interpreter__(), mex_context, mex_lock_count, and mexFunctionName().
void mexMakeArrayPersistent | ( | mxArray * | ptr | ) |
Definition at line 5283 of file mex.cc.
References maybe_unmark_array().
void mexMakeMemoryPersistent | ( | void * | ptr | ) |
Definition at line 5289 of file mex.cc.
References maybe_unmark().
int mexPrintf | ( | const char * | fmt, |
... | |||
) |
Definition at line 5138 of file mex.cc.
References octave_stdout, and vformat().
Definition at line 5206 of file mex.cc.
References octave::__get_interpreter__(), octave::action_container::add(), mxArray::as_octave_value(), mxArray::get_name(), mexErrMsgTxt(), name, and octave::string::strcmp().
Definition at line 5379 of file mex.cc.
References mxArray::as_octave_value(), and set_property_in_handle().
void mexSetTrapFlag | ( | int | flag | ) |
Definition at line 4977 of file mex.cc.
References mex_context, and mex::trap_feval_error.
Referenced by mexCallMATLABWithTrap().
void mexUnlock | ( | void | ) |
Definition at line 5400 of file mex.cc.
References octave::__get_interpreter__(), mex_context, mex_lock_count, and mexFunctionName().
void mexWarnMsgIdAndTxt | ( | const char * | id, |
const char * | fmt, | ||
... | |||
) |
Definition at line 5119 of file mex.cc.
References len, mexFunctionName(), OCTAVE_LOCAL_BUFFER, strlen(), and vwarning_with_id().
void mexWarnMsgTxt | ( | const char * | s | ) |
|
inlinestatic |
Definition at line 4857 of file mex.cc.
References mxArray::as_octave_value().
Referenced by mexCallMATLAB().
Definition at line 4692 of file mex.cc.
References mxArray::add_field().
char * mxArrayToString | ( | const mxArray * | ptr | ) |
Definition at line 4754 of file mex.cc.
References mxArray::array_to_string().
mwIndex mxCalcSingleSubscript | ( | const mxArray * | ptr, |
mwSize | nsubs, | ||
mwIndex * | subs | ||
) |
Definition at line 4760 of file mex.cc.
References mxArray::calc_single_subscript().
void * mxCalloc | ( | std::size_t | n, |
std::size_t | size | ||
) |
Definition at line 3846 of file mex.cc.
References mex::calloc(), and mex_context.
mxArray * mxCreateCellArray | ( | mwSize | ndims, |
const mwSize * | dims | ||
) |
Definition at line 3887 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateCellArray_interleaved | ( | mwSize | ndims, |
const mwSize * | dims | ||
) |
Definition at line 3881 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateCellMatrix | ( | mwSize | m, |
mwSize | n | ||
) |
Definition at line 3899 of file mex.cc.
References maybe_mark_array().
Referenced by mexCallMATLABWithTrap(), and mexEvalStringWithTrap().
mxArray * mxCreateCellMatrix_interleaved | ( | mwSize | m, |
mwSize | n | ||
) |
Definition at line 3893 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateCharArray | ( | mwSize | ndims, |
const mwSize * | dims | ||
) |
Definition at line 3911 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateCharArray_interleaved | ( | mwSize | ndims, |
const mwSize * | dims | ||
) |
Definition at line 3905 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateCharMatrixFromStrings | ( | mwSize | m, |
const char ** | str | ||
) |
Definition at line 3923 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateCharMatrixFromStrings_interleaved | ( | mwSize | m, |
const char ** | str | ||
) |
Definition at line 3917 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateDoubleMatrix | ( | mwSize | nr, |
mwSize | nc, | ||
mxComplexity | flag | ||
) |
Definition at line 3935 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateDoubleMatrix_interleaved | ( | mwSize | nr, |
mwSize | nc, | ||
mxComplexity | flag | ||
) |
Definition at line 3929 of file mex.cc.
References maybe_mark_array().
Definition at line 3947 of file mex.cc.
References maybe_mark_array().
Definition at line 3941 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateLogicalArray | ( | mwSize | ndims, |
const mwSize * | dims | ||
) |
Definition at line 3959 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateLogicalArray_interleaved | ( | mwSize | ndims, |
const mwSize * | dims | ||
) |
Definition at line 3953 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateLogicalMatrix | ( | mwSize | m, |
mwSize | n | ||
) |
Definition at line 3971 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateLogicalMatrix_interleaved | ( | mwSize | m, |
mwSize | n | ||
) |
Definition at line 3965 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateLogicalScalar | ( | mxLogical | val | ) |
Definition at line 3983 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateLogicalScalar_interleaved | ( | mxLogical | val | ) |
Definition at line 3977 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateNumericArray | ( | mwSize | ndims, |
const mwSize * | dims, | ||
mxClassID | class_id, | ||
mxComplexity | flag | ||
) |
Definition at line 3996 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateNumericArray_interleaved | ( | mwSize | ndims, |
const mwSize * | dims, | ||
mxClassID | class_id, | ||
mxComplexity | flag | ||
) |
Definition at line 3989 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateNumericMatrix | ( | mwSize | m, |
mwSize | n, | ||
mxClassID | class_id, | ||
mxComplexity | flag | ||
) |
Definition at line 4010 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateNumericMatrix_interleaved | ( | mwSize | m, |
mwSize | n, | ||
mxClassID | class_id, | ||
mxComplexity | flag | ||
) |
Definition at line 4003 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateSparse | ( | mwSize | m, |
mwSize | n, | ||
mwSize | nzmax, | ||
mxComplexity | flag | ||
) |
Definition at line 4054 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateSparse_interleaved | ( | mwSize | m, |
mwSize | n, | ||
mwSize | nzmax, | ||
mxComplexity | flag | ||
) |
Definition at line 4047 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateSparseLogicalMatrix | ( | mwSize | m, |
mwSize | n, | ||
mwSize | nzmax | ||
) |
Definition at line 4067 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateSparseLogicalMatrix_interleaved | ( | mwSize | m, |
mwSize | n, | ||
mwSize | nzmax | ||
) |
Definition at line 4061 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateString | ( | const char * | str | ) |
Definition at line 4079 of file mex.cc.
References maybe_mark_array().
Referenced by mexCallMATLABWithTrap(), and mexEvalStringWithTrap().
mxArray * mxCreateString_interleaved | ( | const char * | str | ) |
Definition at line 4073 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateStructArray | ( | mwSize | ndims, |
const mwSize * | dims, | ||
int | num_keys, | ||
const char ** | keys | ||
) |
Definition at line 4092 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateStructArray_interleaved | ( | mwSize | ndims, |
const mwSize * | dims, | ||
int | num_keys, | ||
const char ** | keys | ||
) |
Definition at line 4085 of file mex.cc.
References maybe_mark_array().
Definition at line 4106 of file mex.cc.
References maybe_mark_array().
Referenced by mexCallMATLABWithTrap(), and mexEvalStringWithTrap().
mxArray * mxCreateStructMatrix_interleaved | ( | mwSize | rows, |
mwSize | cols, | ||
int | num_keys, | ||
const char ** | keys | ||
) |
Definition at line 4099 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateUninitNumericArray | ( | mwSize | ndims, |
const mwSize * | dims, | ||
mxClassID | class_id, | ||
mxComplexity | flag | ||
) |
Definition at line 4025 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateUninitNumericArray_interleaved | ( | mwSize | ndims, |
const mwSize * | dims, | ||
mxClassID | class_id, | ||
mxComplexity | flag | ||
) |
Definition at line 4017 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateUninitNumericMatrix | ( | mwSize | m, |
mwSize | n, | ||
mxClassID | class_id, | ||
mxComplexity | flag | ||
) |
Definition at line 4040 of file mex.cc.
References maybe_mark_array().
mxArray * mxCreateUninitNumericMatrix_interleaved | ( | mwSize | m, |
mwSize | n, | ||
mxClassID | class_id, | ||
mxComplexity | flag | ||
) |
Definition at line 4033 of file mex.cc.
References maybe_mark_array().
void mxDestroyArray | ( | mxArray * | ptr | ) |
Definition at line 4121 of file mex.cc.
References mex::free_value(), and mex_context.
Definition at line 4114 of file mex.cc.
References mxArray::dup(), and maybe_mark_array().
void mxFree | ( | void * | ptr | ) |
Definition at line 3865 of file mex.cc.
References mex::free(), mex_context, and xfree().
Referenced by mex::~mex(), mxArray::~mxArray(), mxArray_base_full::~mxArray_base_full(), mxArray_base_sparse::~mxArray_base_sparse(), mxArray_cell::~mxArray_cell(), mxArray_matlab::~mxArray_matlab(), mxArray_octave_value::~mxArray_octave_value(), mxArray_separate_full::~mxArray_separate_full(), mxArray_separate_sparse::~mxArray_separate_sparse(), mxArray_struct::~mxArray_struct(), mxArray_struct::add_field(), mxArray_octave_value::as_mxArray(), mxArray_struct::remove_field(), mxArray_matlab::set_class_name(), mxArray_matlab::set_dimensions(), and mxArray::set_name().
Definition at line 4642 of file mex.cc.
References mxArray::get_cell().
mxChar * mxGetChars | ( | const mxArray * | ptr | ) |
Definition at line 4345 of file mex.cc.
References mxArray::get_data(), and mxIsChar().
mxClassID mxGetClassID | ( | const mxArray * | ptr | ) |
Definition at line 4610 of file mex.cc.
References mxArray::get_class_id().
const char * mxGetClassName | ( | const mxArray * | ptr | ) |
Definition at line 4616 of file mex.cc.
References mxArray::get_class_name().
mxComplexDouble * mxGetComplexDoubles | ( | const mxArray * | p | ) |
Definition at line 4427 of file mex.cc.
References mxArray::get_complex_doubles().
mxComplexSingle * mxGetComplexSingles | ( | const mxArray * | p | ) |
Definition at line 4432 of file mex.cc.
References mxArray::get_complex_singles().
void * mxGetData | ( | const mxArray * | ptr | ) |
Definition at line 4360 of file mex.cc.
References mxArray::get_data().
const mwSize * mxGetDimensions | ( | const mxArray * | ptr | ) |
Definition at line 4293 of file mex.cc.
References mxArray::get_dimensions().
mxDouble * mxGetDoubles | ( | const mxArray * | p | ) |
Definition at line 4377 of file mex.cc.
References mxArray::get_doubles().
std::size_t mxGetElementSize | ( | const mxArray * | ptr | ) |
Definition at line 4766 of file mex.cc.
References mxArray::get_element_size().
Definition at line 4704 of file mex.cc.
References mxGetFieldByNumber(), and mxGetFieldNumber().
Definition at line 4711 of file mex.cc.
References mxArray::get_field_by_number().
Referenced by mxGetField().
Definition at line 4736 of file mex.cc.
References mxArray::get_field_name_by_number().
Definition at line 4742 of file mex.cc.
References mxArray::get_field_number().
Referenced by mxGetField(), and mxSetField().
void * mxGetImagData | ( | const mxArray * | ptr | ) |
Definition at line 4372 of file mex.cc.
References mxArray::get_imag_data().
double mxGetInf | ( | void | ) |
Definition at line 3833 of file mex.cc.
References lo_ieee_inf_value().
mxInt16 * mxGetInt16s | ( | const mxArray * | p | ) |
Definition at line 4392 of file mex.cc.
References mxArray::get_int16s().
mxInt32 * mxGetInt32s | ( | const mxArray * | p | ) |
Definition at line 4397 of file mex.cc.
References mxArray::get_int32s().
mxInt64 * mxGetInt64s | ( | const mxArray * | p | ) |
Definition at line 4402 of file mex.cc.
References mxArray::get_int64s().
mxInt8 * mxGetInt8s | ( | const mxArray * | p | ) |
Definition at line 4387 of file mex.cc.
References mxArray::get_int8s().
mwIndex * mxGetIr | ( | const mxArray * | ptr | ) |
Definition at line 4655 of file mex.cc.
References mxArray::get_ir().
mwIndex * mxGetJc | ( | const mxArray * | ptr | ) |
Definition at line 4661 of file mex.cc.
References mxArray::get_jc().
mxLogical * mxGetLogicals | ( | const mxArray * | ptr | ) |
Definition at line 4354 of file mex.cc.
References mxArray::get_data().
std::size_t mxGetM | ( | const mxArray * | ptr | ) |
Definition at line 4281 of file mex.cc.
References mxArray::get_m().
std::size_t mxGetN | ( | const mxArray * | ptr | ) |
Definition at line 4287 of file mex.cc.
References mxArray::get_n().
double mxGetNaN | ( | void | ) |
Definition at line 3839 of file mex.cc.
References lo_ieee_nan_value().
mwSize mxGetNumberOfDimensions | ( | const mxArray * | ptr | ) |
Definition at line 4299 of file mex.cc.
References mxArray::get_number_of_dimensions().
std::size_t mxGetNumberOfElements | ( | const mxArray * | ptr | ) |
Definition at line 4305 of file mex.cc.
References mxArray::get_number_of_elements().
Definition at line 4730 of file mex.cc.
References mxArray::get_number_of_fields().
mwSize mxGetNzmax | ( | const mxArray * | ptr | ) |
Definition at line 4667 of file mex.cc.
References mxArray::get_nzmax().
Definition at line 4366 of file mex.cc.
References mxArray::get_imag_data().
Definition at line 4333 of file mex.cc.
References mxArray::get_data().
Definition at line 4635 of file mex.cc.
References mxArray::get_property().
Definition at line 4339 of file mex.cc.
References mxArray::get_scalar().
mxSingle * mxGetSingles | ( | const mxArray * | p | ) |
Definition at line 4382 of file mex.cc.
References mxArray::get_singles().
Definition at line 4748 of file mex.cc.
References mxArray::get_string().
mxUint16 * mxGetUint16s | ( | const mxArray * | p | ) |
Definition at line 4412 of file mex.cc.
References mxArray::get_uint16s().
mxUint32 * mxGetUint32s | ( | const mxArray * | p | ) |
Definition at line 4417 of file mex.cc.
References mxArray::get_uint32s().
mxUint64 * mxGetUint64s | ( | const mxArray * | p | ) |
Definition at line 4422 of file mex.cc.
References mxArray::get_uint64s().
mxUint8 * mxGetUint8s | ( | const mxArray * | p | ) |
Definition at line 4407 of file mex.cc.
References mxArray::get_uint8s().
Definition at line 4129 of file mex.cc.
References mxArray::iscell().
Definition at line 4141 of file mex.cc.
References mxArray::is_class(), and name.
Definition at line 4147 of file mex.cc.
References mxArray::is_complex().
Definition at line 4153 of file mex.cc.
References mxArray::is_double().
Definition at line 4258 of file mex.cc.
References mxArray::isempty().
Definition at line 3809 of file mex.cc.
References lo_ieee_isfinite.
Definition at line 4159 of file mex.cc.
References mxArray::is_function_handle().
Definition at line 3815 of file mex.cc.
References lo_ieee_isinf.
Definition at line 4165 of file mex.cc.
References mxArray::is_int16().
Definition at line 4171 of file mex.cc.
References mxArray::is_int32().
Definition at line 4177 of file mex.cc.
References mxArray::is_int64().
Definition at line 4183 of file mex.cc.
References mxArray::is_int8().
Definition at line 4189 of file mex.cc.
References mxArray::is_logical().
Definition at line 4244 of file mex.cc.
References mxArray::is_logical_scalar().
Definition at line 4251 of file mex.cc.
References mxArray::is_logical_scalar_true().
Definition at line 3821 of file mex.cc.
References lo_ieee_isnan.
Definition at line 4195 of file mex.cc.
References mxArray::is_numeric().
Definition at line 4264 of file mex.cc.
References mxArray::is_scalar().
Definition at line 4201 of file mex.cc.
References mxArray::is_single().
Definition at line 4207 of file mex.cc.
References mxArray::is_sparse().
Definition at line 4213 of file mex.cc.
References mxArray::is_struct().
Definition at line 4219 of file mex.cc.
References mxArray::is_uint16().
Definition at line 4225 of file mex.cc.
References mxArray::is_uint32().
Definition at line 4231 of file mex.cc.
References mxArray::is_uint64().
Definition at line 4237 of file mex.cc.
References mxArray::is_uint8().
void * mxMalloc | ( | std::size_t | n | ) |
Definition at line 3852 of file mex.cc.
References mex::malloc(), mex_context, and xmalloc().
void * mxRealloc | ( | void * | ptr, |
std::size_t | size | ||
) |
Definition at line 3858 of file mex.cc.
References mex_context, mex::realloc(), and xrealloc().
Referenced by mxArray_struct::add_field().
Definition at line 4698 of file mex.cc.
References mxArray::remove_field().
Definition at line 4648 of file mex.cc.
References mxArray::set_cell().
void mxSetClassName | ( | mxArray * | ptr, |
const char * | name | ||
) |
Definition at line 4622 of file mex.cc.
References name, and mxArray::set_class_name().
Definition at line 4543 of file mex.cc.
References maybe_unmark(), and mxArray::set_complex_doubles().
Definition at line 4548 of file mex.cc.
References maybe_unmark(), and mxArray::set_complex_singles().
void mxSetData | ( | mxArray * | ptr, |
void * | pr | ||
) |
Definition at line 4488 of file mex.cc.
References maybe_unmark(), and mxArray::set_data().
Definition at line 4324 of file mex.cc.
References maybe_unmark(), and mxArray::set_dimensions().
Definition at line 4493 of file mex.cc.
References maybe_unmark(), and mxArray::set_doubles().
Definition at line 4717 of file mex.cc.
References mxGetFieldNumber(), and mxSetFieldByNumber().
Definition at line 4724 of file mex.cc.
References mxArray::set_field_by_number().
Referenced by mexCallMATLABWithTrap(), mexEvalStringWithTrap(), and mxSetField().
void mxSetImagData | ( | mxArray * | ptr, |
void * | pi | ||
) |
Definition at line 4603 of file mex.cc.
References maybe_unmark(), octave::math::pi, and mxArray::set_imag_data().
Definition at line 4508 of file mex.cc.
References maybe_unmark(), and mxArray::set_int16s().
Definition at line 4513 of file mex.cc.
References maybe_unmark(), and mxArray::set_int32s().
Definition at line 4518 of file mex.cc.
References maybe_unmark(), and mxArray::set_int64s().
Definition at line 4503 of file mex.cc.
References maybe_unmark(), and mxArray::set_int8s().
void mxSetIr | ( | mxArray * | ptr, |
mwIndex * | ir | ||
) |
Definition at line 4673 of file mex.cc.
References maybe_unmark(), and mxArray::set_ir().
void mxSetJc | ( | mxArray * | ptr, |
mwIndex * | jc | ||
) |
Definition at line 4679 of file mex.cc.
References maybe_unmark(), and mxArray::set_jc().
void mxSetM | ( | mxArray * | ptr, |
mwSize | m | ||
) |
Definition at line 4312 of file mex.cc.
References mxArray::set_m().
void mxSetN | ( | mxArray * | ptr, |
mwSize | n | ||
) |
Definition at line 4318 of file mex.cc.
References mxArray::set_n().
void mxSetNzmax | ( | mxArray * | ptr, |
mwSize | nzmax | ||
) |
Definition at line 4685 of file mex.cc.
References mxArray::set_nzmax().
Definition at line 4597 of file mex.cc.
References maybe_unmark(), octave::math::pi, and mxArray::set_imag_data().
Definition at line 4482 of file mex.cc.
References maybe_unmark(), and mxArray::set_data().
void mxSetProperty | ( | mxArray * | ptr, |
mwIndex | idx, | ||
const char * | property_name, | ||
const mxArray * | property_value | ||
) |
Definition at line 4628 of file mex.cc.
References mxArray::set_property().
Definition at line 4498 of file mex.cc.
References maybe_unmark(), and mxArray::set_singles().
Definition at line 4528 of file mex.cc.
References maybe_unmark(), and mxArray::set_uint16s().
Definition at line 4533 of file mex.cc.
References maybe_unmark(), and mxArray::set_uint32s().
Definition at line 4538 of file mex.cc.
References maybe_unmark(), and mxArray::set_uint64s().
Definition at line 4523 of file mex.cc.
References maybe_unmark(), and mxArray::set_uint8s().
|
static |
Definition at line 293 of file mex.cc.
References free().
Referenced by mex::~mex(), mex::free(), and mxFree().
|
static |
Definition at line 268 of file mex.cc.
References malloc().
Referenced by mxArray::malloc(), mex::malloc_unmarked(), and mxMalloc().
|
static |
Definition at line 280 of file mex.cc.
Referenced by mxRealloc(), and mex::realloc().
mex* mex_context = nullptr |
Definition at line 3729 of file mex.cc.
Referenced by call_mex(), mxArray::calloc(), mxArray::malloc(), maybe_disown_ptr(), maybe_mark_array(), maybe_mark_foreign(), maybe_unmark(), maybe_unmark_array(), mexAtExit(), mexCallMATLAB(), mexCallMATLABWithTrap(), mexFunctionName(), mexGetVariable(), mexIsLocked(), mexLock(), mexSetTrapFlag(), mexUnlock(), mxCalloc(), mxDestroyArray(), mxFree(), mxMalloc(), and mxRealloc().
std::map<std::string, int> mex_lock_count |
Definition at line 5358 of file mex.cc.
Referenced by mexLock(), and mexUnlock().