Skip to content

Commit c374cb7

Browse files
committed
math: Add erf ported from amd-builtins
The scalar float/double function bodies are a direct copy/paste, aside from the removed (optional) code in float function body that requires subnormals. reviewers: jvesely Patch by: Vedran Miletić <rivanvx@gmail.com> llvm-svn: 268766
1 parent 84a0bf6 commit c374cb7

File tree

4 files changed

+413
-0
lines changed

4 files changed

+413
-0
lines changed

libclc/generic/include/clc/clc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include <clc/math/cos.h>
4848
#include <clc/math/cospi.h>
4949
#include <clc/math/ceil.h>
50+
#include <clc/math/erf.h>
5051
#include <clc/math/erfc.h>
5152
#include <clc/math/exp.h>
5253
#include <clc/math/exp10.h>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#undef erfc
2+
3+
#define __CLC_BODY <clc/math/unary_decl.inc>
4+
#define __CLC_FUNCTION erf
5+
6+
#include <clc/math/gentype.inc>
7+
8+
#undef __CLC_BODY
9+
#undef __CLC_FUNCTION

libclc/generic/lib/SOURCES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ math/copysign.cl
7777
math/cos.cl
7878
math/cospi.cl
7979
math/ep_log.cl
80+
math/erf.cl
8081
math/erfc.cl
8182
math/exp.cl
8283
math/exp_helper.cl

0 commit comments

Comments
 (0)