78 |
#endif |
#endif |
79 |
|
|
80 |
#define CACHE_LINE 16 |
#define CACHE_LINE 16 |
|
#define CACHE_ALIGN __attribute__ ((__aligned__(CACHE_LINE))) |
|
|
|
|
81 |
|
|
82 |
#if defined(LINUX) |
#if defined(LINUX) |
83 |
|
|
84 |
#include <stdint.h> |
#include <stdint.h> |
85 |
|
|
86 |
|
#define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \ |
87 |
|
type name##_storage[(sizex)*(sizey)+(alignment)-1]; \ |
88 |
|
typedef type name##_sub[sizey]; \ |
89 |
|
name##_sub * name = (void *) (((int32_t) name##_storage+(alignment)) & ~((int32_t)(alignment)-1)) |
90 |
|
|
91 |
#else |
#else |
92 |
|
|
93 |
|
#define CACHE_ALIGN __attribute__ ((__aligned__(CACHE_LINE))) |
94 |
#define int8_t char |
#define int8_t char |
95 |
#define uint8_t unsigned char |
#define uint8_t unsigned char |
96 |
#define int16_t short |
#define int16_t short |