Skip to content

Commit

Permalink
Merge pull request #64 from steinwurf/neon-macos
Browse files Browse the repository at this point in the history
Made Neon detection work on MacOS.
  • Loading branch information
jpihl authored Oct 24, 2024
2 parents 050c4c4 + 6a37c03 commit 95642f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ every change, see the Git log.

Latest
------
* tbd
* Patch: Made Neon detection work on MacOS.

9.0.0
-----
Expand Down
5 changes: 3 additions & 2 deletions src/cpuid/cpuinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
#include "detail/init_msvc_x86.hpp"
#elif defined(PLATFORM_MSVC_ARM)
#include "detail/init_msvc_arm.hpp"
#elif defined(PLATFORM_CLANG_ARM) && defined(PLATFORM_IOS)
#include "detail/init_ios_clang_arm.hpp"
#elif defined(PLATFORM_CLANG_ARM) && \
(defined(PLATFORM_IOS) || defined(PLATFORM_MAC))
#include "detail/init_apple_gcc_arm.hpp"
#elif defined(PLATFORM_GCC_COMPATIBLE_ARM) && defined(PLATFORM_LINUX)
#include "detail/init_linux_gcc_arm.hpp"
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ namespace cpuid
{
inline namespace STEINWURF_CPUID_VERSION
{
/// @todo docs
void init_cpuinfo(cpuinfo::impl& info)
{
// The __ARM_NEON__ macro will be defined by the Apple Clang compiler
// when targeting ARMv7 processors that have NEON.
// when targeting ARMv7/8 processors that have NEON.
// The compiler guarantees this capability, so there is no benefit
// in doing a runtime check. More info in this SO answer:
// http://stackoverflow.com/a/1601234
Expand Down

0 comments on commit 95642f5

Please sign in to comment.