33#define CCCC_LOCAL_FENCE 1
34#define CCCC_GLOBAL_FENCE 2
43#define CCCC_RANGE_DIMS_(_1, _2, _3, N, ...) N
46#define CCCC_RANGE(...) \
47 ((cccc_range){CCCC_RANGE_DIMS_(__VA_ARGS__, 3, 2, 1), {__VA_ARGS__}})
57#define cccc_launch(k, g, l, ...) \
58 __builtin_kernel_launch(k, g, l, ##__VA_ARGS__)
62#define CCCC_LOCAL(bytes) __builtin_kernel_local(bytes)
size_t cccc_global_id(unsigned dim)
Index of the calling work-item in the whole range, per dimension.
size_t cccc_global_size(unsigned dim)
Size of the whole range.
size_t cccc_local_size(unsigned dim)
Size of a work-group.
size_t cccc_group_id(unsigned dim)
Index of the calling work-item's work-group.
void cccc_barrier(unsigned fences)
Waits until every work-item of the group has reached the barrier.
size_t cccc_num_groups(unsigned dim)
Number of work-groups.
unsigned cccc_work_dim(void)
Dimensions of the launch (1 outside a launch).
size_t cccc_local_id(unsigned dim)
Index of the calling work-item within its work-group.
An NDRange extent of one to three dimensions. Build one with CCCC_RANGE.
Definition kernel.h:38
unsigned dims
Definition kernel.h:39