X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=src%2Fsources%2Futils%2Fioutils.h;fp=src%2Fsources%2Futils%2Fioutils.h;h=31f464a75288116b162dd82c83a852cd346c0172;hb=493a35bfea6d1210c94ced8fbfe3e572f0389ea5;hp=0000000000000000000000000000000000000000;hpb=35b42a4bd37b162a3d579693b2b5fa4913a52ed5;p=valse.git diff --git a/src/sources/utils/ioutils.h b/src/sources/utils/ioutils.h new file mode 100644 index 0000000..31f464a --- /dev/null +++ b/src/sources/utils/ioutils.h @@ -0,0 +1,75 @@ +#ifndef select_ioutils_H +#define select_ioutils_H + +#include +#include +#include +#include //for type wchar16_t + +// Include header for mwSize type +#ifdef Octave +#include +#else +#include +#endif + +// CHUNK_SIZE = number of lambda values to be treated sequentially by a single core +#define CHUNK_SIZE 1 + +// integer type chosen in MATLAB (to be tuned: 32 bits should be enough) +typedef int64_t Int; + +// real number type chosen in MATLAB (default: double) +typedef double Real; + +#ifndef M_PI +#define M_PI 3.141592653589793 +#endif + +// Fill an array with zeros +#define zeroArray(array, size)\ +{\ + for (Int u=0; u