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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions libclc/clc/include/clc/math/unary_def_via_fp32.inc

This file was deleted.

26 changes: 7 additions & 19 deletions libclc/clc/lib/generic/math/clc_erf.cl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//

#include <clc/clcmacro.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_exp.h>
#include <clc/math/clc_fabs.h>
Expand Down Expand Up @@ -211,12 +210,6 @@ _CLC_OVERLOAD _CLC_DEF float __clc_erf(float x) {
return ret;
}

#define __FLOAT_ONLY
#define FUNCTION __clc_erf
#define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION

#ifdef cl_khr_fp64

#pragma OPENCL EXTENSION cl_khr_fp64 : enable
Expand Down Expand Up @@ -500,24 +493,19 @@ _CLC_OVERLOAD _CLC_DEF double __clc_erf(double y) {
return y < 0.0 ? -ret : ret;
}

#define __DOUBLE_ONLY
#define FUNCTION __clc_erf
#define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION

#endif

#ifdef cl_khr_fp16

#include <clc/clc_convert.h>

#pragma OPENCL EXTENSION cl_khr_fp16 : enable

// Forward the half version of this builtin onto the float one
#define __HALF_ONLY
#define FUNCTION __clc_erf
#define __CLC_BODY <clc/math/unary_def_via_fp32.inc>
#include <clc/math/gentype.inc>
_CLC_OVERLOAD _CLC_DEF half __clc_erf(half x) {
return (half)__clc_erf((float)x);
}

#endif

#define FUNCTION __clc_erf
#define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
#include <clc/math/gentype.inc>
24 changes: 7 additions & 17 deletions libclc/clc/lib/generic/math/clc_erfc.cl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//

#include <clc/clcmacro.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_exp.h>
#include <clc/math/clc_fabs.h>
Expand Down Expand Up @@ -211,12 +210,6 @@ _CLC_OVERLOAD _CLC_DEF float __clc_erfc(float x) {
return ret;
}

#define __FLOAT_ONLY
#define FUNCTION __clc_erfc
#define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION

#ifdef cl_khr_fp64

#pragma OPENCL EXTENSION cl_khr_fp64 : enable
Expand Down Expand Up @@ -509,12 +502,6 @@ _CLC_OVERLOAD _CLC_DEF double __clc_erfc(double x) {
return ret;
}

#define __DOUBLE_ONLY
#define FUNCTION __clc_erfc
#define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION

#endif

#ifdef cl_khr_fp16
Expand All @@ -524,9 +511,12 @@ _CLC_OVERLOAD _CLC_DEF double __clc_erfc(double x) {
#pragma OPENCL EXTENSION cl_khr_fp16 : enable

// Forward the half version of this builtin onto the float one
#define __HALF_ONLY
#define FUNCTION __clc_erfc
#define __CLC_BODY <clc/math/unary_def_via_fp32.inc>
#include <clc/math/gentype.inc>
_CLC_OVERLOAD _CLC_DEF half __clc_erfc(half x) {
return (half)__clc_erfc((float)x);
}

#endif

#define FUNCTION __clc_erfc
#define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
#include <clc/math/gentype.inc>
26 changes: 7 additions & 19 deletions libclc/clc/lib/generic/math/clc_tgamma.cl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//

#include <clc/clcmacro.h>
#include <clc/float/definitions.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_exp.h>
Expand All @@ -32,12 +31,6 @@ _CLC_OVERLOAD _CLC_DEF float __clc_tgamma(float x) {
return g;
}

#define __FLOAT_ONLY
#define FUNCTION __clc_tgamma
#define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION

#ifdef cl_khr_fp64

#pragma OPENCL EXTENSION cl_khr_fp64 : enable
Expand All @@ -59,24 +52,19 @@ _CLC_OVERLOAD _CLC_DEF double __clc_tgamma(double x) {
return g;
}

#define __DOUBLE_ONLY
#define FUNCTION __clc_tgamma
#define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION

#endif

#ifdef cl_khr_fp16

#include <clc/clc_convert.h>

#pragma OPENCL EXTENSION cl_khr_fp16 : enable

// Forward the half version of this builtin onto the float one
#define __HALF_ONLY
#define FUNCTION __clc_tgamma
#define __CLC_BODY <clc/math/unary_def_via_fp32.inc>
#include <clc/math/gentype.inc>
_CLC_OVERLOAD _CLC_DEF half __clc_tgamma(half x) {
return (half)__clc_tgamma((float)x);
}

#endif

#define FUNCTION __clc_tgamma
#define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
#include <clc/math/gentype.inc>
Loading