mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Optimizer IM_FIXNORMAL2F.
This commit is contained in:
@@ -396,6 +396,12 @@ static inline float ImRsqrt(float x) { return _mm_cvtss_f32(_mm_rsqrt
|
||||
static inline float ImRsqrt(float x) { return 1.0f / sqrtf(x); }
|
||||
#endif
|
||||
static inline double ImRsqrt(double x) { return 1.0 / sqrt(x); }
|
||||
#if defined __SSE__ || defined __x86_64__ || defined _M_X64
|
||||
static inline float ImRecip(float x) { return _mm_cvtss_f32(_mm_rcp_ps(_mm_set_ss(x))); }
|
||||
#else
|
||||
static inline float ImRecip(float x) { return 1.0f / x; }
|
||||
#endif
|
||||
static inline double ImRecip(double x) { return 1.0 / x; }
|
||||
#endif
|
||||
// - ImMin/ImMax/ImClamp/ImLerp/ImSwap are used by widgets which support variety of types: signed/unsigned int/long long float/double
|
||||
// (Exceptionally using templates here but we could also redefine them for those types)
|
||||
|
||||
Reference in New Issue
Block a user