Bug #1081: Report an error on command-line flags that expect a wholly-missing integer...
[charm.git] / examples / charm++ / cell / OffloadAPI / jacobi / jacobi_shared.h
blobc5601807e11658381dfcea2d7a7f8b14ecee6017
1 #ifndef __HELLO_SHARED_H__
2 #define __HELLO_SHARED_H__
5 #define ELEM_TYPE float
7 #define MATRIX_ROWS (1024 * 4 * 4 * 3) // Number of rows in the matrix
8 #define MATRIX_COLS (1024) // Number of cols in the matrix
9 #define ROWS_PER_WORKREQUEST (12) // Number of rows going into each work request
10 //#define MATRIX_ROWS (64 * 8) // Number of rows in the matrix
11 //#define MATRIX_COLS (64) // Number of cols in the matrix
12 //#define ROWS_PER_WORKREQUEST (64) // Number of rows going into each work request
14 #define MAX_ERROR ((ELEM_TYPE)(0.001))
16 #define BUFFER_ROWS (MATRIX_ROWS + 2)
17 #define BUFFER_COLS (MATRIX_COLS + 4)
19 #define NUM_WORKREQUESTS (MATRIX_ROWS / ROWS_PER_WORKREQUEST)
21 #define FUNC_CALCROWS 1
23 #define GET_I(x,y) (x + (BUFFER_COLS * y))
25 typedef struct __wrInfo {
26 volatile int wrIndex;
27 volatile ELEM_TYPE maxError;
28 } WRInfo;
31 #define SIZEOF_16(s) ( (((sizeof(s) & 0x0000000F)) == (0x00)) ? (int)(sizeof(s)) : (int)((sizeof(s) & 0xFFFFFFF0) + (0x10)) )
32 #define ROUNDUP_16(s) ( ((((s) & 0x0000000F)) == (0x00)) ? (int)(s) : (int)(((s) & 0xFFFFFFF0) + (0x10)) )
35 #ifndef NULL
36 #define NULL (0)
37 #endif
39 #ifndef TRUE
40 #define TRUE (-1)
41 #endif
43 #ifndef FALSE
44 #define FALSE (0)
45 #endif
48 #endif //__HELLO_SHARED_H__