Halide
mex_functions.h
Go to the documentation of this file.
1 // This file intentionally does not use include guards!!
2 // The intended usage of this file is to define MEX_FN to do something
3 // useful with a mex function, and then include this file. This file #undefs
4 // MEX_FN after it is done. This file contains 3 types of functions:
5 //
6 // - MEX_FN(ret, func, args): A function with return type 'ret', name 'func',
7 // and arguments 'args'.
8 // - MEX_FN_700(ret, func, func_700, args): Similar to MEX_FN, but func_700 is
9 // the name of the function with _700 appended. This is only used for
10 // Matlab 7.0 API functions.
11 // - MEX_FN_730(ret, func, func_730, args): Similar to MEX_FN_700, but for the
12 // Matlab 7.3 API.
13 
14 // Provide default no-op definitions for the 3 macros if they don't already
15 // exist.
16 #ifndef MEX_FN
17 #define MEX_FN(ret, func, args)
18 #endif
19 
20 #ifndef MEX_FN_730
21 #define MEX_FN_730(ret, func, func_730, args) MEX_FN(ret, func_730, args)
22 #endif
23 
24 #ifndef MEX_FN_700
25 #define MEX_FN_700(ret, func, func_700, args) MEX_FN(ret, func_700, args)
26 #endif
27 
28 // mex.h
29 //MEX_FN(int, mexPrintf, (const char*, ...));
30 //MEX_FN(void, mexErrMsgTxt, (const char*));
31 //MEX_FN(void, mexErrMsgIdAndTxt, (const char *, const char*, ...));
32 MEX_FN(void, mexWarnMsgTxt, (const char *));
33 //MEX_FN(void, mexWarnMsgIdAndTxt, (const char *, const char*, ...));
34 //MEX_FN(void, mexMakeArrayPersistent, (const mxArray*));
35 //MEX_FN(void, mexMakeMemoryPersistent, (void *ptr));
36 //MEX_FN(int, mexSet, (double, const char*, mxArray*));
37 //MEX_FN(const mxArray*, mexGet, (double, const char*));
38 //MEX_FN(int, mexCallMATLAB, (int, mxArray**, int, const mxArray**, const char *));
39 //MEX_FN(mxArray*, mexCallMATLABWithTrap, (int, mxArray**, int, const mxArray**, const char *));
40 //MEX_FN(void, mexSetTrapFlag, (int));
41 //MEX_FN(void, mexPrintAssertion, (const char*, const char*, int, const char*));
42 //MEX_FN(bool, mexIsGlobal, (const mxArray*));
43 //MEX_FN(int, mexPutVariable, (const char*, const char*, const mxArray*));
44 //MEX_FN(const mxArray*, mexGetVariablePtr, (const char*, const char*));
45 //MEX_FN(mxArray*, mexGetVariable, (const char*, const char*));
46 //MEX_FN(void, mexLock, (void));
47 //MEX_FN(void, mexUnlock, (void));
48 //MEX_FN(bool, mexIsLocked, (void));
49 //MEX_FN(const char*, mexFunctionName, (void));
50 //MEX_FN(int, mexEvalString, (const char*));
51 //MEX_FN(mxArray*, mexEvalStringWithTrap, (const char*));
52 //MEX_FN(int, mexAtExit, (mex_exit_fn));
53 
54 // matrix.h
55 //MEX_FN(void*, mxMalloc, (size_t));
56 //MEX_FN(void*, mxCalloc, (size_t, size_t));
57 //MEX_FN(void, mxFree, (void*));
58 //MEX_FN(void*, mxRealloc, (void*, size_t));
59 MEX_FN_730(size_t, mxGetNumberOfDimensions, mxGetNumberOfDimensions_730, (const mxArray *));
60 MEX_FN_700(int, mxGetNumberOfDimensions, mxGetNumberOfDimensions_700, (const mxArray *));
61 MEX_FN_730(const size_t *, mxGetDimensions, mxGetDimensions_730, (const mxArray *));
62 MEX_FN_700(const int *, mxGetDimensions, mxGetDimensions_700, (const mxArray *));
63 //MEX_FN(size_t, mxGetM, (const mxArray*));
64 //MEX_FN_730(size_t*, mxGetIr, mxGetIr_730, (const mxArray*));
65 //MEX_FN_700(int*, mxGetIr, mxGetIr_700, (const mxArray*));
66 //MEX_FN_730(size_t*, mxGetJc, mxGetJc_730, (const mxArray*));
67 //MEX_FN_700(int*, mxGetJc, mxGetJc_700, (const mxArray*));
68 //MEX_FN_730(size_t, mxGetNzmax, mxGetNzmax_730, (const mxArray*));
69 //MEX_FN_700(int, mxGetNzmax, mxGetNzmax_700, (const mxArray*));
70 //MEX_FN_730(void, mxSetNzmax, mxSetNzmax_730, (mxArray*, size_t));
71 //MEX_FN_700(void, mxSetNzmax, mxSetNzmax_700, (mxArray*, int));
72 //MEX_FN(const char*, mxGetFieldNameByNumber, (const mxArray*, int));
73 //MEX_FN_730(mxArray*, mxGetFieldByNumber, mxGetFieldByNumber_730, (const mxArray*, size_t, int));
74 //MEX_FN_700(mxArray*, mxGetFieldByNumber, mxGetFieldByNumber_700, (const mxArray*, int, int));
75 //MEX_FN_730(mxArray*, mxGetCell, mxGetCell_730, (const mxArray*, size_t));
76 //MEX_FN_700(mxArray*, mxGetCell, mxGetCell_700, (const mxArray*, int));
77 MEX_FN(mxClassID, mxGetClassID, (const mxArray *));
78 MEX_FN(void *, mxGetData, (const mxArray *));
79 //MEX_FN(void, mxSetData, (mxArray*,void*));
80 MEX_FN(bool, mxIsNumeric, (const mxArray *));
81 //MEX_FN(bool, mxIsCell, (const mxArray*));
82 MEX_FN(bool, mxIsLogical, (const mxArray *));
83 //MEX_FN(bool, mxIsChar, (const mxArray*));
84 //MEX_FN(bool, mxIsStruct, (const mxArray*));
85 //MEX_FN(bool, mxIsOpaque, (const mxArray*));
86 //MEX_FN(bool, mxIsFunctionHandle, (const mxArray*));
87 //MEX_FN(bool, mxIsObject, (const mxArray*));
88 //MEX_FN(void*, mxGetImagData, (const mxArray*));
89 //MEX_FN(void, mxSetImagData, (mxArray*, void*));
90 MEX_FN(bool, mxIsComplex, (const mxArray *));
91 //MEX_FN(bool, mxIsSparse, (const mxArray*));
92 //MEX_FN(bool, mxIsDouble, (const mxArray*));
93 //MEX_FN(bool, mxIsSingle, (const mxArray*));
94 //MEX_FN(bool, mxIsInt8, (const mxArray*));
95 //MEX_FN(bool, mxIsUint8, (const mxArray*));
96 //MEX_FN(bool, mxIsInt16, (const mxArray*));
97 //MEX_FN(bool, mxIsUint16, (const mxArray*));
98 //MEX_FN(bool, mxIsInt32, (const mxArray*));
99 //MEX_FN(bool, mxIsUint32, (const mxArray*));
100 //MEX_FN(bool, mxIsInt64, (const mxArray*));
101 //MEX_FN(bool, mxIsUint64, (const mxArray*));
102 //MEX_FN(size_t, mxGetNumberOfElements, (const mxArray*));
103 //MEX_FN(double*, mxGetPr, (const mxArray*));
104 //MEX_FN(void, mxSetPr, (mxArray*, double*));
105 //MEX_FN(double*, mxGetPi, (const mxArray*));
106 //MEX_FN(void, mxSetPi, (mxArray*, double*));
107 //MEX_FN(mxChar*, mxGetChars, (const mxArray*));
108 //MEX_FN(int, mxGetUserBits, (const mxArray*));
109 //MEX_FN(void, mxSetUserBits, (mxArray*, int));
110 MEX_FN(double, mxGetScalar, (const mxArray *));
111 //MEX_FN(bool, mxIsFromGlobalWS, (const mxArray*));
112 //MEX_FN(void, mxSetFromGlobalWS, (mxArray*, bool));
113 //MEX_FN_730(void, mxSetM, mxSetM_730, (mxArray*, size_t));
114 //MEX_FN_700(void, mxSetM, mxSetM_700, (mxArray*, int));
115 //MEX_FN(size_t, mxGetN, (const mxArray*));
116 //MEX_FN(bool, mxIsEmpty, (const mxArray*));
117 //MEX_FN(int, mxGetFieldNumber, (const mxArray*, const char*));
118 //MEX_FN_730(void, mxSetIr, mxSetIr_730, (mxArray*, size_t*));
119 //MEX_FN_700(void, mxSetIr, mxSetIr_700, (mxArray*, int*));
120 //MEX_FN_730(void, mxSetJc, mxSetJc_730, (mxArray*, size_t*));
121 //MEX_FN_700(void, mxSetJc, mxSetJc_700, (mxArray*, int*));
122 MEX_FN(size_t, mxGetElementSize, (const mxArray *));
123 //MEX_FN_730(size_t, mxCalcSingleSubscript, mxCalcSingleSubscript_730, (const mxArray*, size_t, const size_t*));
124 //MEX_FN_700(int, mxCalcSingleSubscript, mxCalcSingleSubscript_700, (const mxArray*, int, const int*));
125 //MEX_FN(int, mxGetNumberOfFields, (const mxArray*));
126 //MEX_FN_730(void, mxSetCell, mxSetCell_730, (mxArray*, size_t, mxArray*));
127 //MEX_FN_700(void, mxSetCell, mxSetCell_700, (mxArray*, int, mxArray*));
128 //MEX_FN_730(void, mxSetFieldByNumber, mxSetFieldByNumber_730, (mxArray*, size_t, int, mxArray*));
129 //MEX_FN_700(void, mxSetFieldByNumber, mxSetFieldByNumber_700, (mxArray*, int, int, mxArray*));
130 //MEX_FN_730(mxArray*, mxGetField, mxGetField_730, (const mxArray*, size_t, const char*));
131 //MEX_FN_700(mxArray*, mxGetField, mxGetField_700, (const mxArray*, int, const char*));
132 //MEX_FN_730(void, mxSetField, mxSetField_730, (mxArray*, size_t, const char*, mxArray*));
133 //MEX_FN_700(void, mxSetField, mxSetField_700, (mxArray*, int, const char*, mxArray*));
134 //MEX_FN_730(mxArray*, mxGetProperty, mxGetProperty_730, (const mxArray*, const size_t, const char*));
135 //MEX_FN_700(mxArray*, mxGetProperty, mxGetProperty_700, (const mxArray*, const int, const char*));
136 //MEX_FN_730(void, mxSetProperty, mxSetProperty_730, (mxArray*, size_t, const char*, const mxArray*));
137 //MEX_FN_700(void, mxSetProperty, mxSetProperty_700, (mxArray*, int, const char*, const mxArray*));
138 //MEX_FN(const char*, mxGetClassName, (const mxArray*));
139 //MEX_FN(bool, mxIsClass, (const mxArray*, const char*));
140 MEX_FN_730(mxArray *, mxCreateNumericMatrix, mxCreateNumericMatrix_730, (size_t, size_t, mxClassID, mxComplexity));
141 MEX_FN_700(mxArray *, mxCreateNumericMatrix, mxCreateNumericMatrix_700, (int, int, mxClassID, mxComplexity));
142 //MEX_FN_730(void, mxSetN, mxSetN_730, (mxArray*, size_t));
143 //MEX_FN_700(void, mxSetN, mxSetN_700, (mxArray*, int));
144 //MEX_FN_730(int, mxSetDimensions, mxSetDimensions_730, (mxArray*, const size_t*, size_t));
145 //MEX_FN_700(int, mxSetDimensions, mxSetDimensions_700, (mxArray*, const int*, int));
146 //MEX_FN(void, mxDestroyArray, (mxArray*));
147 //MEX_FN_730(mxArray*, mxCreateNumericArray, mxCreateNumericArray_730, (size_t, const size_t*, mxClassID, mxComplexity));
148 //MEX_FN_700(mxArray*, mxCreateNumericArray, mxCreateNumericArray_700, (int, const int*, mxClassID, mxComplexity));
149 //MEX_FN_730(mxArray*, mxCreateCharArray, mxCreateCharArray_730, (size_t, const size_t*));
150 //MEX_FN_700(mxArray*, mxCreateCharArray, mxCreateCharArray_700, (int, const int*));
151 //MEX_FN_730(mxArray*, mxCreateDoubleMatrix, mxCreateDoubleMatrix_730, (size_t, size_t, mxComplexity));
152 //MEX_FN_700(mxArray*, mxCreateDoubleMatrix, mxCreateDoubleMatrix_700, (int, int, mxComplexity));
153 //MEX_FN(mxLogical*, mxGetLogicals, (const mxArray*));
154 //MEX_FN_730(mxArray*, mxCreateLogicalArray, mxCreateLogicalArray_730, (size_t, const size_t*));
155 //MEX_FN_700(mxArray*, mxCreateLogicalArray, mxCreateLogicalArray_700, (int, const int*));
156 //MEX_FN_730(mxArray*, mxCreateLogicalMatrix, mxCreateLogicalMatrix_730, (size_t, size_t));
157 //MEX_FN_700(mxArray*, mxCreateLogicalMatrix, mxCreateLogicalMatrix_700, (int, int));
158 //MEX_FN(mxArray*, mxCreateLogicalScalar, (bool));
159 //MEX_FN(bool, mxIsLogicalScalar, (const mxArray*));
160 //MEX_FN(bool, mxIsLogicalScalarTrue, (const mxArray*));
161 //MEX_FN(mxArray*, mxCreateDoubleScalar, (double));
162 //MEX_FN_730(mxArray*, mxCreateSparse, mxCreateSparse_730, (size_t, size_t, size_t, mxComplexity));
163 //MEX_FN_700(mxArray*, mxCreateSparse, mxCreateSparse_700, (int, int, int, mxComplexity));
164 //MEX_FN_730(mxArray*, mxCreateSparseLogicalMatrix, mxCreateSparseLogicalMatrix_730, (size_t, size_t, size_t));
165 //MEX_FN_700(mxArray*, mxCreateSparseLogicalMatrix, mxCreateSparseLogicalMatrix_700, (int, int, int));
166 //MEX_FN_730(void, mxGetNChars, mxGetNChars_730, (const mxArray*, char*, size_t));
167 //MEX_FN_700(void, mxGetNChars, mxGetNChars_700, (const mxArray*, char*, int));
168 //MEX_FN_730(int, mxGetString, mxGetString_730, (const mxArray*, char*, size_t));
169 //MEX_FN_700(int, mxGetString, mxGetString_700, (const mxArray*, char*, int));
170 //MEX_FN(char*, mxArrayToString, (const mxArray*));
171 //MEX_FN_730(mxArray*, mxCreateStringFromNChars, mxCreateStringFromNChars_730, (const char*, size_t));
172 //MEX_FN_700(mxArray*, mxCreateStringFromNChars, mxCreateStringFromNChars_700, (const char*, int));
173 //MEX_FN(mxArray*, mxCreateString, (const char*));
174 //MEX_FN_730(mxArray*, mxCreateCharMatrixFromStrings, mxCreateCharMatrixFromStrings_730, (size_t, const char**));
175 //MEX_FN_700(mxArray*, mxCreateCharMatrixFromStrings, mxCreateCharMatrixFromStrings_700, (int, const char**));
176 //MEX_FN_730(mxArray*, mxCreateCellMatrix, mxCreateCellMatrix_730, (size_t, size_t));
177 //MEX_FN_700(mxArray*, mxCreateCellMatrix, mxCreateCellMatrix_700, (int, int));
178 //MEX_FN_730(mxArray*, mxCreateCellArray, mxCreateCellArray_730, (size_t, const size_t*));
179 //MEX_FN_700(mxArray*, mxCreateCellArray, mxCreateCellArray_700, (int, const int*));
180 //MEX_FN_730(mxArray*, mxCreateStructMatrix, mxCreateStructMatrix_730, (size_t, size_t, int, const char**));
181 //MEX_FN_700(mxArray*, mxCreateStructMatrix, mxCreateStructMatrix_700, (int, int, int, const char**));
182 //MEX_FN_730(mxArray*, mxCreateStructArray, mxCreateStructArray_730, (size_t, const size_t*, int, const char**));
183 //MEX_FN_700(mxArray*, mxCreateStructArray, mxCreateStructArray_700, (int, const int*, int, const char**));
184 //MEX_FN(mxArray*, mxDuplicateArray, (const mxArray*));
185 //MEX_FN(int, mxSetClassName, (mxArray*, const char*));
186 //MEX_FN(int, mxAddField, (mxArray*, const char*));
187 //MEX_FN(void, mxRemoveField, (mxArray*, int));
188 //MEX_FN(double, mxGetEps, (void));
189 //MEX_FN(double, mxGetInf, (void));
190 //MEX_FN(double, mxGetNaN, (void));
191 //MEX_FN(bool, mxIsFinite, (double));
192 //MEX_FN(bool, mxIsInf, (double));
193 //MEX_FN(bool, mxIsNaN, (double));
194 
195 #ifdef MEX_FN
196 #undef MEX_FN
197 #endif
198 #ifdef MEX_FN_730
199 #undef MEX_FN_730
200 #endif
201 #ifdef MEX_FN_700
202 #undef MEX_FN_700
203 #endif
MEX_FN_700
#define MEX_FN_700(ret, func, func_700, args)
Definition: mex_functions.h:25
MEX_FN
#define MEX_FN(ret, func, args)
Definition: mex_functions.h:17
MEX_FN_730
#define MEX_FN_730(ret, func, func_730, args)
Definition: mex_functions.h:21