From 4b94638bd399968c19e2e2f3913839367c0bca4f Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Mon, 1 Feb 2016 14:29:50 +0530 Subject: [PATCH] Add few more single precision intrinsics to hcc_detail/hip_runtime.h --- hipamd/include/hcc_detail/hip_runtime.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hipamd/include/hcc_detail/hip_runtime.h b/hipamd/include/hcc_detail/hip_runtime.h index 9f5c81152a..7dfa70ed66 100644 --- a/hipamd/include/hcc_detail/hip_runtime.h +++ b/hipamd/include/hcc_detail/hip_runtime.h @@ -366,8 +366,20 @@ inline int max(int arg1, int arg2) __attribute((hc,cpu)) { \ //TODO - add a couple fast math operations here, the set here will grow : -__device__ inline float __log2f(float x) {return hc::fast_math::log2(x); }; +__device__ inline float __cosf(float x) {return hc::fast_math::cosf(x); }; +__device__ inline float __expf(float x) {return hc::fast_math::expf(x); }; +__device__ inline float __frsqrt_rn(float x) {return hc::fast_math::rsqrt(x); }; +__device__ inline float __fsqrt_rd(float x) {return hc::fast_math::sqrt(x); }; +__device__ inline float __fsqrt_rn(float x) {return hc::fast_math::sqrt(x); }; +__device__ inline float __fsqrt_ru(float x) {return hc::fast_math::sqrt(x); }; +__device__ inline float __fsqrt_rz(float x) {return hc::fast_math::sqrt(x); }; +__device__ inline float __log10f(float x) {return hc::fast_math::log10f(x); }; +__device__ inline float __log2f(float x) {return hc::fast_math::log2f(x); }; +__device__ inline float __logf(float x) {return hc::fast_math::logf(x); }; __device__ inline float __powf(float base, float exponent) {return hc::fast_math::powf(base, exponent); }; +__device__ inline void __sincosf(float x, float *s, float *c) {return hc::fast_math::sincosf(x, s, c); }; +__device__ inline float __sinf(float x) {return hc::fast_math::sinf(x); }; +__device__ inline float __tanf(float x) {return hc::fast_math::tanf(x); }; /**