Support building for Windows on 64-bit Arm (#2355)

Support to build for Windows on Arm.
This commit is contained in:
Sreelakshmi Haridas Maruthur
2025-08-12 09:46:23 -06:00
committed by GitHub
parent 4115d04ae0
commit aef863afa2
9 changed files with 86 additions and 49 deletions

View File

@@ -53,17 +53,17 @@
#include "basic_test_conversions.h"
#if defined(_WIN32)
#if defined(_M_IX86) || defined(_M_X64)
#include <mmintrin.h>
#include <emmintrin.h>
#else // !_WIN32
#else
#if defined(__SSE__)
#include <xmmintrin.h>
#endif
#if defined(__SSE2__)
#include <emmintrin.h>
#endif
#endif // _WIN32
#endif
cl_context gContext = NULL;
cl_command_queue gQueue = NULL;

View File

@@ -343,7 +343,7 @@ float DataInfoSpec<InType, OutType, InFP, OutFP>::round_to_int(float f)
volatile float x = f;
float magicVal = magic[f < 0];
#if defined(__SSE__)
#if defined(__SSE__) || _M_IX86_FP == 1
// Defeat x87 based arithmetic, which cant do FTZ, and will round this
// incorrectly
__m128 v = _mm_set_ss(x);
@@ -376,7 +376,7 @@ DataInfoSpec<InType, OutType, InFP, OutFP>::round_to_int_and_clamp(double f)
{
volatile double x = f;
double magicVal = magic[f < 0];
#if defined(__SSE2__) || defined(_MSC_VER)
#if defined(__SSE2__) || _M_IX86_FP == 2 || defined(_M_X64)
// Defeat x87 based arithmetic, which cant do FTZ, and will round this
// incorrectly
__m128d v = _mm_set_sd(x);
@@ -479,7 +479,7 @@ void DataInfoSpec<InType, OutType, InFP, OutFP>::conv(OutType *out, InType *in)
{
if (std::is_same<cl_double, OutType>::value)
{
#if defined(_MSC_VER)
#if defined(_M_IX86) || defined(_M_X64)
double result;
if (std::is_same<cl_ulong, InType>::value)