From b1f21fe998be01d995db1fa5635391612fdd4121 Mon Sep 17 00:00:00 2001 From: "Brendan K. Krueger" Date: Wed, 28 Aug 2024 11:38:45 -0600 Subject: [PATCH] FORCEINLINE --- ports-of-call/array.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ports-of-call/array.hpp b/ports-of-call/array.hpp index 02f311ef..833f1a9b 100644 --- a/ports-of-call/array.hpp +++ b/ports-of-call/array.hpp @@ -31,22 +31,22 @@ struct bits { using type = T[N]; template - PORTABLE_FUNCTION static constexpr T &ref_access(type &array, + PORTABLE_FORCEINLINE_FUNCTION static constexpr T &ref_access(type &array, IntT index) { return array[index]; } template - PORTABLE_FUNCTION static constexpr T const & + PORTABLE_FORCEINLINE_FUNCTION static constexpr T const & ref_access(type const &array, IntT index) { return array[index]; } - PORTABLE_FUNCTION static constexpr T *ptr_access(type &array) { + PORTABLE_FORCEINLINE_FUNCTION static constexpr T *ptr_access(type &array) { return static_cast(array); } - PORTABLE_FUNCTION static constexpr T const * + PORTABLE_FORCEINLINE_FUNCTION static constexpr T const * ptr_access(type const &array) { return static_cast(array); } @@ -57,21 +57,21 @@ struct bits { using type = T[1]; template - PORTABLE_FUNCTION static constexpr T &ref_access(type &arr, IntT) { + PORTABLE_FORCEINLINE_FUNCTION static constexpr T &ref_access(type &arr, IntT) { return arr[0]; } template - PORTABLE_FUNCTION static constexpr T const &ref_access(type const &arr, + PORTABLE_FORCEINLINE_FUNCTION static constexpr T const &ref_access(type const &arr, IntT) { return arr[0]; } - PORTABLE_FUNCTION static constexpr T *ptr_access(type &arr) { + PORTABLE_FORCEINLINE_FUNCTION static constexpr T *ptr_access(type &arr) { return (T *)&arr; } - PORTABLE_FUNCTION static constexpr T const * + PORTABLE_FORCEINLINE_FUNCTION static constexpr T const * ptr_access(type const &arr) { return (T const *)&arr; }