Skip to content

[libclc][NFC] Remove unary_builtin.inc #137656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions libclc/clc/include/clc/math/unary_builtin.inc

This file was deleted.

9 changes: 5 additions & 4 deletions libclc/clc/lib/generic/math/clc_ceil.cl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#include <clc/internal/clc.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION __clc_ceil
#define __CLC_BUILTIN __builtin_elementwise_ceil
#include <clc/math/unary_builtin.inc>
#define FUNCTION __clc_ceil
#define __CLC_FUNCTION(x) __builtin_elementwise_ceil
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
9 changes: 5 additions & 4 deletions libclc/clc/lib/generic/math/clc_fabs.cl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#include <clc/internal/clc.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION __clc_fabs
#define __CLC_BUILTIN __builtin_elementwise_abs
#include <clc/math/unary_builtin.inc>
#define FUNCTION __clc_fabs
#define __CLC_FUNCTION(x) __builtin_elementwise_abs
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
9 changes: 5 additions & 4 deletions libclc/clc/lib/generic/math/clc_floor.cl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#include <clc/internal/clc.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION __clc_floor
#define __CLC_BUILTIN __builtin_elementwise_floor
#include <clc/math/unary_builtin.inc>
#define FUNCTION __clc_floor
#define __CLC_FUNCTION(x) __builtin_elementwise_floor
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
9 changes: 5 additions & 4 deletions libclc/clc/lib/generic/math/clc_rint.cl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#include <clc/internal/clc.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION __clc_rint
#define __CLC_BUILTIN __builtin_elementwise_rint
#include <clc/math/unary_builtin.inc>
#define FUNCTION __clc_rint
#define __CLC_FUNCTION(x) __builtin_elementwise_rint
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
9 changes: 5 additions & 4 deletions libclc/clc/lib/generic/math/clc_round.cl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#include <clc/internal/clc.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION __clc_round
#define __CLC_BUILTIN __builtin_elementwise_round
#include <clc/math/unary_builtin.inc>
#define FUNCTION __clc_round
#define __CLC_FUNCTION(x) __builtin_elementwise_round
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
9 changes: 5 additions & 4 deletions libclc/clc/lib/generic/math/clc_trunc.cl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#include <clc/internal/clc.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION __clc_trunc
#define __CLC_BUILTIN __builtin_elementwise_trunc
#include <clc/math/unary_builtin.inc>
#define FUNCTION __clc_trunc
#define __CLC_FUNCTION(x) __builtin_elementwise_trunc
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
8 changes: 4 additions & 4 deletions libclc/generic/lib/math/acos.cl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include <clc/clc.h>
#include <clc/clcmacro.h>
#include <clc/math/clc_acos.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION acos
#include <clc/math/unary_builtin.inc>
#define FUNCTION acos
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
7 changes: 4 additions & 3 deletions libclc/generic/lib/math/acosh.cl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <clc/clc.h>
#include <clc/math/clc_acosh.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION acosh
#include <clc/math/unary_builtin.inc>
#define FUNCTION acosh
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
6 changes: 3 additions & 3 deletions libclc/generic/lib/math/acospi.cl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <clc/clc.h>
#include <clc/math/clc_acospi.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION acospi
#include <clc/math/unary_builtin.inc>
#define FUNCTION acospi
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
8 changes: 4 additions & 4 deletions libclc/generic/lib/math/asin.cl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include <clc/clc.h>
#include <clc/clcmacro.h>
#include <clc/math/clc_asin.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION asin
#include <clc/math/unary_builtin.inc>
#define FUNCTION asin
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
7 changes: 4 additions & 3 deletions libclc/generic/lib/math/asinh.cl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <clc/clc.h>
#include <clc/math/clc_asinh.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION asinh
#include <clc/math/unary_builtin.inc>
#define FUNCTION asinh
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
7 changes: 4 additions & 3 deletions libclc/generic/lib/math/asinpi.cl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <clc/clc.h>
#include <clc/math/clc_asinpi.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION asinpi
#include <clc/math/unary_builtin.inc>
#define FUNCTION asinpi
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
8 changes: 4 additions & 4 deletions libclc/generic/lib/math/atan.cl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include <clc/clc.h>
#include <clc/clcmacro.h>
#include <clc/math/clc_atan.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION atan
#include <clc/math/unary_builtin.inc>
#define FUNCTION atan
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
7 changes: 4 additions & 3 deletions libclc/generic/lib/math/atanh.cl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <clc/clc.h>
#include <clc/math/clc_atanh.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION atanh
#include <clc/math/unary_builtin.inc>
#define FUNCTION atanh
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
7 changes: 4 additions & 3 deletions libclc/generic/lib/math/atanpi.cl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <clc/clc.h>
#include <clc/math/clc_atanpi.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION atanpi
#include <clc/math/unary_builtin.inc>
#define FUNCTION atanpi
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
8 changes: 4 additions & 4 deletions libclc/generic/lib/math/ceil.cl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include <clc/clc.h>
#include <clc/clcmacro.h>
#include <clc/math/clc_ceil.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION ceil
#include <clc/math/unary_builtin.inc>
#define FUNCTION ceil
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
8 changes: 4 additions & 4 deletions libclc/generic/lib/math/fabs.cl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include <clc/clc.h>
#include <clc/clcmacro.h>
#include <clc/math/clc_fabs.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION fabs
#include <clc/math/unary_builtin.inc>
#define FUNCTION fabs
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
8 changes: 4 additions & 4 deletions libclc/generic/lib/math/floor.cl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include <clc/clc.h>
#include <clc/clcmacro.h>
#include <clc/math/clc_floor.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION floor
#include <clc/math/unary_builtin.inc>
#define FUNCTION floor
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
7 changes: 4 additions & 3 deletions libclc/generic/lib/math/log1p.cl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <clc/clc.h>
#include <clc/math/clc_log1p.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION log1p
#include <clc/math/unary_builtin.inc>
#define FUNCTION log1p
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
7 changes: 4 additions & 3 deletions libclc/generic/lib/math/rint.cl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <clc/clc.h>
#include <clc/math/clc_rint.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION rint
#include <clc/math/unary_builtin.inc>
#define FUNCTION rint
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
8 changes: 4 additions & 4 deletions libclc/generic/lib/math/round.cl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include <clc/clc.h>
#include <clc/clcmacro.h>
#include <clc/math/clc_round.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION round
#include <clc/math/unary_builtin.inc>
#define FUNCTION round
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
7 changes: 4 additions & 3 deletions libclc/generic/lib/math/trunc.cl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <clc/clc.h>
#include <clc/math/clc_trunc.h>

#undef __CLC_FUNCTION
#define __CLC_FUNCTION trunc
#include <clc/math/unary_builtin.inc>
#define FUNCTION trunc
#define __CLC_BODY <clc/shared/unary_def.inc>

#include <clc/math/gentype.inc>
Loading