|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71660 - sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta
From: mario.mulansky_at_[hidden]
Date: 2011-05-02 03:43:31
Author: mariomulansky
Date: 2011-05-02 03:43:31 EDT (Mon, 02 May 2011)
New Revision: 71660
URL: http://svn.boost.org/trac/boost/changeset/71660
Log:
+ fusion foreach performance
Added:
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_foreach_performance.hpp (contents, props changed)
Text files modified:
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_explicit_rk_new.hpp | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_explicit_rk_new.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_explicit_rk_new.hpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_explicit_rk_new.hpp 2011-05-02 03:43:31 EDT (Mon, 02 May 2011)
@@ -20,6 +20,7 @@
#include <boost/array.hpp>
#include "fusion_algebra.hpp"
+#include "fusion_foreach_performance.hpp"
namespace mpl = boost::mpl;
namespace fusion = boost::fusion;
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_foreach_performance.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/fusion_foreach_performance.hpp 2011-05-02 03:43:31 EDT (Mon, 02 May 2011)
@@ -0,0 +1,37 @@
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion {
+namespace detail
+{
+ template<>
+ struct for_each_unrolled<6>
+ {
+ template<typename I0, typename F>
+ static void call(I0 const& i0, F const& f)
+ {
+ f(*i0);
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1(fusion::next(i0));
+ f(*i1);
+ typedef typename result_of::next<I1>::type I2;
+ I2 i2(fusion::next(i1));
+ f(*i2);
+ typedef typename result_of::next<I2>::type I3;
+ I3 i3(fusion::next(i2));
+ f(*i3);
+ typedef typename result_of::next<I3>::type I4;
+ I4 i4(fusion::next(i3));
+ f(*i4);
+ typedef typename result_of::next<I4>::type I5;
+ I5 i5(fusion::next(i4));
+ f(*i5);
+ }
+ };
+}
+} }
\ No newline at end of file
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk