Merge changes from thekla-atlas.
This commit is contained in:
parent
182a326e1c
commit
befe79d103
@ -53,7 +53,7 @@ namespace nv
|
||||
return (val<0) ? ftoi_ceil_xs(val) : ftoi_floor_xs(val);
|
||||
}
|
||||
|
||||
#if NV_CPU_X86 || NV_CPU_X86_64
|
||||
#if NV_USE_SSE
|
||||
|
||||
NV_FORCEINLINE int ftoi_round_sse(float f) {
|
||||
return _mm_cvt_ss2si(_mm_set_ss(f));
|
||||
@ -63,12 +63,6 @@ namespace nv
|
||||
return _mm_cvtt_ss2si(_mm_set_ss(f));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if NV_USE_SSE
|
||||
|
||||
NV_FORCEINLINE int ftoi_round(float val) {
|
||||
return ftoi_round_sse(val);
|
||||
}
|
||||
|
@ -14,12 +14,6 @@
|
||||
#include <float.h> // finite, isnan
|
||||
#endif
|
||||
|
||||
#if NV_CPU_X86 || NV_CPU_X86_64
|
||||
//#include <intrin.h>
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// Function linkage
|
||||
#if NVMATH_SHARED
|
||||
@ -42,22 +36,26 @@
|
||||
#endif
|
||||
|
||||
#ifndef NV_USE_SSE
|
||||
// 1=SSE, 2=SSE2
|
||||
# if NV_CPU_X86_64
|
||||
// x64 always supports at least SSE2
|
||||
# define NV_USE_SSE 2
|
||||
# elif NV_CC_MSVC && defined(_M_IX86_FP)
|
||||
// Also on x86 with the /arch:SSE flag in MSVC.
|
||||
# define NV_USE_SSE _M_IX86_FP // 1=SSE, 2=SS2
|
||||
# elif defined(__SSE__)
|
||||
# define NV_USE_SSE 1
|
||||
# define NV_USE_SSE _M_IX86_FP
|
||||
# elif defined(__SSE2__)
|
||||
# define NV_USE_SSE 2
|
||||
# elif defined(__SSE__)
|
||||
# define NV_USE_SSE 1
|
||||
# else
|
||||
// Otherwise we assume no SSE.
|
||||
# define NV_USE_SSE 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if NV_USE_SSE
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
|
||||
// Internally set NV_USE_SIMD when either altivec or sse is available.
|
||||
#if NV_USE_ALTIVEC && NV_USE_SSE
|
||||
|
Loading…
Reference in New Issue
Block a user