1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-26 20:28:50 -05:00

add #include <immintrin.h> fallback

This commit is contained in:
Evan Pezent 2021-09-07 20:20:12 -07:00
parent 3e96fd7c02
commit 5ed9e78676

View File

@ -51,6 +51,9 @@
#endif #endif
#if defined __SSE__ || defined __x86_64__ || defined _M_X64 #if defined __SSE__ || defined __x86_64__ || defined _M_X64
#ifndef IMGUI_ENABLE_SSE
#include <immintrin.h>
#endif
static IMPLOT_INLINE float ImInvSqrt(float x) { return _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ss(x))); } static IMPLOT_INLINE float ImInvSqrt(float x) { return _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ss(x))); }
#else #else
static IMPLOT_INLINE float ImInvSqrt(float x) { return 1.0f / sqrtf(x); } static IMPLOT_INLINE float ImInvSqrt(float x) { return 1.0f / sqrtf(x); }