Skip to content

Commit fa9cd47

Browse files
authored
[NFC][libclc] Rename __CLC_FUNCTION to either FUNCTION or __IMPL_FUNCTION (#146999)
Rename to FUNCTION if it is for declaration, since it doesn't make much sense to use __CLC_FUNCTION for OpenCL function declaration. Rename to __IMPL_FUNCTION if it is for definition, since in some cases implementation function isn't clc_* function.
1 parent eeba57a commit fa9cd47

File tree

352 files changed

+716
-723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

352 files changed

+716
-723
lines changed

libclc/clc/include/clc/common/clc_degrees.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#define __CLC_COMMON_CLC_DEGREES_H__
1111

1212
#define __CLC_BODY <clc/math/unary_decl.inc>
13-
#define __CLC_FUNCTION __clc_degrees
13+
#define FUNCTION __clc_degrees
1414

1515
#include <clc/math/gentype.inc>
1616

17-
#undef __CLC_FUNCTION
17+
#undef FUNCTION
1818

1919
#endif // __CLC_COMMON_CLC_DEGREES_H__

libclc/clc/include/clc/common/clc_radians.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#define __CLC_COMMON_CLC_RADIANS_H__
1111

1212
#define __CLC_BODY <clc/math/unary_decl.inc>
13-
#define __CLC_FUNCTION __clc_radians
13+
#define FUNCTION __clc_radians
1414

1515
#include <clc/math/gentype.inc>
1616

17-
#undef __CLC_FUNCTION
17+
#undef FUNCTION
1818

1919
#endif // __CLC_COMMON_CLC_RADIANS_H__

libclc/clc/include/clc/common/clc_sign.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
#ifndef __CLC_COMMON_CLC_SIGN_H__
1010
#define __CLC_COMMON_CLC_SIGN_H__
1111

12-
#define __CLC_FUNCTION __clc_sign
12+
#define FUNCTION __clc_sign
1313
#define __CLC_BODY <clc/math/unary_decl.inc>
1414

1515
#include <clc/math/gentype.inc>
1616

17-
#undef __CLC_FUNCTION
17+
#undef FUNCTION
1818

1919
#endif // __CLC_COMMON_CLC_SIGN_H__

libclc/clc/include/clc/common/clc_step.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
#ifndef __CLC_COMMON_CLC_STEP_H__
1010
#define __CLC_COMMON_CLC_STEP_H__
1111

12-
#define __CLC_FUNCTION __clc_step
12+
#define FUNCTION __clc_step
1313
#define __CLC_BODY <clc/shared/binary_decl.inc>
1414

1515
#include <clc/math/gentype.inc>
1616

17-
#undef __CLC_FUNCTION
17+
#undef FUNCTION
1818

1919
#endif // __CLC_COMMON_CLC_STEP_H__

libclc/clc/include/clc/geometric/binary_decl.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#if (__CLC_VECSIZE_OR_1 == 1 || __CLC_VECSIZE_OR_1 == 2 || \
1111
__CLC_VECSIZE_OR_1 == 3 || __CLC_VECSIZE_OR_1 == 4)
1212

13-
_CLC_OVERLOAD _CLC_DECL __CLC_SCALAR_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE a,
14-
__CLC_GENTYPE b);
13+
_CLC_OVERLOAD _CLC_DECL __CLC_SCALAR_GENTYPE FUNCTION(__CLC_GENTYPE a,
14+
__CLC_GENTYPE b);
1515

1616
#endif

libclc/clc/include/clc/geometric/binary_def.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include <clc/utils.h>
1010

11-
#ifndef __CLC_FUNCTION
12-
#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
11+
#ifndef __IMPL_FUNCTION
12+
#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
1313
#endif
1414

1515
// Geometric functions are only defined for scalar, vec2, vec3 and vec4
@@ -18,7 +18,7 @@
1818

1919
_CLC_OVERLOAD _CLC_DEF __CLC_SCALAR_GENTYPE FUNCTION(__CLC_GENTYPE a,
2020
__CLC_GENTYPE b) {
21-
return __CLC_FUNCTION(FUNCTION)(a, b);
21+
return __IMPL_FUNCTION(FUNCTION)(a, b);
2222
}
2323

2424
#endif

libclc/clc/include/clc/geometric/clc_distance.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
#ifndef __CLC_GEOMETRIC_CLC_DISTANCE_H__
1010
#define __CLC_GEOMETRIC_CLC_DISTANCE_H__
1111

12-
#define __CLC_FUNCTION __clc_distance
12+
#define FUNCTION __clc_distance
1313
#define __CLC_BODY <clc/geometric/binary_decl.inc>
1414

1515
#include <clc/math/gentype.inc>
1616

17-
#undef __CLC_FUNCTION
17+
#undef FUNCTION
1818

1919
#endif // __CLC_GEOMETRIC_CLC_DISTANCE_H__

libclc/clc/include/clc/geometric/clc_dot.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
#ifndef __CLC_GEOMETRIC_CLC_DOT_H__
1010
#define __CLC_GEOMETRIC_CLC_DOT_H__
1111

12-
#define __CLC_FUNCTION __clc_dot
12+
#define FUNCTION __clc_dot
1313
#define __CLC_BODY <clc/geometric/binary_decl.inc>
1414

1515
#include <clc/math/gentype.inc>
1616

17-
#undef __CLC_FUNCTION
17+
#undef FUNCTION
1818

1919
#endif // __CLC_GEOMETRIC_CLC_DOT_H__

libclc/clc/include/clc/geometric/clc_fast_distance.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
#define __CLC_GEOMETRIC_CLC_FAST_DISTANCE_H__
1111

1212
#define __FLOAT_ONLY
13-
#define __CLC_FUNCTION __clc_fast_distance
13+
#define FUNCTION __clc_fast_distance
1414
#define __CLC_BODY <clc/geometric/binary_decl.inc>
1515

1616
#include <clc/math/gentype.inc>
1717

18-
#undef __CLC_FUNCTION
18+
#undef FUNCTION
1919

2020
#endif // __CLC_GEOMETRIC_CLC_FAST_DISTANCE_H__

libclc/clc/include/clc/geometric/clc_fast_length.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
#define __CLC_GEOMETRIC_CLC_FAST_LENGTH_H__
1111

1212
#define __FLOAT_ONLY
13-
#define __CLC_FUNCTION __clc_fast_length
13+
#define FUNCTION __clc_fast_length
1414
#define __CLC_BODY <clc/geometric/unary_decl.inc>
1515

1616
#include <clc/math/gentype.inc>
1717

18-
#undef __CLC_FUNCTION
18+
#undef FUNCTION
1919

2020
#endif // __CLC_GEOMETRIC_CLC_FAST_LENGTH_H__

0 commit comments

Comments
 (0)