From fac83953edac4123d5740a398f405a178edb05e3 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Sun, 3 Jun 2018 20:01:30 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"Added=20some=20'const'=20decoration?= =?UTF-8?q?=20and=20better=20documentation=20to=20the=20atomics=20to=20mak?= =?UTF-8?q?e=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 28127ee8b341df143cb1e168dcb266560a045023 --- src/atomic.h | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/atomic.h b/src/atomic.h index 0861fd913d..cb73c9f26a 100644 --- a/src/atomic.h +++ b/src/atomic.h @@ -39,16 +39,13 @@ * * This is a text-book implementation based on an atomic CAS. * - * We create a temporary union to cope with the int-only atomic CAS - * and the floating-point min that we want. - * * @param address The address to update. * @param y The value to update the address with. */ __attribute__((always_inline)) INLINE static void atomic_min_f( - volatile float* const address, const float y) { + volatile float* address, float y) { - int* const int_ptr = (int* const)address; + int* int_ptr = (int*)address; typedef union { float as_float; @@ -70,16 +67,13 @@ __attribute__((always_inline)) INLINE static void atomic_min_f( * * This is a text-book implementation based on an atomic CAS. * - * We create a temporary union to cope with the int-only atomic CAS - * and the floating-point max that we want. - * * @param address The address to update. * @param y The value to update the address with. */ __attribute__((always_inline)) INLINE static void atomic_max_f( - volatile float* const address, const float y) { + volatile float* address, float y) { - int* const int_ptr = (int* const)address; + int* int_ptr = (int*)address; typedef union { float as_float; @@ -101,16 +95,13 @@ __attribute__((always_inline)) INLINE static void atomic_max_f( * * This is a text-book implementation based on an atomic CAS. * - * We create a temporary union to cope with the int-only atomic CAS - * and the floating-point add that we want. - * * @param address The address to update. * @param y The value to update the address with. */ __attribute__((always_inline)) INLINE static void atomic_add_f( - volatile float* const address, const float y) { + volatile float* address, float y) { - int* const int_ptr = (int* const)address; + int* int_ptr = (int*)address; typedef union { float as_float; -- GitLab