Skip to content
Snippets Groups Projects
Commit 5f6fa989 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Diagnosis/Mem info: added bits information and 256bit type (AVX) to gtPrintDataAlignment


Signed-off-by: default avatarNicola Vigano <nicola.vigano@esrf.fr>

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@660 4c865b51-4357-4376-afb4-474e03ccb993
parent 52cf7e9a
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@
#define LAST_04_BYTES(x) (((long unsigned int)x) & 0x3)
#define LAST_08_BYTES(x) (((long unsigned int)x) & 0x7)
#define LAST_16_BYTES(x) (((long unsigned int)x) & 0xF)
#define LAST_32_BYTES(x) (((long unsigned int)x) & 0xFF)
const char * const alignedTo(const double * const image_in);
......@@ -28,15 +29,17 @@ void mexFunction( int nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[] )
const char * const
alignedTo(const double * const image_in)
{
if (!(LAST_16_BYTES(image_in))) {
return "long double";
if (!(LAST_32_BYTES(image_in))) {
return "long long double (256bit)";
} else if (!(LAST_16_BYTES(image_in))) {
return "long double (128bit)";
} else if (!(LAST_08_BYTES(image_in))) {
return "double";
return "double (64bit)";
} else if (!(LAST_04_BYTES(image_in))) {
return "float";
return "float (32bit)";
} else if (!(LAST_02_BYTES(image_in))) {
return "short float";
return "short float (16bit)";
} else {
return "byte";
return "byte (8bit)";
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment