MCPcopy Create free account
hub / github.com/TinyMPC/TinyMPC / pload_partial

Function pload_partial

include/Eigen/Eigen/src/Core/GenericPacketMath.h:724–735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722 * offset + n <= unpacket_traits::size
723 * All elements before offset and after the last element loaded will initialized with zero */
724template<typename Packet> EIGEN_DEVICE_FUNC inline Packet
725pload_partial(const typename unpacket_traits<Packet>::type* from, const Index n, const Index offset = 0)
726{
727 const Index packet_size = unpacket_traits<Packet>::size;
728 eigen_assert(n + offset <= packet_size && "number of elements plus offset will read past end of packet");
729 typedef typename unpacket_traits<Packet>::type Scalar;
730 EIGEN_ALIGN_MAX Scalar elements[packet_size] = { Scalar(0) };
731 for (Index i = offset; i < numext::mini(n+offset,packet_size); i++) {
732 elements[i] = from[i-offset];
733 }
734 return pload<Packet>(elements);
735}
736
737/** \internal \returns a packet version of \a *from, (un-aligned load) */
738template<typename Packet> EIGEN_DEVICE_FUNC inline Packet

Callers

nothing calls this directly

Calls 1

miniFunction · 0.85

Tested by

no test coverage detected