Skip to content

Commit 4f36401

Browse files
author
Martin Klang
committed
use header guards for non-ARM trigonometrics
1 parent fb702d3 commit 4f36401

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

SoulSource/SoulPatch.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@
1818

1919
#include <limits>
2020
namespace owl {
21-
inline float sqrt(float x){ return arm_sqrtf(x); }
2221
inline float pow(float x, float y){ return fast_powf(x, y); }
2322
inline float exp(float x){ return fast_expf(x); }
2423
inline float log(float x){ return fast_logf(x); }
2524
inline float log10(float x){ return fast_log10f(x); }
25+
#ifdef ARM_CORTEX
26+
inline float sqrt(float x){ return arm_sqrtf(x); }
2627
inline float sin(float x){ return arm_sin_f32(x); }
2728
inline float cos(float x){ return arm_cos_f32(x); }
29+
#else
30+
inline float sqrt(float x){ return std::sqrt(x); }
31+
inline float sin(float x){ return std::sin(x); }
32+
inline float cos(float x){ return std::cos(x); }
33+
#endif
2834
inline float tan(float x){ return std::tan(x); }
2935
inline float sinh(float x){ return std::sinh(x); }
3036
inline float cosh(float x){ return std::cosh(x); }

0 commit comments

Comments
 (0)