Mentions légales du service

Skip to content
Snippets Groups Projects
Commit cd86c067 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Silent pedantic warning on the use of gcc specific binary representation

parent e8e7e476
No related branches found
No related tags found
1 merge request!492Fix pedantic compilation warnings
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* @author Alycia Lisito * @author Alycia Lisito
* @author Terry Cojean * @author Terry Cojean
* @author Matthieu Kuhn * @author Matthieu Kuhn
* @date 2023-08-22 * @date 2024-10-18
* *
*/ */
#ifndef _chameleon_constants_h_ #ifndef _chameleon_constants_h_
...@@ -44,16 +44,24 @@ typedef enum chameleon_arithmetic_e { ...@@ -44,16 +44,24 @@ typedef enum chameleon_arithmetic_e {
ChamDouble = 3, ChamDouble = 3,
} cham_arithmetic_t; } cham_arithmetic_t;
#define CHAM_ARITHMETIC_MASK 0b11
typedef enum chameleon_ftype_e { typedef enum chameleon_ftype_e {
ChamInt = 0, ChamInt = 0,
ChamReal = 1, ChamReal = 1,
ChamComplex = 2, ChamComplex = 2,
} cham_ftype_t; } cham_ftype_t;
#define CHAM_FTYPE_MASK 0b1100 /**
#define CHAM_MIXED_MASK 0b10000 * Defines the arithmetic type mask using the 1st and 2nd bits
*/
#define CHAM_ARITHMETIC_MASK ( 0x3 )
/**
* Defines the floating type mask using the 3rd and 4th bits
*/
#define CHAM_FTYPE_MASK ( 0x3 << 2 )
/**
* Defines the mixed precision flag mask on the 5th bit
*/
#define CHAM_MIXED_MASK ( 0x1 << 4 )
#define cham_get_arith( _ftype_ ) ( (_ftype_) & CHAM_ARITHMETIC_MASK ) #define cham_get_arith( _ftype_ ) ( (_ftype_) & CHAM_ARITHMETIC_MASK )
#define cham_get_ftype( _ftype_ ) (( (_ftype_) & CHAM_FTYPE_MASK ) >> 2 ) #define cham_get_ftype( _ftype_ ) (( (_ftype_) & CHAM_FTYPE_MASK ) >> 2 )
......
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