Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions libclc/clc/include/clc/atomic/atomic_decl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@

#ifdef __CLC_NO_VALUE_ARG
#define __CLC_DECLARE_ATOMIC(ADDRSPACE) \
_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION( \
_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION( \
volatile ADDRSPACE __CLC_GENTYPE *Ptr, int MemoryOrder, \
int MemoryScope);
#elif defined(__CLC_RETURN_VOID)
#define __CLC_DECLARE_ATOMIC(ADDRSPACE) \
_CLC_OVERLOAD _CLC_DECL void FUNCTION(volatile ADDRSPACE __CLC_GENTYPE *Ptr, \
__CLC_GENTYPE Value, int MemoryOrder, \
int MemoryScope);
_CLC_OVERLOAD _CLC_DECL void __CLC_FUNCTION( \
volatile ADDRSPACE __CLC_GENTYPE *Ptr, __CLC_GENTYPE Value, \
int MemoryOrder, int MemoryScope);
#elif defined(__CLC_COMPARE_EXCHANGE)
#define __CLC_DECLARE_ATOMIC(ADDRSPACE) \
_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION( \
_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION( \
volatile ADDRSPACE __CLC_GENTYPE *Ptr, __CLC_GENTYPE Comparator, \
__CLC_GENTYPE Value, int MemoryOrderEqual, int MemoryOrderUnequal, \
int MemoryScope);
#else
#define __CLC_DECLARE_ATOMIC(ADDRSPACE) \
_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION( \
_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION( \
volatile ADDRSPACE __CLC_GENTYPE *Ptr, __CLC_GENTYPE Value, \
int MemoryOrder, int MemoryScope);
#endif
Expand Down
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_compare_exchange.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_compare_exchange
#define __CLC_FUNCTION __clc_atomic_compare_exchange
#define __CLC_COMPARE_EXCHANGE

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
Expand All @@ -21,6 +21,6 @@
#include <clc/math/gentype.inc>

#undef __CLC_COMPARE_EXCHANGE
#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_COMPARE_EXCHANGE_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_dec.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_dec
#define __CLC_FUNCTION __clc_atomic_dec
#define __CLC_NO_VALUE_ARG

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/integer/gentype.inc>

#undef __CLC_NO_VALUE_ARG
#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_DEC_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_exchange.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_exchange
#define __CLC_FUNCTION __clc_atomic_exchange

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/integer/gentype.inc>

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/math/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_EXCHANGE_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_fetch_add.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_fetch_add
#define __CLC_FUNCTION __clc_atomic_fetch_add

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/integer/gentype.inc>

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/math/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_FETCH_ADD_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_fetch_and.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_fetch_and
#define __CLC_FUNCTION __clc_atomic_fetch_and

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/integer/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_FETCH_AND_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_fetch_max.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_fetch_max
#define __CLC_FUNCTION __clc_atomic_fetch_max

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/integer/gentype.inc>

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/math/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_FETCH_MAX_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_fetch_min.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_fetch_min
#define __CLC_FUNCTION __clc_atomic_fetch_min

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/integer/gentype.inc>

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/math/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_FETCH_MIN_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_fetch_or.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_fetch_or
#define __CLC_FUNCTION __clc_atomic_fetch_or

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/integer/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_FETCH_OR_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_fetch_sub.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_fetch_sub
#define __CLC_FUNCTION __clc_atomic_fetch_sub

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/integer/gentype.inc>

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/math/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_FETCH_SUB_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_fetch_xor.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_fetch_xor
#define __CLC_FUNCTION __clc_atomic_fetch_xor

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/integer/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_FETCH_XOR_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_inc
#define __CLC_FUNCTION __clc_atomic_inc
#define __CLC_NO_VALUE_ARG

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
#include <clc/integer/gentype.inc>

#undef __CLC_NO_VALUE_ARG
#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_INC_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_load.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_load
#define __CLC_FUNCTION __clc_atomic_load
#define __CLC_NO_VALUE_ARG

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
Expand All @@ -21,6 +21,6 @@
#include <clc/math/gentype.inc>

#undef __CLC_NO_VALUE_ARG
#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_LOAD_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/atomic/clc_atomic_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <clc/internal/clc.h>

#define FUNCTION __clc_atomic_store
#define __CLC_FUNCTION __clc_atomic_store
#define __CLC_RETURN_VOID

#define __CLC_BODY <clc/atomic/atomic_decl.inc>
Expand All @@ -21,6 +21,6 @@
#include <clc/math/gentype.inc>

#undef __CLC_RETURN_VOID
#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_ATOMIC_CLC_ATOMIC_STORE_H__
60 changes: 30 additions & 30 deletions libclc/clc/include/clc/clcmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,58 +12,58 @@
#include <clc/internal/clc.h>
#include <clc/utils.h>

#define _CLC_V_V_VP_VECTORIZE(DECLSPEC, RET_TYPE, FUNCTION, ARG1_TYPE, \
#define _CLC_V_V_VP_VECTORIZE(DECLSPEC, RET_TYPE, __CLC_FUNCTION, ARG1_TYPE, \
ADDR_SPACE, ARG2_TYPE) \
DECLSPEC __CLC_XCONCAT(RET_TYPE, 2) \
FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 2) x, \
ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 2) * y) { \
__CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 2) x, \
ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 2) * y) { \
ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
return (__CLC_XCONCAT(RET_TYPE, 2))(FUNCTION(x.s0, ptr), \
FUNCTION(x.s1, ptr + 1)); \
return (__CLC_XCONCAT(RET_TYPE, 2))(__CLC_FUNCTION(x.s0, ptr), \
__CLC_FUNCTION(x.s1, ptr + 1)); \
} \
\
DECLSPEC __CLC_XCONCAT(RET_TYPE, 3) \
FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 3) x, \
ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 3) * y) { \
__CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 3) x, \
ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 3) * y) { \
ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
return (__CLC_XCONCAT(RET_TYPE, 3))(FUNCTION(x.s0, ptr), \
FUNCTION(x.s1, ptr + 1), \
FUNCTION(x.s2, ptr + 2)); \
return (__CLC_XCONCAT(RET_TYPE, 3))(__CLC_FUNCTION(x.s0, ptr), \
__CLC_FUNCTION(x.s1, ptr + 1), \
__CLC_FUNCTION(x.s2, ptr + 2)); \
} \
\
DECLSPEC __CLC_XCONCAT(RET_TYPE, 4) \
FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 4) x, \
ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 4) * y) { \
__CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 4) x, \
ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 4) * y) { \
ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
return (__CLC_XCONCAT(RET_TYPE, 4))( \
FUNCTION(x.s0, ptr), FUNCTION(x.s1, ptr + 1), FUNCTION(x.s2, ptr + 2), \
FUNCTION(x.s3, ptr + 3)); \
__CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \
__CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3)); \
} \
\
DECLSPEC __CLC_XCONCAT(RET_TYPE, 8) \
FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 8) x, \
ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 8) * y) { \
__CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 8) x, \
ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 8) * y) { \
ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
return (__CLC_XCONCAT(RET_TYPE, 8))( \
FUNCTION(x.s0, ptr), FUNCTION(x.s1, ptr + 1), FUNCTION(x.s2, ptr + 2), \
FUNCTION(x.s3, ptr + 3), FUNCTION(x.s4, ptr + 4), \
FUNCTION(x.s5, ptr + 5), FUNCTION(x.s6, ptr + 6), \
FUNCTION(x.s7, ptr + 7)); \
__CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \
__CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3), \
__CLC_FUNCTION(x.s4, ptr + 4), __CLC_FUNCTION(x.s5, ptr + 5), \
__CLC_FUNCTION(x.s6, ptr + 6), __CLC_FUNCTION(x.s7, ptr + 7)); \
} \
\
DECLSPEC __CLC_XCONCAT(RET_TYPE, 16) \
FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 16) x, \
ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 16) * y) { \
__CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 16) x, \
ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 16) * y) { \
ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
return (__CLC_XCONCAT(RET_TYPE, 16))( \
FUNCTION(x.s0, ptr), FUNCTION(x.s1, ptr + 1), FUNCTION(x.s2, ptr + 2), \
FUNCTION(x.s3, ptr + 3), FUNCTION(x.s4, ptr + 4), \
FUNCTION(x.s5, ptr + 5), FUNCTION(x.s6, ptr + 6), \
FUNCTION(x.s7, ptr + 7), FUNCTION(x.s8, ptr + 8), \
FUNCTION(x.s9, ptr + 9), FUNCTION(x.sa, ptr + 10), \
FUNCTION(x.sb, ptr + 11), FUNCTION(x.sc, ptr + 12), \
FUNCTION(x.sd, ptr + 13), FUNCTION(x.se, ptr + 14), \
FUNCTION(x.sf, ptr + 15)); \
__CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \
__CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3), \
__CLC_FUNCTION(x.s4, ptr + 4), __CLC_FUNCTION(x.s5, ptr + 5), \
__CLC_FUNCTION(x.s6, ptr + 6), __CLC_FUNCTION(x.s7, ptr + 7), \
__CLC_FUNCTION(x.s8, ptr + 8), __CLC_FUNCTION(x.s9, ptr + 9), \
__CLC_FUNCTION(x.sa, ptr + 10), __CLC_FUNCTION(x.sb, ptr + 11), \
__CLC_FUNCTION(x.sc, ptr + 12), __CLC_FUNCTION(x.sd, ptr + 13), \
__CLC_FUNCTION(x.se, ptr + 14), __CLC_FUNCTION(x.sf, ptr + 15)); \
}

#endif // __CLC_CLCMACRO_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/common/clc_degrees.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#define __CLC_COMMON_CLC_DEGREES_H__

#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION __clc_degrees
#define __CLC_FUNCTION __clc_degrees

#include <clc/math/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_COMMON_CLC_DEGREES_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/common/clc_radians.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#define __CLC_COMMON_CLC_RADIANS_H__

#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION __clc_radians
#define __CLC_FUNCTION __clc_radians

#include <clc/math/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_COMMON_CLC_RADIANS_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/common/clc_sign.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#ifndef __CLC_COMMON_CLC_SIGN_H__
#define __CLC_COMMON_CLC_SIGN_H__

#define FUNCTION __clc_sign
#define __CLC_FUNCTION __clc_sign
#define __CLC_BODY <clc/math/unary_decl.inc>

#include <clc/math/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_COMMON_CLC_SIGN_H__
4 changes: 2 additions & 2 deletions libclc/clc/include/clc/common/clc_step.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#ifndef __CLC_COMMON_CLC_STEP_H__
#define __CLC_COMMON_CLC_STEP_H__

#define FUNCTION __clc_step
#define __CLC_FUNCTION __clc_step
#define __CLC_BODY <clc/shared/binary_decl.inc>

#include <clc/math/gentype.inc>

#undef FUNCTION
#undef __CLC_FUNCTION

#endif // __CLC_COMMON_CLC_STEP_H__
2 changes: 1 addition & 1 deletion libclc/clc/include/clc/geometric/binary_decl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
__CLC_VECSIZE_OR_1 == 3 || __CLC_VECSIZE_OR_1 == 4)

_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_SCALAR_GENTYPE
FUNCTION(__CLC_GENTYPE a, __CLC_GENTYPE b);
__CLC_FUNCTION(__CLC_GENTYPE a, __CLC_GENTYPE b);

#endif
Loading
Loading