From 82ab73576203cdbfd338b001217457cfcc9067e7 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Tue, 2 Jan 2024 20:31:27 +0100 Subject: [PATCH] Rename internal SIMD load/store functions --- include/llama/RecordRef.hpp | 11 +++++++---- include/llama/Simd.hpp | 8 ++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/llama/RecordRef.hpp b/include/llama/RecordRef.hpp index 148aad7dca..bb4b2c4ec3 100644 --- a/include/llama/RecordRef.hpp +++ b/include/llama/RecordRef.hpp @@ -329,10 +329,10 @@ namespace llama = isDirectListInitializable; template - LLAMA_FN_HOST_ACC_INLINE void loadSimdRecord(const T& srcRef, Simd& dstSimd, RecordCoord rc); + LLAMA_FN_HOST_ACC_INLINE void loadSimdFromField(const T& srcRef, Simd& dstSimd, RecordCoord rc); template - LLAMA_FN_HOST_ACC_INLINE void storeSimdRecord(const Simd& srcSimd, T&& dstRef, RecordCoord rc); + LLAMA_FN_HOST_ACC_INLINE void storeSimdToField(const Simd& srcSimd, T&& dstRef, RecordCoord rc); } // namespace internal /// Record reference type returned by \ref View after resolving an array dimensions coordinate or partially @@ -757,9 +757,12 @@ namespace llama // to find subsequent elements. This is not a great design for now and the SIMD load/store functions should // probably take iterators to records. template - friend LLAMA_FN_HOST_ACC_INLINE void internal::loadSimdRecord(const T& srcRef, Simd& dstSimd, RecordCoord rc); + friend LLAMA_FN_HOST_ACC_INLINE void internal::loadSimdFromField( + const T& srcRef, + Simd& dstSimd, + RecordCoord rc); template - friend LLAMA_FN_HOST_ACC_INLINE void internal::storeSimdRecord( + friend LLAMA_FN_HOST_ACC_INLINE void internal::storeSimdToField( const Simd& srcSimd, T&& dstRef, RecordCoord rc); diff --git a/include/llama/Simd.hpp b/include/llama/Simd.hpp index 88cbbdbbed..56c7263935 100644 --- a/include/llama/Simd.hpp +++ b/include/llama/Simd.hpp @@ -204,7 +204,7 @@ namespace llama }(); template - LLAMA_FN_HOST_ACC_INLINE void loadSimdRecord(const T& srcRef, Simd& dstSimd, RecordCoord rc) + LLAMA_FN_HOST_ACC_INLINE void loadSimdFromField(const T& srcRef, Simd& dstSimd, RecordCoord rc) { using RecordDim = typename T::AccessibleRecordDim; using FieldType = GetType; @@ -251,7 +251,7 @@ namespace llama } template - LLAMA_FN_HOST_ACC_INLINE void storeSimdRecord(const Simd& srcSimd, TFwd&& dstRef, RecordCoord rc) + LLAMA_FN_HOST_ACC_INLINE void storeSimdToField(const Simd& srcSimd, TFwd&& dstRef, RecordCoord rc) { using T = std::remove_reference_t; using RecordDim = typename T::AccessibleRecordDim; @@ -313,7 +313,7 @@ namespace llama if constexpr(isRecordRef && isRecordRef) { forEachLeafCoord([&](auto rc) LLAMA_LAMBDA_INLINE - { internal::loadSimdRecord(srcRef, dstSimd, rc); }); + { internal::loadSimdFromField(srcRef, dstSimd, rc); }); } // unstructured dstSimd and reference type else if constexpr(!isRecordRef && !isRecordRef) @@ -341,7 +341,7 @@ namespace llama if constexpr(isRecordRef && isRecordRef) { forEachLeafCoord([&](auto rc) LLAMA_LAMBDA_INLINE - { internal::storeSimdRecord(srcSimd, dstRef, rc); }); + { internal::storeSimdToField(srcSimd, dstRef, rc); }); } // unstructured srcSimd and reference type else if constexpr(!isRecordRef && !isRecordRef)