Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if defined __OPENCL_VERSION__
- #define CCL_UINT __attribute__((aligned(4))) uint
- #define CCL_FLOAT __attribute__((aligned(4))) float
- #define CCL_FLOAT4 __attribute__((aligned(16))) float4
- #elif defined __GNUC__
- #define CCL_UINT __attribute__((aligned(4))) cl_uint
- #define CCL_FLOAT __attribute__((aligned(4))) cl_float
- #define CCL_FLOAT4 __attribute__((aligned(16))) cl_float4
- #endif
- struct __attribute__((packed))
- _Particle {
- CCL_FLOAT4 position;
- CCL_FLOAT4 velocity;
- CCL_FLOAT4 acceleration;
- CCL_FLOAT mass;
- CCL_FLOAT density;
- CCL_FLOAT pressure;
- CCL_UINT assigned;
- };
- typedef struct _Particle Particle;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement