Skip to content

Commit

Permalink
Only use SSE2 on intel based platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
uyjulian committed Nov 20, 2021
1 parent 48d2d75 commit 3627263
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ResampleImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,9 @@ void TVPResampleImage( const tTVPRect &cliprect, tTVPBaseBitmap *dest, const tTV
TVPResampleImageSSE2( clip, func, dest, destrect, src, srcrect, type, typeopt );
} else
#endif
#if defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)
TVPResampleImageSSE2( clip, func, dest, destrect, src, srcrect, type, typeopt );
#if 0
#else
{
// Cバージョンは固定小数点版なし。遅くなる。
switch( type ) {
Expand Down
2 changes: 2 additions & 0 deletions ResampleImageSSE2.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@


#if defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)
#define _USE_MATH_DEFINES

#include "tjsCommHead.h"
Expand Down Expand Up @@ -1209,4 +1210,5 @@ void TVPResampleImageSSE2( const tTVPResampleClipping &clip, const tTVPImageCopy
break;
}
}
#endif

2 changes: 2 additions & 0 deletions x86simdutil.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@


#if defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)
#pragma warning(push)
#pragma warning(disable:4305)
#define USE_SSE2
#include "sse_mathfun.h"
#undef USE_SSE2
#pragma warning(pop)
#endif

0 comments on commit 3627263

Please sign in to comment.