25 #if defined( MATLAB_MEX_FILE ) 31 #if (_MSC_VER >= 1600) 32 #define __STDC_UTF_16__ 44 #define WIN32_LEAN_AND_MEAN 53 #define _strcmpi strcasecmp 54 #define _strnicmp strncasecmp 55 #define _snprintf snprintf 56 #define _vsnprintf vsnprintf 57 #define _strdup strdup 58 #define _copysign copysign 69 #if defined(__APPLE__) || defined(TARGET_OS_X) 116 #define MEM_ALLOC( count, bytes ) ((void*)mxMalloc( (count) * (bytes) )) 117 #define MEM_FREE( ptr ) mxFree( (void*)ptr ) 118 #define MEM_REALLOC( ptr, bytes ) ((void*)mxRealloc( (void*)ptr, bytes )) 121 #define MEM_ALLOC( count, bytes ) ( (void*)new char[(count) * (bytes)] ) 123 #define MEM_FREE( ptr ) ( delete[] ptr ) 125 #define MEM_REALLOC( ptr, size ) HC_ASSERT_ERROR 129 #if 1 && defined( MATLAB_MEX_FILE ) 130 #define MAT_ARRAY_TYPE mxArray 131 #define MAT_ALLOC( m, n, typeID ) mxCreateNumericMatrix( m, n, typeID, mxREAL ) 132 #define MAT_FREE( ptr ) mxDestroyArray( ptr ) 135 struct tagNumericArray;
136 #define MAT_ARRAY_TYPE tagNumericArray 137 #define MAT_ALLOC( m, n, typeID ) tagNumericArray::Create( m, n, typeID ) 138 #define MAT_FREE( ptr ) tagNumericArray::FreeArray( ptr ) 146 #if CONFIG_USE_HEAP_CHECK 156 #define MEM_ALLOC(n,s) (HeapCheck.New( (n) * (s), __FILE__, __FUNCTION__, "", __LINE__ )) 157 #define MEM_REALLOC(p,s) (HeapCheck.Realloc( (void*)(p), (s), __FILE__, __FUNCTION__, "", __LINE__ )) 158 #define MEM_FREE(p) (HeapCheck.Free( (void*)(p) )) 159 #define WALKHEAP (HeapCheck.Walk()) 160 #define FREEHEAP (HeapCheck.Release()) 162 #define HC_COMP_ASSERT(exp) 163 #define HC_ASSERT(exp) 164 #define HC_ASSERT_ERROR 165 #define HC_NOTES(ptr,notes) 168 #endif // CONFIG_USE_HEAP_CHECK 176 #if defined( MATLAB_MEX_FILE ) 177 #define DBL_ISFINITE mxIsFinite 178 #define DBL_ISINF mxIsInf 179 #define DBL_ISNAN mxIsNaN 180 #define DBL_INF mxGetInf() 181 #define DBL_NAN mxGetNaN() 182 #define DBL_EPS mxGetEps() 184 #if defined( _WIN32 ) 186 #define DBL_INF (_Inf._Double) 187 #define DBL_NAN (_Nan._Double) 189 #define DBL_ISFINITE(x) _finite(x) 190 #define DBL_ISNAN(x) _isnan(x) 191 #define DBL_ISINF(x) (!DBL_ISFINITE(x) && !DBL_ISNAN(x)) 194 #define DBL_INF INFINITY 198 #define DBL_ISFINITE(x) (((x)-(x)) == 0.0) 199 #define DBL_ISNAN(x) ((x)!=(x)) 200 #define DBL_ISINF(x) (!DBL_ISFINITE(x) && !DBL_ISNAN(x)) 202 #define DBL_ISFINITE(x) isfinite(x) 203 #define DBL_ISNAN(x) isnan(x) 204 #define DBL_ISINF(x) isinf(x) 219 #define SQLITE_VERSION_STRING SQLITE_VERSION 220 #define DEELX_VERSION_STRING "1.3" 224 #if defined( MATLAB_MEX_FILE ) 225 #if defined( CONFIG_EARLY_BIND_SERIALIZE ) 230 #define PRINTF mexPrintf 237 #if defined( MAIN_MODULE ) 258 #if defined( MATLAB_MEX_FILE ) 277 #endif // defined( MATLAB_MEX_FILE ) 279 #endif // defined( MAIN_MODULE ) int g_param_wrapping
Wrap parameters.
mxArray * mxSerialize(const mxArray *)
Serialize a MATLAB array.
#define CONFIG_COMPRESSION_TYPE
"blosc", "blosclz", "qlin16", "qlog16" or NULL (for default)
mxArray * mxDeserialize(const void *, size_t)
Deserialize a MATLAB array.
#define CONFIG_STREAMING
Allow streaming to convert MATLAB variables into byte streams.
Global configuration settings and defaults.
#define CONFIG_COMPRESSION_LEVEL
compression level: Using compression on typed blobs when > 0
unsigned char byte
byte type
#define CONFIG_NULL_AS_NAN
use NaN instead of NULL values by default
int g_result_type
Data organisation of returning query results.
#define CONFIG_CHECK_4_UNIQUE_FIELDS
ensure unique fields in query return structure by default
int g_streaming
Flag: Allow streaming.
int g_namelengthmax
MATALAB specific globals.
int g_convertUTF8
Flag: String representation (utf8 or ansi)
#define CONFIG_PARAM_WRAPPING
Wrap parameters.
const double g_NaN
global NaN representation
#define CONFIG_CONVERT_UTF8
Convert UTF-8 to ascii, otherwise set slCharacterEncoding('UTF-8')
int g_NULLasNaN
Flag: return NULL as NaN.
#define CONFIG_RESULT_TYPE
Data organisation of query results.
Memory leak detection helper.
#define CONFIG_COMPRESSION_CHECK
Flag: check compressed against original data.
mxArray * mxCreateSharedDataCopy(const mxArray *pr)
Create a "shadowed" MATLAB array.
int g_check4uniquefields
Flag: Check for unique fieldnames.