MCPcopy Create free account
hub / github.com/LibRapid/librapid / writePacket

Method writePacket

librapid/include/librapid/array/arrayContainer.hpp:784–796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

782
783 template<typename ShapeType_, typename StorageType_>
784 LIBRAPID_ALWAYS_INLINE void
785 ArrayContainer<ShapeType_, StorageType_>::writePacket(size_t index, const Packet &value) {
786 auto ptr = LIBRAPID_ASSUME_ALIGNED(m_storage.begin());
787
788#if defined(LIBRAPID_NATIVE_ARCH)
789 LIBRAPID_ASSERT(
790 reinterpret_cast<uintptr_t>(ptr) % typetraits::TypeInfo<Scalar>::packetWidth == 0,
791 "ArrayContainer::packet called on unaligned storage");
792 value.store_aligned(ptr + index);
793#else
794 value.store_unaligned(ptr + index);
795#endif
796 }
797
798 template<typename ShapeType_, typename StorageType_>
799 LIBRAPID_ALWAYS_INLINE void

Callers 2

assignFunction · 0.80
assignParallelFunction · 0.80

Calls 1

beginMethod · 0.45

Tested by

no test coverage detected