2019-04-25 12:45:17 +00:00
|
|
|
/**
|
|
|
|
* Author......: See docs/credits.txt
|
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INC_PLATFORM_H
|
2019-04-26 08:03:16 +00:00
|
|
|
#define _INC_PLATFORM_H
|
2019-04-25 12:45:17 +00:00
|
|
|
|
|
|
|
#ifdef IS_CUDA
|
|
|
|
DECLSPEC u32 atomic_dec (u32 *p);
|
|
|
|
DECLSPEC u32 atomic_inc (u32 *p);
|
2019-04-26 11:28:44 +00:00
|
|
|
DECLSPEC u32 atomic_or (u32 *p, u32 val);
|
2019-04-25 12:45:17 +00:00
|
|
|
DECLSPEC size_t get_global_id (const u32 dimindx __attribute__((unused)));
|
|
|
|
DECLSPEC size_t get_local_id (const u32 dimindx __attribute__((unused)));
|
|
|
|
DECLSPEC size_t get_local_size (const u32 dimindx __attribute__((unused)));
|
|
|
|
|
|
|
|
#define rotate(a,n) (((a) << (n)) | ((a) >> (32 - (n))))
|
|
|
|
#define bitselect(a,b,c) ((a) ^ ((c) & ((b) ^ (a))))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // _INC_PLATFORM_H
|