Skip to content

Commit

Permalink
math: Add erf ported from amd-builtins
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jvesely committed May 6, 2016
1 parent 84a0bf6 commit c374cb7
Show file tree
Hide file tree
Showing 4 changed files with 413 additions and 0 deletions.
1 change: 1 addition & 0 deletions libclc/generic/include/clc/clc.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <clc/math/cos.h>
#include <clc/math/cospi.h>
#include <clc/math/ceil.h>
#include <clc/math/erf.h>
#include <clc/math/erfc.h>
#include <clc/math/exp.h>
#include <clc/math/exp10.h>
Expand Down
9 changes: 9 additions & 0 deletions libclc/generic/include/clc/math/erf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#undef erfc

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

#include <clc/math/gentype.inc>

#undef __CLC_BODY
#undef __CLC_FUNCTION
1 change: 1 addition & 0 deletions libclc/generic/lib/SOURCES
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ math/copysign.cl
math/cos.cl
math/cospi.cl
math/ep_log.cl
math/erf.cl
math/erfc.cl
math/exp.cl
math/exp_helper.cl
Expand Down
Loading

0 comments on commit c374cb7

Please sign in to comment.