OpenCL C lang says that trunc rounds towards zero. llvm.trunc.* intrinsic rounds to integer not larger in magnitude. These definitions are equivalent. Patch by: Jan Vesely Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 197769
10 lines
195 B
C
10 lines
195 B
C
#undef trunc
|
|
#define trunc __clc_trunc
|
|
|
|
#define __CLC_FUNCTION __clc_trunc
|
|
#define __CLC_INTRINSIC "llvm.trunc"
|
|
#include <clc/math/unary_intrin.inc>
|
|
|
|
#undef __CLC_FUNCTION
|
|
#undef __CLC_INTRINSIC
|