51 #if ! defined (octave_mexproto_h)
52 #define octave_mexproto_h 1
54 #include "octave-config.h"
56 #if defined (__cplusplus)
65 #if ! defined (MX_HAS_INTERLEAVED_COMPLEX)
66 # define MX_HAS_INTERLEAVED_COMPLEX 0
69 #define MXARRAY_TYPEDEFS_ONLY
71 #undef MXARRAY_TYPEDEFS_ONLY
76 int nrhs,
const mxArray *prhs[]);
101 extern OCTINTERP_API
int mexPrintf (
const char *fmt, ...);
108 extern OCTINTERP_API
int mexPutVariable (
const char *space,
const char *name,
111 #if MX_HAS_INTERLEAVED_COMPLEX
112 # define mexGet mexGet_interleaved
117 extern OCTINTERP_API
int mexSet (
double handle,
const char *
property,
123 extern OCTINTERP_API
void mexLock (
void);
124 extern OCTINTERP_API
void mexUnlock (
void);
129 extern OCTINTERP_API
int mexAtExit (
void (*
f) (
void));
132 extern OCTINTERP_API
bool mxIsFinite (
double v);
133 extern OCTINTERP_API
bool mxIsInf (
double v);
134 extern OCTINTERP_API
bool mxIsNaN (
double v);
137 extern OCTINTERP_API
double mxGetEps (
void);
138 extern OCTINTERP_API
double mxGetInf (
void);
139 extern OCTINTERP_API
double mxGetNaN (
void);
142 extern OCTINTERP_API
void *
mxCalloc (
size_t n,
size_t size);
144 extern OCTINTERP_API
void *
mxRealloc (
void *ptr,
size_t size);
145 extern OCTINTERP_API
void mxFree (
void *ptr);
148 #if MX_HAS_INTERLEAVED_COMPLEX
149 # define mxCreateCellArray mxCreateCellArray_interleaved
150 # define mxCreateCellMatrix mxCreateCellMatrix_interleaved
151 # define mxCreateCharArray mxCreateCharArray_interleaved
152 # define mxCreateCharMatrixFromStrings mxCreateCharMatrixFromStrings_interleaved
153 # define mxCreateDoubleMatrix mxCreateDoubleMatrix_interleaved
154 # define mxCreateDoubleScalar mxCreateDoubleScalar_interleaved
155 # define mxCreateLogicalArray mxCreateLogicalArray_interleaved
156 # define mxCreateLogicalMatrix mxCreateLogicalMatrix_interleaved
157 # define mxCreateLogicalScalar mxCreateLogicalScalar_interleaved
158 # define mxCreateNumericArray mxCreateNumericArray_interleaved
159 # define mxCreateNumericMatrix mxCreateNumericMatrix_interleaved
160 # define mxCreateUninitNumericArray mxCreateUninitNumericArray_interleaved
161 # define mxCreateUninitNumericMatrix mxCreateUninitNumericMatrix_interleaved
162 # define mxCreateSparse mxCreateSparse_interleaved
163 # define mxCreateSparseLogicalMatrix mxCreateSparseLogicalMatrix_interleaved
164 # define mxCreateString mxCreateString_interleaved
165 # define mxCreateStructArray mxCreateStructArray_interleaved
166 # define mxCreateStructMatrix mxCreateStructMatrix_interleaved
265 #if MX_HAS_INTERLEAVED_COMPLEX
276 #if MX_HAS_INTERLEAVED_COMPLEX
298 #if MX_HAS_INTERLEAVED_COMPLEX
322 const char *property_name);
324 const char *property_name,
325 const mxArray *property_value);
352 const char *key,
mxArray *val);
373 #if defined (MEX_DEBUG)
375 # define mxAssert(expr, msg) \
383 "Assertion failed: %s, at line %d of file \"%s\".\n%s\n", \
384 #expr, __LINE__, __FILE__, msg); \
388 "Assertion failed: %s, at line %d of file \"%s\".\n", \
389 #expr, __LINE__, __FILE__); \
394 # define mxAssertS(expr, msg) \
402 "Assertion failed at line %d of file \"%s\".\n%s\n", \
403 __LINE__, __FILE__, msg); \
407 "Assertion failed at line %d of file \"%s\".\n", \
408 __LINE__, __FILE__); \
414 # define mxAssert(expr, msg)
415 # define mxAssertS(expr, msg)
418 #if defined (__cplusplus)
F77_RET_T const F77_INT & N
F77_RET_T const F77_INT const F77_INT const F77_INT const F77_DBLE const F77_DBLE F77_INT & M
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
F77_RET_T const F77_DBLE const F77_DBLE * f
mxUint16 * mxGetUint16s(const mxArray *p)
int mxSetDoubles(mxArray *p, mxDouble *d)
mxDouble * mxGetDoubles(const mxArray *p)
int mxSetUint8s(mxArray *p, mxUint8 *d)
int mxSetInt16s(mxArray *p, mxInt16 *d)
mxInt64 * mxGetInt64s(const mxArray *p)
int mxSetComplexDoubles(mxArray *p, mxComplexDouble *d)
mxUint64 * mxGetUint64s(const mxArray *p)
mxComplexDouble * mxGetComplexDoubles(const mxArray *p)
int mxSetUint32s(mxArray *p, mxUint32 *d)
int mxSetInt8s(mxArray *p, mxInt8 *d)
int mxSetUint16s(mxArray *p, mxUint16 *d)
mxSingle * mxGetSingles(const mxArray *p)
int mxSetInt32s(mxArray *p, mxInt32 *d)
mxInt16 * mxGetInt16s(const mxArray *p)
int mxSetUint64s(mxArray *p, mxUint64 *d)
mxInt8 * mxGetInt8s(const mxArray *p)
mxComplexSingle * mxGetComplexSingles(const mxArray *p)
int mxMakeArrayReal(mxArray *ptr)
mxUint8 * mxGetUint8s(const mxArray *p)
int mxMakeArrayComplex(mxArray *ptr)
mxInt32 * mxGetInt32s(const mxArray *p)
int mxSetInt64s(mxArray *p, mxInt64 *d)
int mxSetComplexSingles(mxArray *p, mxComplexSingle *d)
mxUint32 * mxGetUint32s(const mxArray *p)
int mxSetSingles(mxArray *p, mxSingle *d)
void mxSetIr(mxArray *ptr, mwIndex *ir)
void mxSetCell(mxArray *ptr, mwIndex idx, mxArray *val)
bool mxIsUint16(const mxArray *ptr)
mxArray * mxCreateCellMatrix(mwSize m, mwSize n)
size_t mxGetN(const mxArray *ptr)
mxArray * mxCreateStructMatrix(mwSize rows, mwSize cols, int num_keys, const char **keys)
void * mxGetData(const mxArray *ptr)
mwIndex mxCalcSingleSubscript(const mxArray *ptr, mwSize nsubs, mwIndex *subs)
bool mxIsFunctionHandle(const mxArray *ptr)
bool mxIsStruct(const mxArray *ptr)
double * mxGetPi(const mxArray *ptr)
int mxGetFieldNumber(const mxArray *ptr, const char *key)
void mexErrMsgTxt(const char *s)
void mxSetData(mxArray *ptr, void *data)
void mxSetField(mxArray *ptr, mwIndex index, const char *key, mxArray *val)
size_t mxGetNumberOfElements(const mxArray *ptr)
bool mxIsUint32(const mxArray *ptr)
void mxSetProperty(mxArray *ptr, mwIndex idx, const char *property_name, const mxArray *property_value)
bool mxIsComplex(const mxArray *ptr)
int mexAtExit(void(*f)(void))
mxArray * mxCreateUninitNumericArray(mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag)
size_t mxGetElementSize(const mxArray *ptr)
bool mxIsScalar(const mxArray *ptr)
mxArray * mxCreateLogicalArray(mwSize ndims, const mwSize *dims)
void mxSetFieldByNumber(mxArray *ptr, mwIndex index, int key_num, mxArray *val)
const char * mxGetClassName(const mxArray *ptr)
void * mxMalloc(size_t n)
bool mxIsLogicalScalarTrue(const mxArray *ptr)
mxArray * mxCreateLogicalScalar(mxLogical val)
mxArray * mxCreateDoubleMatrix(mwSize nr, mwSize nc, mxComplexity flag)
void mexWarnMsgIdAndTxt(const char *id, const char *s,...)
mxClassID mxGetClassID(const mxArray *ptr)
bool mxIsLogical(const mxArray *ptr)
mxArray * mxGetProperty(const mxArray *ptr, mwIndex idx, const char *property_name)
mxArray * mxCreateCellArray(mwSize ndims, const mwSize *dims)
void mexWarnMsgTxt(const char *s)
const char * mexFunctionName(void)
void * mxCalloc(size_t n, size_t size)
mwIndex * mxGetIr(const mxArray *ptr)
bool mxIsInt64(const mxArray *ptr)
mxArray * mxGetFieldByNumber(const mxArray *ptr, mwIndex index, int key_num)
mxArray * mexCallMATLABWithTrap(int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname)
int mxSetDimensions(mxArray *ptr, const mwSize *dims, mwSize ndims)
int mexPrintf(const char *fmt,...)
bool mxIsChar(const mxArray *ptr)
mxArray * mxCreateUninitNumericMatrix(mwSize m, mwSize n, mxClassID class_id, mxComplexity flag)
bool mxIsUint8(const mxArray *ptr)
void mxSetNzmax(mxArray *ptr, mwSize nzmax)
bool mxIsSingle(const mxArray *ptr)
void mxSetN(mxArray *ptr, mwSize N)
int mxAddField(mxArray *ptr, const char *key)
void mexMakeMemoryPersistent(void *ptr)
bool mxIsInt8(const mxArray *ptr)
void mxSetImagData(mxArray *ptr, void *pi)
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
int mexCallMATLAB(int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname)
void mxSetPr(mxArray *ptr, double *pr)
mxArray * mxCreateSparseLogicalMatrix(mwSize m, mwSize n, mwSize nzmax)
mxArray * mexEvalStringWithTrap(const char *s)
mxArray * mexGetVariable(const char *space, const char *name)
mxArray * mxCreateStructArray(mwSize ndims, const mwSize *dims, int num_keys, const char **keys)
bool mxIsClass(const mxArray *ptr, const char *name)
int mxGetNumberOfFields(const mxArray *ptr)
mxArray * mxCreateCharArray(mwSize ndims, const mwSize *dims)
mwIndex * mxGetJc(const mxArray *ptr)
int mexPutVariable(const char *space, const char *name, const mxArray *ptr)
bool mxIsInt32(const mxArray *ptr)
mxArray * mxCreateCharMatrixFromStrings(mwSize m, const char **str)
int mexIsGlobal(const mxArray *ptr)
void mxSetJc(mxArray *ptr, mwIndex *jc)
bool mxIsInt16(const mxArray *ptr)
const mwSize * mxGetDimensions(const mxArray *ptr)
int mexEvalString(const char *s)
void mexSetTrapFlag(int flag)
mwSize mxGetNzmax(const mxArray *ptr)
void mxSetClassName(mxArray *ptr, const char *name)
const mxArray * mexGetVariablePtr(const char *space, const char *name)
bool mxIsNumeric(const mxArray *ptr)
mxArray * mxCreateNumericMatrix(mwSize m, mwSize n, mxClassID class_id, mxComplexity flag)
void mxDestroyArray(mxArray *v)
bool mxIsCell(const mxArray *ptr)
void mxSetM(mxArray *ptr, mwSize M)
void mexMakeArrayPersistent(mxArray *ptr)
double mxGetScalar(const mxArray *ptr)
bool mxIsFromGlobalWS(const mxArray *ptr)
void mxRemoveField(mxArray *ptr, int key_num)
size_t mxGetM(const mxArray *ptr)
mxArray * mxCreateDoubleScalar(double val)
int mxGetString(const mxArray *ptr, char *buf, mwSize buflen)
const char * mxGetFieldNameByNumber(const mxArray *ptr, int key_num)
bool mxIsLogicalScalar(const mxArray *ptr)
mxArray * mxCreateLogicalMatrix(mwSize m, mwSize n)
mwSize mxGetNumberOfDimensions(const mxArray *ptr)
mxLogical * mxGetLogicals(const mxArray *ptr)
double * mxGetPr(const mxArray *ptr)
int mexSet(double handle, const char *property, mxArray *val)
const mxArray * mexGet(double handle, const char *property)
bool mxIsEmpty(const mxArray *ptr)
mxArray * mxGetField(const mxArray *ptr, mwIndex index, const char *key)
char * mxArrayToString(const mxArray *ptr)
bool mxIsFinite(double v)
void * mxGetImagData(const mxArray *ptr)
mxChar * mxGetChars(const mxArray *ptr)
mxArray * mxCreateSparse(mwSize m, mwSize n, mwSize nzmax, mxComplexity flag)
void mexErrMsgIdAndTxt(const char *id, const char *s,...)
bool mxIsSparse(const mxArray *ptr)
bool mxIsUint64(const mxArray *ptr)
mxArray * mxDuplicateArray(const mxArray *v)
mxArray * mxCreateNumericArray(mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag)
bool mxIsDouble(const mxArray *ptr)
mxArray * mxGetCell(const mxArray *ptr, mwIndex idx)
void mxSetPi(mxArray *ptr, double *pi)
mxArray * mxCreateString(const char *str)
void * mxRealloc(void *ptr, size_t size)