File tree Expand file tree Collapse file tree 22 files changed +92
-45
lines changed Expand file tree Collapse file tree 22 files changed +92
-45
lines changed Original file line number Diff line number Diff line change 6
6
//
7
7
//===----------------------------------------------------------------------===//
8
8
9
- // cl_khr_global_int32_base_atomics
9
+ #ifdef cl_khr_global_int32_base_atomics
10
10
#define __CLC_FUNCTION atom_add
11
11
#define __CLC_ADDRESS_SPACE global
12
12
#include <clc/atomic/atom_decl_int32.inc>
13
+ #endif // cl_khr_global_int32_base_atomics
13
14
14
- // cl_khr_local_int32_base_atomics
15
+ #ifdef cl_khr_local_int32_base_atomics
15
16
#define __CLC_FUNCTION atom_add
16
17
#define __CLC_ADDRESS_SPACE local
17
18
#include <clc/atomic/atom_decl_int32.inc>
19
+ #endif // cl_khr_local_int32_base_atomics
18
20
19
21
#ifdef cl_khr_int64_base_atomics
20
22
#define __CLC_FUNCTION atom_add
Original file line number Diff line number Diff line change 6
6
//
7
7
//===----------------------------------------------------------------------===//
8
8
9
- // cl_khr_global_int32_extended_atomics
9
+ #ifdef cl_khr_global_int32_extended_atomics
10
10
#define __CLC_FUNCTION atom_and
11
11
#define __CLC_ADDRESS_SPACE global
12
12
#include <clc/atomic/atom_decl_int32.inc>
13
+ #endif // cl_khr_global_int32_extended_atomics
13
14
14
- // cl_khr_local_int32_extended_atomics
15
+ #ifdef cl_khr_local_int32_extended_atomics
15
16
#define __CLC_FUNCTION atom_and
16
17
#define __CLC_ADDRESS_SPACE local
17
18
#include <clc/atomic/atom_decl_int32.inc>
19
+ #endif // cl_khr_local_int32_extended_atomics
18
20
19
21
#ifdef cl_khr_int64_base_atomics
20
22
#define __CLC_FUNCTION atom_and
Original file line number Diff line number Diff line change 9
9
#include <clc/clcfunc.h>
10
10
#include <clc/clctypes.h>
11
11
12
- // cl_khr_global_int32_base_atomics
12
+ #ifdef cl_khr_global_int32_base_atomics
13
13
_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg (volatile global int * p , int cmp ,
14
14
int val );
15
15
_CLC_OVERLOAD _CLC_DECL unsigned int
16
16
atom_cmpxchg (volatile global unsigned int * p , unsigned int cmp ,
17
17
unsigned int val );
18
+ #endif // cl_khr_global_int32_base_atomics
18
19
19
- // cl_khr_local_int32_base_atomics
20
+ #ifdef cl_khr_local_int32_base_atomics
20
21
_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg (volatile local int * p , int cmp ,
21
22
int val );
22
23
_CLC_OVERLOAD _CLC_DECL unsigned int
23
24
atom_cmpxchg (volatile local unsigned int * p , unsigned int cmp ,
24
25
unsigned int val );
26
+ #endif // cl_khr_local_int32_base_atomics
25
27
26
28
#ifdef cl_khr_int64_base_atomics
27
29
_CLC_OVERLOAD _CLC_DECL long atom_cmpxchg (volatile global long * p , long cmp ,
Original file line number Diff line number Diff line change 9
9
#include <clc/clcfunc.h>
10
10
#include <clc/clctypes.h>
11
11
12
- // cl_khr_global_int32_base_atomics
12
+ #ifdef cl_khr_global_int32_base_atomics
13
13
_CLC_OVERLOAD _CLC_DECL int atom_dec (volatile global int * p );
14
14
_CLC_OVERLOAD _CLC_DECL unsigned int atom_dec (volatile global unsigned int * p );
15
+ #endif // cl_khr_global_int32_base_atomics
15
16
16
- // cl_khr_local_int32_base_atomics
17
+ #ifdef cl_khr_local_int32_base_atomics
17
18
_CLC_OVERLOAD _CLC_DECL int atom_dec (volatile local int * p );
18
19
_CLC_OVERLOAD _CLC_DECL unsigned int atom_dec (volatile local unsigned int * p );
20
+ #endif // cl_khr_local_int32_base_atomics
19
21
20
22
#ifdef cl_khr_int64_base_atomics
21
23
_CLC_OVERLOAD _CLC_DECL long atom_dec (volatile global long * p );
Original file line number Diff line number Diff line change 9
9
#include <clc/clcfunc.h>
10
10
#include <clc/clctypes.h>
11
11
12
- // cl_khr_global_int32_base_atomics
12
+ #ifdef cl_khr_global_int32_base_atomics
13
13
_CLC_OVERLOAD _CLC_DECL int atom_inc (volatile global int * p );
14
14
_CLC_OVERLOAD _CLC_DECL unsigned int atom_inc (volatile global unsigned int * p );
15
+ #endif // cl_khr_global_int32_base_atomics
15
16
16
- // cl_khr_local_int32_base_atomics
17
+ #ifdef cl_khr_local_int32_base_atomics
17
18
_CLC_OVERLOAD _CLC_DECL int atom_inc (volatile local int * p );
18
19
_CLC_OVERLOAD _CLC_DECL unsigned int atom_inc (volatile local unsigned int * p );
20
+ #endif // cl_khr_local_int32_base_atomics
19
21
20
22
#ifdef cl_khr_int64_base_atomics
21
23
_CLC_OVERLOAD _CLC_DECL long atom_inc (volatile global long * p );
Original file line number Diff line number Diff line change 6
6
//
7
7
//===----------------------------------------------------------------------===//
8
8
9
- // cl_khr_global_int32_extended_atomics
9
+ #ifdef cl_khr_global_int32_extended_atomics
10
10
#define __CLC_FUNCTION atom_max
11
11
#define __CLC_ADDRESS_SPACE global
12
12
#include <clc/atomic/atom_decl_int32.inc>
13
+ #endif // cl_khr_global_int32_extended_atomics
13
14
14
- // cl_khr_local_int32_extended_atomics
15
+ #ifdef cl_khr_local_int32_extended_atomics
15
16
#define __CLC_FUNCTION atom_max
16
17
#define __CLC_ADDRESS_SPACE local
17
18
#include <clc/atomic/atom_decl_int32.inc>
19
+ #endif // cl_khr_local_int32_extended_atomics
18
20
19
21
#ifdef cl_khr_int64_base_atomics
20
22
#define __CLC_FUNCTION atom_max
Original file line number Diff line number Diff line change 6
6
//
7
7
//===----------------------------------------------------------------------===//
8
8
9
- // cl_khr_global_int32_extended_atomics
9
+ #ifdef cl_khr_global_int32_extended_atomics
10
10
#define __CLC_FUNCTION atom_min
11
11
#define __CLC_ADDRESS_SPACE global
12
12
#include <clc/atomic/atom_decl_int32.inc>
13
+ #endif // cl_khr_global_int32_extended_atomics
13
14
14
- // cl_khr_local_int32_extended_atomics
15
+ #ifdef cl_khr_local_int32_extended_atomics
15
16
#define __CLC_FUNCTION atom_min
16
17
#define __CLC_ADDRESS_SPACE local
17
18
#include <clc/atomic/atom_decl_int32.inc>
19
+ #endif // cl_khr_local_int32_extended_atomics
18
20
19
21
#ifdef cl_khr_int64_base_atomics
20
22
#define __CLC_FUNCTION atom_min
Original file line number Diff line number Diff line change 6
6
//
7
7
//===----------------------------------------------------------------------===//
8
8
9
- // cl_khr_global_int32_extended_atomics
9
+ #ifdef cl_khr_global_int32_extended_atomics
10
10
#define __CLC_FUNCTION atom_or
11
11
#define __CLC_ADDRESS_SPACE global
12
12
#include <clc/atomic/atom_decl_int32.inc>
13
+ #endif // cl_khr_global_int32_extended_atomics
13
14
14
- // cl_khr_local_int32_extended_atomics
15
+ #ifdef cl_khr_local_int32_extended_atomics
15
16
#define __CLC_FUNCTION atom_or
16
17
#define __CLC_ADDRESS_SPACE local
17
18
#include <clc/atomic/atom_decl_int32.inc>
19
+ #endif // cl_khr_local_int32_extended_atomics
18
20
19
21
#ifdef cl_khr_int64_base_atomics
20
22
#define __CLC_FUNCTION atom_or
Original file line number Diff line number Diff line change 6
6
//
7
7
//===----------------------------------------------------------------------===//
8
8
9
- // cl_khr_global_int32_base_atomics
9
+ #ifdef cl_khr_global_int32_base_atomics
10
10
#define __CLC_FUNCTION atom_sub
11
11
#define __CLC_ADDRESS_SPACE global
12
12
#include <clc/atomic/atom_decl_int32.inc>
13
+ #endif // cl_khr_global_int32_base_atomics
13
14
14
- // cl_khr_local_int32_base_atomics
15
+ #ifdef cl_khr_local_int32_base_atomics
15
16
#define __CLC_FUNCTION atom_sub
16
17
#define __CLC_ADDRESS_SPACE local
17
18
#include <clc/atomic/atom_decl_int32.inc>
19
+ #endif // cl_khr_local_int32_base_atomics
18
20
19
21
#ifdef cl_khr_int64_base_atomics
20
22
#define __CLC_FUNCTION atom_sub
Original file line number Diff line number Diff line change 6
6
//
7
7
//===----------------------------------------------------------------------===//
8
8
9
- // cl_khr_global_int32_base_atomics
9
+ #ifdef cl_khr_global_int32_base_atomics
10
10
#define __CLC_FUNCTION atom_xchg
11
11
#define __CLC_ADDRESS_SPACE global
12
12
#include <clc/atomic/atom_decl_int32.inc>
13
+ #endif // cl_khr_global_int32_base_atomics
13
14
14
- // cl_khr_local_int32_base_atomics
15
+ #ifdef cl_khr_local_int32_base_atomics
15
16
#define __CLC_FUNCTION atom_xchg
16
17
#define __CLC_ADDRESS_SPACE local
17
18
#include <clc/atomic/atom_decl_int32.inc>
19
+ #endif // cl_khr_local_int32_base_atomics
18
20
19
21
#ifdef cl_khr_int64_base_atomics
20
22
#define __CLC_FUNCTION atom_xchg
Original file line number Diff line number Diff line change 6
6
//
7
7
//===----------------------------------------------------------------------===//
8
8
9
- // cl_khr_global_int32_extended_atomics
9
+ #ifdef cl_khr_global_int32_extended_atomics
10
10
#define __CLC_FUNCTION atom_xor
11
11
#define __CLC_ADDRESS_SPACE global
12
12
#include <clc/atomic/atom_decl_int32.inc>
13
+ #endif // cl_khr_global_int32_extended_atomics
13
14
14
- // cl_khr_local_int32_extended_atomics
15
+ #ifdef cl_khr_local_int32_extended_atomics
15
16
#define __CLC_FUNCTION atom_xor
16
17
#define __CLC_ADDRESS_SPACE local
17
18
#include <clc/atomic/atom_decl_int32.inc>
19
+ #endif // cl_khr_local_int32_extended_atomics
18
20
19
21
#ifdef cl_khr_int64_base_atomics
20
22
#define __CLC_FUNCTION atom_xor
Original file line number Diff line number Diff line change 8
8
9
9
#include <clc/atomic/atom_add.h>
10
10
11
- // cl_khr_global_int32_base_atomics
11
+ #ifdef cl_khr_global_int32_base_atomics
12
12
#define __CLC_ATOMIC_OP add
13
13
#define __CLC_ATOMIC_ADDRESS_SPACE global
14
14
#include "atom_int32_binary.inc"
15
+ #endif // cl_khr_global_int32_base_atomics
15
16
16
- // cl_khr_local_int32_base_atomics
17
+ #ifdef cl_khr_local_int32_base_atomics
17
18
#define __CLC_ATOMIC_OP add
18
19
#define __CLC_ATOMIC_ADDRESS_SPACE local
19
20
#include "atom_int32_binary.inc"
21
+ #endif // cl_khr_local_int32_base_atomics
20
22
21
23
#ifdef cl_khr_int64_base_atomics
22
24
Original file line number Diff line number Diff line change 8
8
9
9
#include <clc/atomic/atom_and.h>
10
10
11
- // cl_khr_global_int32_extended_atomics
11
+ #ifdef cl_khr_global_int32_extended_atomics
12
12
#define __CLC_ATOMIC_OP and
13
13
#define __CLC_ATOMIC_ADDRESS_SPACE global
14
14
#include "atom_int32_binary.inc"
15
+ #endif // cl_khr_global_int32_extended_atomics
15
16
16
- // cl_khr_local_int32_extended_atomics
17
+ #ifdef cl_khr_local_int32_extended_atomics
17
18
#define __CLC_ATOMIC_OP and
18
19
#define __CLC_ATOMIC_ADDRESS_SPACE local
19
20
#include "atom_int32_binary.inc"
21
+ #endif // cl_khr_local_int32_extended_atomics
20
22
21
23
#ifdef cl_khr_int64_extended_atomics
22
24
@@ -31,4 +33,4 @@ IMPL(local, long)
31
33
IMPL (local , unsigned long )
32
34
#undef IMPL
33
35
34
- #endif // cl_khr_local_int32_extended_atomics
36
+ #endif #ifdef cl_khr_local_int32_extended_atomics
Original file line number Diff line number Diff line change 15
15
return atomic_cmpxchg(p, cmp, val); \
16
16
}
17
17
18
- // cl_khr_global_int32_base_atomics
18
+ #ifdef cl_khr_global_int32_base_atomics
19
19
IMPL (global , int )
20
20
IMPL (global , unsigned int )
21
- // cl_khr_local_int32_base_atomics
21
+ #endif // cl_khr_global_int32_base_atomics
22
+ #ifdef cl_khr_local_int32_base_atomics
22
23
IMPL (local , int )
23
24
IMPL (local , unsigned int )
25
+ #endif // cl_khr_local_int32_base_atomics
26
+
24
27
#undef IMPL
25
28
26
29
#ifdef cl_khr_int64_base_atomics
Original file line number Diff line number Diff line change 15
15
return atomic_dec(p); \
16
16
}
17
17
18
- // cl_khr_global_int32_base_atomics
18
+ #ifdef cl_khr_global_int32_base_atomics
19
19
IMPL (global , int )
20
20
IMPL (global , unsigned int )
21
- // cl_khr_local_int32_base_atomics
21
+ #endif // cl_khr_global_int32_base_atomics
22
+ #ifdef cl_khr_local_int32_base_atomics
22
23
IMPL (local , int )
23
24
IMPL (local , unsigned int )
25
+ #endif // cl_khr_local_int32_base_atomics
26
+
24
27
#undef IMPL
25
28
26
29
#ifdef cl_khr_int64_base_atomics
Original file line number Diff line number Diff line change 15
15
return atomic_inc(p); \
16
16
}
17
17
18
- // cl_khr_global_int32_base_atomics
18
+ #ifdef cl_khr_global_int32_base_atomics
19
19
IMPL (global , int )
20
20
IMPL (global , unsigned int )
21
- // cl_khr_local_int32_base_atomics
21
+ #endif // cl_khr_global_int32_base_atomics
22
+ #ifdef cl_khr_local_int32_base_atomics
22
23
IMPL (local , int )
23
24
IMPL (local , unsigned int )
25
+ #endif // cl_khr_local_int32_base_atomics
26
+
24
27
#undef IMPL
25
28
26
29
#ifdef cl_khr_int64_base_atomics
Original file line number Diff line number Diff line change 8
8
9
9
#include <clc/atomic/atom_max.h>
10
10
11
- // cl_khr_global_int32_extended_atomics
11
+ #ifdef cl_khr_global_int32_extended_atomics
12
12
#define __CLC_ATOMIC_OP max
13
13
#define __CLC_ATOMIC_ADDRESS_SPACE global
14
14
#include "atom_int32_binary.inc"
15
+ #endif // cl_khr_global_int32_extended_atomics
15
16
16
- // cl_khr_local_int32_extended_atomics
17
+ #ifdef cl_khr_local_int32_extended_atomics
17
18
#define __CLC_ATOMIC_OP max
18
19
#define __CLC_ATOMIC_ADDRESS_SPACE local
19
20
#include "atom_int32_binary.inc"
21
+ #endif // cl_khr_local_int32_extended_atomics
20
22
21
23
#ifdef cl_khr_int64_extended_atomics
22
24
Original file line number Diff line number Diff line change 8
8
9
9
#include <clc/atomic/atom_min.h>
10
10
11
- // cl_khr_global_int32_extended_atomics
11
+ #ifdef cl_khr_global_int32_extended_atomics
12
12
#define __CLC_ATOMIC_OP min
13
13
#define __CLC_ATOMIC_ADDRESS_SPACE global
14
14
#include "atom_int32_binary.inc"
15
+ #endif // cl_khr_global_int32_extended_atomics
15
16
16
- // cl_khr_local_int32_extended_atomics
17
+ #ifdef cl_khr_local_int32_extended_atomics
17
18
#define __CLC_ATOMIC_OP min
18
19
#define __CLC_ATOMIC_ADDRESS_SPACE local
19
20
#include "atom_int32_binary.inc"
21
+ #endif // cl_khr_local_int32_extended_atomics
20
22
21
23
#ifdef cl_khr_int64_extended_atomics
22
24
Original file line number Diff line number Diff line change 8
8
9
9
#include <clc/atomic/atom_or.h>
10
10
11
- // cl_khr_global_int32_extended_atomics
11
+ #ifdef cl_khr_global_int32_extended_atomics
12
12
#define __CLC_ATOMIC_OP or
13
13
#define __CLC_ATOMIC_ADDRESS_SPACE global
14
14
#include "atom_int32_binary.inc"
15
+ #endif // cl_khr_global_int32_extended_atomics
15
16
16
- // cl_khr_local_int32_extended_atomics
17
+ #ifdef cl_khr_local_int32_extended_atomics
17
18
#define __CLC_ATOMIC_OP or
18
19
#define __CLC_ATOMIC_ADDRESS_SPACE local
19
20
#include "atom_int32_binary.inc"
21
+ #endif // cl_khr_local_int32_extended_atomics
20
22
21
23
#ifdef cl_khr_int64_extended_atomics
22
24
Original file line number Diff line number Diff line change 8
8
9
9
#include <clc/atomic/atom_sub.h>
10
10
11
- // cl_khr_global_int32_base_atomics
11
+ #ifdef cl_khr_global_int32_base_atomics
12
12
#define __CLC_ATOMIC_OP sub
13
13
#define __CLC_ATOMIC_ADDRESS_SPACE global
14
14
#include "atom_int32_binary.inc"
15
+ #endif // cl_khr_global_int32_base_atomics
15
16
16
- // cl_khr_local_int32_base_atomics
17
+ #ifdef cl_khr_local_int32_base_atomics
17
18
#define __CLC_ATOMIC_OP sub
18
19
#define __CLC_ATOMIC_ADDRESS_SPACE local
19
20
#include "atom_int32_binary.inc"
21
+ #endif // cl_khr_local_int32_base_atomics
20
22
21
23
#ifdef cl_khr_int64_base_atomics
22
24
You can’t perform that action at this time.
0 commit comments