Merge 'master' into 'amd-master'

Change-Id: I9b15fd04a369c32b6c9bef1c0d67a90b28dfe69b
This commit is contained in:
Jenkins
2017-11-24 04:10:50 -06:00
+9 -4
View File
@@ -23,6 +23,11 @@ THE SOFTWARE.
#include <hc_math.hpp>
#include "device_util.h"
extern "C" float __ocml_floor_f32(float);
extern "C" float __ocml_rint_f32(float);
extern "C" float __ocml_ceil_f32(float);
extern "C" float __ocml_trunc_f32(float);
struct holder64Bit{
union{
double d;
@@ -151,19 +156,19 @@ __device__ long long int __double_as_longlong(double x)
__device__ int __float2int_rd(float x)
{
return (int)x;
return (int)__ocml_floor_f32(x);
}
__device__ int __float2int_rn(float x)
{
return (int)x;
return (int)__ocml_rint_f32(x);
}
__device__ int __float2int_ru(float x)
{
return (int)x;
return (int)__ocml_ceil_f32(x);
}
__device__ int __float2int_rz(float x)
{
return (int)x;
return (int)__ocml_trunc_f32(x);
}
__device__ long long int __float2ll_rd(float x)