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
{
27 volatile ELEM_TYPE maxError
;
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)) )
48 #endif //__HELLO_SHARED_H__