ae2f_docs
Loading...
Searching...
No Matches
atom.h
Go to the documentation of this file.
1/**
2 * @file atom.h
3 * @author dalmurii
4 *
5 * @brief fetch, store and load.
6 *
7 * @see https://github.com/google/clspv/blob/main/docs/OpenCLCOnVulkan.md#opencl-20-atomic-functions
8 * @see https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/atomicFunctions.html
9 * */
10
11#ifndef ae2fVK_clspv_atom_h
12#define ae2fVK_clspv_atom_h
13
14#include "./sclr.h"
15
17
18uint atom_cmpxchg_u(volatile uint *p, uint cmp, uint val);
19int atom_cmpxchg_i(volatile int *p, int cmp, int val);
20
21int atom_xchg_i(volatile int *p, int val);
22int atom_xchg_u(volatile uint *p, uint val);
23
24
25#else
26
27#define atom_cmpxchg_i atom_cmpxchg
28#define atom_cmpxchg_u atom_cmpxchg
29
30#define atom_xchg_u atom_xchg
31#define atom_xchg_i atom_xchg
32
33#endif
34
35#endif
#define ae2fVK_clspv_IS_OPENCL
Definition key.h:5
#define uint
Definition sclr.h:11