diff options
Diffstat (limited to 'driver/runtime/rs_cl.c')
| -rw-r--r-- | driver/runtime/rs_cl.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/driver/runtime/rs_cl.c b/driver/runtime/rs_cl.c index 3296eede..32941544 100644 --- a/driver/runtime/rs_cl.c +++ b/driver/runtime/rs_cl.c @@ -588,13 +588,16 @@ extern float __attribute__((overloadable)) rsqrt(float v) { return 1.f / sqrt(v); } -#if !defined(__i386__) && !defined(__x86_64__) +#if (!defined(__i386__) && !defined(__x86_64__)) || defined(RS_DEBUG_RUNTIME) +// These functions must be defined here if we are not using the SSE +// implementation, which includes when we are built as part of the +// debug runtime (libclcore_debug.bc). FN_FUNC_FN(sqrt) #else extern float2 __attribute__((overloadable)) sqrt(float2); extern float3 __attribute__((overloadable)) sqrt(float3); extern float4 __attribute__((overloadable)) sqrt(float4); -#endif // !defined(__i386__) && !defined(__x86_64__) +#endif // (!defined(__i386__) && !defined(__x86_64__)) || defined(RS_DEBUG_RUNTIME) FN_FUNC_FN(rsqrt) @@ -926,7 +929,10 @@ extern float4 __attribute__((overloadable)) cross(float4 lhs, float4 rhs) { return r; } -#if !defined(__i386__) && !defined(__x86_64__) +#if (!defined(__i386__) && !defined(__x86_64__)) || defined(RS_DEBUG_RUNTIME) +// These functions must be defined here if we are not using the SSE +// implementation, which includes when we are built as part of the +// debug runtime (libclcore_debug.bc). extern float __attribute__((overloadable)) dot(float lhs, float rhs) { return lhs * rhs; @@ -961,7 +967,7 @@ extern float __attribute__((overloadable)) length(float2 v); extern float __attribute__((overloadable)) length(float3 v); extern float __attribute__((overloadable)) length(float4 v); -#endif // !defined(__i386__) && !defined(__x86_64__) +#endif // (!defined(__i386__) && !defined(__x86_64__)) || defined(RS_DEBUG_RUNTIME) extern float __attribute__((overloadable)) distance(float lhs, float rhs) { return length(lhs - rhs); |
