From c53675edac4db3c63413aa18bbed7387e8741c72 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Wed, 9 Dec 2020 09:59:13 +0100 Subject: [PATCH] rename NETGEN_ARCH_ARM to NETGEN_ARCH_ARM64 --- libsrc/core/ngcore_api.hpp | 2 +- libsrc/core/utils.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libsrc/core/ngcore_api.hpp b/libsrc/core/ngcore_api.hpp index 330e7e33..4ab4c4c6 100644 --- a/libsrc/core/ngcore_api.hpp +++ b/libsrc/core/ngcore_api.hpp @@ -72,7 +72,7 @@ #endif #if defined(__arm64__) || defined(_M_ARM64) -#define NETGEN_ARCH_ARM +#define NETGEN_ARCH_ARM64 #endif #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED diff --git a/libsrc/core/utils.hpp b/libsrc/core/utils.hpp index ca015ae3..ef868b38 100644 --- a/libsrc/core/utils.hpp +++ b/libsrc/core/utils.hpp @@ -10,7 +10,7 @@ #include "ngcore_api.hpp" // for NGCORE_API and CPU arch macros -#if defined(__APPLE__) && defined(NETGEN_ARCH_ARM) +#if defined(__APPLE__) && defined(NETGEN_ARCH_ARM64) #include #endif @@ -58,11 +58,11 @@ namespace ngcore inline TTimePoint GetTimeCounter() noexcept { -#if defined(__APPLE__) && defined(NETGEN_ARCH_ARM) +#if defined(__APPLE__) && defined(NETGEN_ARCH_ARM64) return mach_absolute_time(); #elif defined(NETGEN_ARCH_AMD64) return __rdtsc(); -#elif defined(NETGEN_ARCH_ARM) +#elif defined(NETGEN_ARCH_ARM64) return __builtin_readcyclecounter(); #else #warning "Unsupported CPU architecture"