/* Header file for the element pass-functions Set up for 64 bit linux platform. Modified by Jianfeng ZHANG @ LAL, 12/02/2013 */ #if defined(PCWIN) #define ExportMode __declspec(dllexport) /*windows version matlab*/ #include #elif defined(GLNX86) /*32 bit linux version matlab*/ #define ExportMode #elif defined(GLNXA64) /*64 bit linux version matlab, added by Jianfeng Zhang for ubuntu 12.04, Mac Pro. 8.2*/ #define ExportMode #elif defined(ALPHA) #define ExportMode #elif defined(SOL2) #define ExportMode #elif defined(MACI64) /* added by L.S. Nadolski for MAC Snow Leopard */ #define ExportMode #else /* Default - Windows */ #define ExportMode __declspec(dllexport) #endif ExportMode int* passFunction(const mxArray *ElemData, int *FieldNumbers, double *r_in, int num_particles, int mode); #define NO_LOCAL_COPY 0 /* function retieves element data from MATLAB workspace each time it is called and reterns NULL pointer */ #define MAKE_LOCAL_COPY 1 /* function retieves element data from MATLAB workspace allocates memory and makes a persistent local copy of the fields it uses for use on subsequent calls. Returns a pointer to that structure */ #define USE_LOCAL_COPY 2 /* Uses the previously stored local copy of the element data */