xtensor-stack / xsimd

C++ wrappers for SIMD intrinsics and parallelized, optimized mathematical functions (SSE, AVX, AVX512, NEON, SVE))
https://xsimd.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2.19k stars 254 forks source link

MSVC compile error for NEON (win/arm64) #611

Open niyas-sait opened 3 years ago

niyas-sait commented 3 years ago

XSIMD library cannot be built using MSVC compiler on a windows/arm64 target.

Steps to reproduce

Visual Studio 2019 or higher is required for compilation.

Compilation can be done natively on a win/arm64 machine or can be cross-compiled from an x86/x64 machine.

From a command terminal

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsx86_arm64.bat

cmake -G "NMake Makefiles" -D DOWNLOAD_GTEST=1 -D CMAKE_BUILD_TYPE=Debug .

nmake test_xsimd

The issue has been noticed while building the apache arrow library and would be required to build an apache arrow for win/arm64 using MSVC.

niyas-sait commented 3 years ago

The main issue seems to be due to MSVC arm/neon intrinsic vector type using the same underlying type for the neon vectors.

e.g: int8x16_t and uint8x16_t maps to __n128 type

This causes a couple of issues

And other issues are

niyas-sait commented 3 years ago

Few approaches I can think of

niyas-sait commented 3 years ago

Pull Request for approach (A)

stwiegand commented 1 month ago

Any news on this issue, since nowadays ARM64 on Windows is a thing?