17 #ifndef _ENTITY_ALGORITHM_SIMD_SSE_FOREACH_H_INCLUDED_
18 #define _ENTITY_ALGORITHM_SIMD_SSE_FOREACH_H_INCLUDED_
20 #include <boost/fusion/container/vector.hpp>
21 #include <boost/fusion/sequence/intrinsic/at.hpp>
22 #include <xmmintrin.h>
25 #include "entity/config.hpp"
29 namespace entity {
namespace simd {
namespace sse
35 inline void operator()(boost::fusion::vector<float*, __m128&> source_and_v)
const
37 using boost::fusion::at_c;
38 at_c<1>(source_and_v) = _mm_loadu_ps(at_c<0>(source_and_v));
44 inline void operator()(boost::fusion::vector<float*, __m128&> dest_and_v)
const
46 using boost::fusion::at_c;
47 _mm_storeu_ps(at_c<0>(dest_and_v), at_c<1>(dest_and_v));
53 template<
typename Iterator>
63 template<
typename EntityList,
typename ComponentPoolTuple,
typename Fn>
64 void for_each(EntityList
const& entities, ComponentPoolTuple&& p, Fn f)
116 #endif // _ENTITY_ALGORITHM_SIMD_SSE_FOREACH_H_INCLUDED_
float * operator()(Iterator iter) const
void for_each(EntityList const &entities, ComponentPoolTuple &&p, Fn f)
void operator()(boost::fusion::vector< float *, __m128 & > dest_and_v) const
void operator()(boost::fusion::vector< float *, __m128 & > source_and_v) const