Update of /cvsroot/boost/boost/boost/fusion/algorithm/query
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26724/algorithm/query
Modified Files:
all.hpp any.hpp none.hpp
Log Message:
loop unrolling for compile time perf in any, all and none
Index: all.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/fusion/algorithm/query/all.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- all.hpp 2 Mar 2007 10:44:06 -0000 1.2
+++ all.hpp 30 May 2007 06:56:32 -0000 1.3
@@ -1,15 +1,14 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See
accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
-#if !defined(FUSION_ALL_05052005_1238)
-#define FUSION_ALL_05052005_1238
+#if !defined(BOOST_FUSION_ALL_05052005_1238)
+#define BOOST_FUSION_ALL_05052005_1238
-#include <boost/fusion/sequence/intrinsic/begin.hpp>
-#include <boost/fusion/sequence/intrinsic/end.hpp>
-#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/algorithm/query/detail/all.hpp>
namespace boost { namespace fusion
@@ -27,13 +26,7 @@
inline bool
all(Sequence const& seq, F f)
{
- return detail::all(
- fusion::begin(seq)
- , fusion::end(seq)
- , f
- , result_of::equal_to<
- typename result_of::begin<Sequence>::type
- , typename result_of::end<Sequence>::type>());
+ return detail::all(seq, f, typename
traits::category_of<Sequence>::type());
}
}}
Index: any.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/fusion/algorithm/query/any.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- any.hpp 2 Mar 2007 10:44:06 -0000 1.2
+++ any.hpp 30 May 2007 06:56:32 -0000 1.3
@@ -1,6 +1,7 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005 Eric Niebler
+ Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See
accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -8,9 +9,7 @@
#if !defined(FUSION_ANY_05052005_1230)
#define FUSION_ANY_05052005_1230
-#include <boost/fusion/sequence/intrinsic/begin.hpp>
-#include <boost/fusion/sequence/intrinsic/end.hpp>
-#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/algorithm/query/detail/any.hpp>
namespace boost { namespace fusion
@@ -28,13 +27,7 @@
inline bool
any(Sequence const& seq, F f)
{
- return detail::any(
- fusion::begin(seq)
- , fusion::end(seq)
- , f
- , result_of::equal_to<
- typename result_of::begin<Sequence>::type
- , typename result_of::end<Sequence>::type>());
+ return detail::any(seq, f, typename
traits::category_of<Sequence>::type());
}
}}
Index: none.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/fusion/algorithm/query/none.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- none.hpp 2 Mar 2007 10:44:06 -0000 1.2
+++ none.hpp 30 May 2007 06:56:32 -0000 1.3
@@ -1,16 +1,14 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See
accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
-#if !defined(FUSION_NONE_07062005_1128)
-#define FUSION_NONE_07062005_1128
+#if !defined(BOOST_FUSION_NONE_07062005_1128)
+#define BOOST_FUSION_NONE_07062005_1128
-#include <boost/fusion/sequence/intrinsic/begin.hpp>
-#include <boost/fusion/sequence/intrinsic/end.hpp>
-#include <boost/fusion/iterator/equal_to.hpp>
-#include <boost/fusion/algorithm/query/detail/none.hpp>
+#include <boost/fusion/algorithm/query/any.hpp>
namespace boost { namespace fusion
{
@@ -27,13 +25,7 @@
inline bool
none(Sequence const& seq, F f)
{
- return detail::none(
- fusion::begin(seq)
- , fusion::end(seq)
- , f
- , result_of::equal_to<
- typename result_of::begin<Sequence>::type
- , typename result_of::end<Sequence>::type>());
+ return !fusion::any(seq, f);
}
}}
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs