Browse Source

Add MINONE macro back into lace.h

Former-commit-id: 8eb55b63c2
tempestpy_adaptions
PBerger 8 years ago
parent
commit
c4b7d778f3
  1. 3
      resources/3rdparty/sylvan/src/lace.h

3
resources/3rdparty/sylvan/src/lace.h

@ -66,6 +66,7 @@ extern "C" {
#define PAD(x,b) ( ( (b) - ((x)%(b)) ) & ((b)-1) ) /* b must be power of 2 */ #define PAD(x,b) ( ( (b) - ((x)%(b)) ) & ((b)-1) ) /* b must be power of 2 */
#define ROUND(x,b) ( (x) + PAD( (x), (b) ) ) #define ROUND(x,b) ( (x) + PAD( (x), (b) ) )
#define MINONE(x) ((x < 1) ? (1) : (x))
/* The size is in bytes. Note that this is without the extra overhead from Lace. /* The size is in bytes. Note that this is without the extra overhead from Lace.
The value must be greater than or equal to the maximum size of your tasks. The value must be greater than or equal to the maximum size of your tasks.
@ -183,7 +184,7 @@ struct __lace_common_fields_only { TASK_COMMON_FIELDS(_Task) };
typedef struct _Task { typedef struct _Task {
TASK_COMMON_FIELDS(_Task); TASK_COMMON_FIELDS(_Task);
char p1[PAD(LACE_COMMON_FIELD_SIZE, P_SZ)];
char p1[MINONE(PAD(LACE_COMMON_FIELD_SIZE, P_SZ))];
char d[LACE_TASKSIZE]; char d[LACE_TASKSIZE];
char p2[PAD(ROUND(LACE_COMMON_FIELD_SIZE, P_SZ) + LACE_TASKSIZE, LINE_SIZE)]; char p2[PAD(ROUND(LACE_COMMON_FIELD_SIZE, P_SZ) + LACE_TASKSIZE, LINE_SIZE)];
} Task; } Task;

Loading…
Cancel
Save