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

Method packet

librapid/include/librapid/array/arrayContainer.hpp:762–775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

760
761 template<typename ShapeType_, typename StorageType_>
762 LIBRAPID_ALWAYS_INLINE auto
763 ArrayContainer<ShapeType_, StorageType_>::packet(size_t index) const -> Packet {
764 auto ptr = LIBRAPID_ASSUME_ALIGNED(m_storage.begin());
765
766#if defined(LIBRAPID_NATIVE_ARCH)
767 LIBRAPID_ASSERT(
768 reinterpret_cast<uintptr_t>(ptr) % typetraits::TypeInfo<Scalar>::packetWidth == 0,
769 "ArrayContainer::packet called on unaligned storage");
770
771 return xsimd::load_aligned(ptr + index);
772#else
773 return xsimd::load_unaligned(ptr + index);
774#endif
775 }
776
777 template<typename ShapeType_, typename StorageType_>
778 LIBRAPID_ALWAYS_INLINE auto

Callers

nothing calls this directly

Calls 1

beginMethod · 0.45

Tested by

no test coverage detected