From 814ae261e3a5658583b8f57820c59dccbd984972 Mon Sep 17 00:00:00 2001 From: Lam Pham-Sy Date: Fri, 30 Nov 2018 15:28:13 +0100 Subject: [PATCH] Remove __restrict --- src/simd_basic.h | 18 +++++++++--------- src/simd_fnt.h | 22 +++++++++++----------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/simd_basic.h b/src/simd_basic.h index fc0795de..4fed13ca 100644 --- a/src/simd_basic.h +++ b/src/simd_basic.h @@ -210,8 +210,8 @@ inline void mul_coef_to_buf(const T a, T* src, T* dest, size_t len, T card) { const VecType coef = set_one(a); - VecType* __restrict _src = reinterpret_cast(src); - VecType* __restrict _dest = reinterpret_cast(dest); + VecType* _src = reinterpret_cast(src); + VecType* _dest = reinterpret_cast(dest); const unsigned ratio = sizeof(*_src) / sizeof(*src); const size_t _len = len / ratio; const size_t _last_len = len - _len * ratio; @@ -239,8 +239,8 @@ inline void mul_coef_to_buf(const T a, T* src, T* dest, size_t len, T card) template inline void add_two_bufs(T* src, T* dest, size_t len, T card) { - VecType* __restrict _src = reinterpret_cast(src); - VecType* __restrict _dest = reinterpret_cast(dest); + VecType* _src = reinterpret_cast(src); + VecType* _dest = reinterpret_cast(dest); const unsigned ratio = sizeof(*_src) / sizeof(*src); const size_t _len = len / ratio; const size_t _last_len = len - _len * ratio; @@ -260,9 +260,9 @@ inline void add_two_bufs(T* src, T* dest, size_t len, T card) template inline void sub_two_bufs(T* bufa, T* bufb, T* res, size_t len, T card) { - VecType* __restrict _bufa = reinterpret_cast(bufa); - VecType* __restrict _bufb = reinterpret_cast(bufb); - VecType* __restrict _res = reinterpret_cast(res); + VecType* _bufa = reinterpret_cast(bufa); + VecType* _bufb = reinterpret_cast(bufb); + VecType* _res = reinterpret_cast(res); const unsigned ratio = sizeof(*_bufa) / sizeof(*bufa); const size_t _len = len / ratio; const size_t _last_len = len - _len * ratio; @@ -287,8 +287,8 @@ inline void sub_two_bufs(T* bufa, T* bufb, T* res, size_t len, T card) template inline void mul_two_bufs(T* src, T* dest, size_t len, T card) { - VecType* __restrict _src = reinterpret_cast(src); - VecType* __restrict _dest = reinterpret_cast(dest); + VecType* _src = reinterpret_cast(src); + VecType* _dest = reinterpret_cast(dest); const unsigned ratio = sizeof(*_src) / sizeof(*src); const size_t _len = len / ratio; const size_t _last_len = len - _len * ratio; diff --git a/src/simd_fnt.h b/src/simd_fnt.h index f001bdcd..8e23e1dd 100644 --- a/src/simd_fnt.h +++ b/src/simd_fnt.h @@ -151,8 +151,8 @@ inline void butterfly_ct_step( for (unsigned i = start; i < bufs_nb; i += step) { VecType x1, y1; VecType x2, y2; - VecType* __restrict p = reinterpret_cast(mem[i]); - VecType* __restrict q = reinterpret_cast(mem[i + m]); + VecType* p = reinterpret_cast(mem[i]); + VecType* q = reinterpret_cast(mem[i + m]); size_t j = 0; for (; j < end; j += 2) { @@ -204,10 +204,10 @@ inline static void do_butterfly_ct_2_layers( VecType c2 = set_one(r2); VecType c3 = set_one(r3); - VecType* __restrict p = reinterpret_cast(mem[start]); - VecType* __restrict q = reinterpret_cast(mem[start + m]); - VecType* __restrict r = reinterpret_cast(mem[start + 2 * m]); - VecType* __restrict s = reinterpret_cast(mem[start + 3 * m]); + VecType* p = reinterpret_cast(mem[start]); + VecType* q = reinterpret_cast(mem[start + m]); + VecType* r = reinterpret_cast(mem[start + 2 * m]); + VecType* s = reinterpret_cast(mem[start + 3 * m]); size_t j = 0; const size_t end = (len > 1) ? len - 1 : 0; @@ -361,8 +361,8 @@ inline void butterfly_gs_step( for (unsigned i = start; i < bufs_nb; i += step) { VecType x1, x2, x3, x4; VecType y1, y2, y3, y4; - VecType* __restrict p = reinterpret_cast(mem[i]); - VecType* __restrict q = reinterpret_cast(mem[i + m]); + VecType* p = reinterpret_cast(mem[i]); + VecType* q = reinterpret_cast(mem[i + m]); size_t j = 0; for (; j < end; j += 4) { @@ -438,8 +438,8 @@ inline void butterfly_gs_step_simple( for (unsigned i = start; i < bufs_nb; i += step) { VecType x1, y1; VecType x2, y2; - VecType* __restrict p = reinterpret_cast(mem[i]); - VecType* __restrict q = reinterpret_cast(mem[i + m]); + VecType* p = reinterpret_cast(mem[i]); + VecType* q = reinterpret_cast(mem[i + m]); size_t j = 0; for (; j < end; j += 2) { @@ -481,7 +481,7 @@ inline void encode_post_process( const std::vector& mem = output.get_mem(); for (unsigned frag_id = 0; frag_id < code_len; ++frag_id) { - VecType* __restrict buf = reinterpret_cast(mem[frag_id]); + VecType* buf = reinterpret_cast(mem[frag_id]); size_t vec_id = 0; size_t end = (vecs_nb > 3) ? vecs_nb - 3 : 0;