From d0843cbc403b1da775edc9565532a7aa24da9783 Mon Sep 17 00:00:00 2001 From: Richard Thier Date: Thu, 1 Sep 2022 02:15:43 +0200 Subject: [PATCH] Revert "trying with the restrict keyword - unsuccessful" This reverts commit 1908687002c085c628853711d26b95e9bc92a1ad. --- magyarsort.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/magyarsort.h b/magyarsort.h index 1c37c11..8cd9627 100644 --- a/magyarsort.h +++ b/magyarsort.h @@ -241,7 +241,7 @@ namespace MagyarSort { }; template - static inline void calcPrefixSums(COUNTER_TYP *__restrict radics) noexcept { + static inline void calcPrefixSums(COUNTER_TYP *radics) noexcept { static thread_local COUNTER_TYP prev[DIGITS]; memset(prev, 0, sizeof(prev)); @@ -267,7 +267,7 @@ namespace MagyarSort { /** Recursive Functor: no class should be generated I think (compiler should be smart) */ template struct RadixMagic : public RadixMagic { - inline __attribute__((always_inline)) RadixMagic(bool &swapped, COUNTER_TYP *__restrict radics, uint32_t *__restrict from, uint32_t *__restrict to, COUNTER_TYP size) noexcept + inline __attribute__((always_inline)) RadixMagic(bool &swapped, COUNTER_TYP *radics, uint32_t *from, uint32_t *to, COUNTER_TYP size) noexcept : RadixMagic(swapped, radics, from, to, size) { // Tricky: see (**) if(swapped) { // never true for DIGIT 0, see (***) @@ -305,7 +305,7 @@ namespace MagyarSort { /** Ends template recursion */ template struct RadixMagic<-1, COUNTER_TYP> { - inline RadixMagic(bool swapped, COUNTER_TYP *__restrict radics, uint32_t *__restrict from, uint32_t *__restrict to, COUNTER_TYP size) noexcept {} + inline RadixMagic(bool swapped, COUNTER_TYP *radics, uint32_t *&from, uint32_t *&to, COUNTER_TYP size) noexcept {} }; /* SORT */