From 688d9c9a820c3fc8e34fe833e0fde16db8a62b12 Mon Sep 17 00:00:00 2001 From: Evghenii Date: Wed, 5 Feb 2014 13:20:44 +0100 Subject: [PATCH] added support for rsqrtd/rcpd for generic-*.h --- examples/intrinsics/generic-16.h | 10 ++++++++++ examples/intrinsics/generic-32.h | 10 ++++++++++ examples/intrinsics/generic-64.h | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/examples/intrinsics/generic-16.h b/examples/intrinsics/generic-16.h index 0aa8a3f6..3b5c6ec3 100644 --- a/examples/intrinsics/generic-16.h +++ b/examples/intrinsics/generic-16.h @@ -1086,10 +1086,18 @@ static FORCEINLINE float __rsqrt_uniform_float(float v) { return 1.f / sqrtf(v); } +static FORCEINLINE double __rsqrt_uniform_double(double v) { + return 1.0 / sqrt(v); +} + static FORCEINLINE float __rcp_uniform_float(float v) { return 1.f / v; } +static FORCEINLINE double __rcp_uniform_double(double v) { + return 1.0 / v; +} + static FORCEINLINE float __sqrt_uniform_float(float v) { return sqrtf(v); } @@ -1099,7 +1107,9 @@ static FORCEINLINE double __sqrt_uniform_double(double v) { } UNARY_OP(__vec16_f, __rcp_varying_float, __rcp_uniform_float) +UNARY_OP(__vec16_d, __rcp_varying_double, __rcp_uniform_double) UNARY_OP(__vec16_f, __rsqrt_varying_float, __rsqrt_uniform_float) +UNARY_OP(__vec16_d, __rsqrt_varying_double, __rsqrt_uniform_double) UNARY_OP(__vec16_f, __sqrt_varying_float, __sqrt_uniform_float) UNARY_OP(__vec16_d, __sqrt_varying_double, __sqrt_uniform_double) diff --git a/examples/intrinsics/generic-32.h b/examples/intrinsics/generic-32.h index 924b049d..f5bb233c 100644 --- a/examples/intrinsics/generic-32.h +++ b/examples/intrinsics/generic-32.h @@ -1138,10 +1138,18 @@ static FORCEINLINE float __rsqrt_uniform_float(float v) { return 1.f / sqrtf(v); } +static FORCEINLINE double __rsqrt_uniform_double(double v) { + return 1.0 / sqrt(v); +} + static FORCEINLINE float __rcp_uniform_float(float v) { return 1.f / v; } +static FORCEINLINE double __rcp_uniform_double(double v) { + return 1.0 / v; +} + static FORCEINLINE float __sqrt_uniform_float(float v) { return sqrtf(v); } @@ -1151,7 +1159,9 @@ static FORCEINLINE double __sqrt_uniform_double(double v) { } UNARY_OP(__vec32_f, __rcp_varying_float, __rcp_uniform_float) +UNARY_OP(__vec32_d, __rcp_varying_double, __rcp_uniform_double) UNARY_OP(__vec32_f, __rsqrt_varying_float, __rsqrt_uniform_float) +UNARY_OP(__vec32_d, __rsqrt_varying_double, __rsqrt_uniform_double) UNARY_OP(__vec32_f, __sqrt_varying_float, __sqrt_uniform_float) UNARY_OP(__vec32_d, __sqrt_varying_double, __sqrt_uniform_double) diff --git a/examples/intrinsics/generic-64.h b/examples/intrinsics/generic-64.h index b1451c96..a7148c8b 100644 --- a/examples/intrinsics/generic-64.h +++ b/examples/intrinsics/generic-64.h @@ -1271,10 +1271,18 @@ static FORCEINLINE float __rsqrt_uniform_float(float v) { return 1.f / sqrtf(v); } +static FORCEINLINE double __rsqrt_uniform_double(double v) { + return 1.0 / sqrt(v); +} + static FORCEINLINE float __rcp_uniform_float(float v) { return 1.f / v; } +static FORCEINLINE double __rcp_uniform_double(double v) { + return 1.0 / v; +} + static FORCEINLINE float __sqrt_uniform_float(float v) { return sqrtf(v); } @@ -1284,7 +1292,9 @@ static FORCEINLINE double __sqrt_uniform_double(double v) { } UNARY_OP(__vec64_f, __rcp_varying_float, __rcp_uniform_float) +UNARY_OP(__vec64_d, __rcp_varying_double, __rcp_uniform_double) UNARY_OP(__vec64_f, __rsqrt_varying_float, __rsqrt_uniform_float) +UNARY_OP(__vec64_d, __rsqrt_varying_double, __rsqrt_uniform_double) UNARY_OP(__vec64_f, __sqrt_varying_float, __sqrt_uniform_float) UNARY_OP(__vec64_d, __sqrt_varying_double, __sqrt_uniform_double)