|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60375 - in sandbox/statistics/detail/assign: boost/assign/auto_size boost/assign/auto_size/array boost/assign/auto_size/detail libs/assign/doc libs/assign/example
From: erwann.rogard_at_[hidden]
Date: 2010-03-09 00:45:40
Author: e_r
Date: 2010-03-09 00:45:38 EST (Tue, 09 Mar 2010)
New Revision: 60375
URL: http://svn.boost.org/trac/boost/changeset/60375
Log:
m
Text files modified:
sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp | 7 ++
sandbox/statistics/detail/assign/boost/assign/auto_size/detail/expr.hpp | 9 ++-
sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp | 2
sandbox/statistics/detail/assign/boost/assign/auto_size/ref_rebind_list_of.hpp | 2
sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt | 2
sandbox/statistics/detail/assign/libs/assign/doc/revision_history.txt | 4 +
sandbox/statistics/detail/assign/libs/assign/doc/speed.txt | 81 ++++++++++++++-------------------------
sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.cpp | 16 ++-----
8 files changed, 51 insertions(+), 72 deletions(-)
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp 2010-03-09 00:45:38 EST (Tue, 09 Mar 2010)
@@ -12,9 +12,10 @@
#include <boost/mpl/bool.hpp>
#include <boost/array.hpp>
#include <boost/range.hpp>
+#include <boost/assign/list_of.hpp> // for assign_detail::converter
#include <boost/assign/auto_size/detail/has_copy_semantics.hpp>
#include <boost/assign/auto_size/array/ref.hpp>
-#include <boost/assign/list_of.hpp> // for assign_detail::converter
+//#include <boost/assign/auto_size/array/chainable.hpp>
namespace boost{
namespace assign{
@@ -50,7 +51,9 @@
class array_interface : public assign_detail::converter<
array_interface<T,N,R,D>,
typename array_interface_traits<T,N,R>::const_iterator
- >{
+ >
+ //,public auto_size::chainable<array_interface<T,N,R,D> >
+ {
typedef array_interface_traits<T,N,R> traits;
typedef typename traits::ref_ ref_;
typedef typename traits::ref_array_ ref_array_;
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/detail/expr.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/detail/expr.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/detail/expr.hpp 2010-03-09 00:45:38 EST (Tue, 09 Mar 2010)
@@ -20,6 +20,7 @@
#include <boost/type_traits.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/range.hpp>
+//#include <boost/range/chain.hpp>
#include <boost/assign/auto_size/detail/has_static_size.hpp>
#include <boost/assign/auto_size/detail/static_size.hpp>
#include <boost/assign/auto_size/detail/assign_reference_copy.hpp>
@@ -28,6 +29,7 @@
#include <boost/assign/auto_size/detail/types.hpp>
#include <boost/assign/auto_size/detail/expr_size.hpp>
#include <boost/assign/auto_size/detail/expr_elem.hpp>
+//#include <boost/assign/auto_size/detail/result_of_chain.hpp>
#include <boost/assign/auto_size/array/lazy.hpp>
// Creates a collection of references by deducing the number of arguments
@@ -44,10 +46,9 @@
// with M.P.G
//
// To comply AMAP with the rest of the Boost.Assign framework, has method
-// range<int>() whose size must be specified explicitly. However, this defeats
-// the purpose of the 'auto_size' framework and incurrs a performance penalty,
-// so it is recommended to use a range concatenation tool such as boost::chain
-// in Boost.Range_ex.
+// range<int>() but its size must be specified explicitly which defeats
+// the purpose of this framework. A better approach using boost::chain is a work
+// in progress.
namespace boost{
namespace assign{
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp 2010-03-09 00:45:38 EST (Tue, 09 Mar 2010)
@@ -15,7 +15,7 @@
namespace boost{
namespace assign{
- // specified policy :
+ // custom policy :
template<typename P,typename T>
typename detail::auto_size::first_copy<const T,P>::type
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/ref_rebind_list_of.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/ref_rebind_list_of.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/ref_rebind_list_of.hpp 2010-03-09 00:45:38 EST (Tue, 09 Mar 2010)
@@ -15,7 +15,7 @@
namespace boost{
namespace assign{
- // specified policy :
+ // custom policy :
template<typename P,typename T>
typename detail::auto_size::first_rebind<const T,P>::type
Modified: sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt (original)
+++ sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt 2010-03-09 00:45:38 EST (Tue, 09 Mar 2010)
@@ -8,3 +8,5 @@
Mac OS X 10.6 gcc 4.2 boost_1_41_0 March 1st, 2010
Win7-32 V6.1.7100 Dev-C++ 5.0 beta 9.2 - Mingw/GCC 3.4.2 boost_1_41_0 March 1st, 2010
Win7-32 V6.1.7100 Visual Studio 2010 boost_1_41_0 March 1st, 2010
+
+Check revision_history.txt to verify that these tests are up to date.
\ No newline at end of file
Modified: sandbox/statistics/detail/assign/libs/assign/doc/revision_history.txt
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/doc/revision_history.txt (original)
+++ sandbox/statistics/detail/assign/libs/assign/doc/revision_history.txt 2010-03-09 00:45:38 EST (Tue, 09 Mar 2010)
@@ -1,6 +1,8 @@
// Revision history:
//
-// March 8, 2010 : Made array_interface derive from assign_detail::convert for
+// March 8, 2010 : Added a policy dispatcher, csv_policy, to allow a common
+// policy tag for csv and non-csv functions.
+// March 8, 2010 : Made array_interface derive from assign_detail::convert for
// greater conformity with the rest of the library.
// March 7, 2010 : Added assign_reference_rebind whose op= and swap have rebind
// semantics.
Modified: sandbox/statistics/detail/assign/libs/assign/doc/speed.txt
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/doc/speed.txt (original)
+++ sandbox/statistics/detail/assign/libs/assign/doc/speed.txt 2010-03-09 00:45:38 EST (Tue, 09 Mar 2010)
@@ -4,55 +4,32 @@
Each arg is a string of size : 100
Number of repeated function calls : 1000000
-cref_list_of(1) => 0.00 s
-
-cref_csv(1) => 0.00 s
-
-cref_list_of<>(1) => 0.00 s
-
-list_of(1) => 0.94 s
-
-
-cref_list_of(3) => 0.01 s
-
-cref_csv(3) => 0.01 s
-
-cref_list_of<>(3) => 0.00 s
-
-list_of(3) => 1.59 s
-
-
-cref_list_of(10) => 0.02 s
-
-cref_csv(10) => 0.05 s
-
-cref_list_of<>(10) => 0.01 s
-
-list_of(10) => 2.49 s
-
-
-cref_list_of(30) => 0.07 s
-
-cref_csv(30) => 0.14 s
-
-cref_list_of<>(30) => 0.04 s
-
-list_of(30) => 4.95 s
-
-
-cref_list_of(80) => 0.22 s
-
-cref_csv(80) => 0.39 s
-
-cref_list_of<>(80) => 0.06 s
-
-list_of(80) => 11.57 s
-
-
-cref_list_of(160) => 0.45 s
-
-cref_csv(160) => 0.82 s
-
-cref_list_of<>(160) => 0.12 s
-
-list_of(160) => 21.98 s
+cref_list_of(1) => 0.00 s
+cref_csv(1) => 0.00 s
+cref_list_of<>(1) => 0.00 s
+list_of(1) => 0.94 s
+
+cref_list_of(3) => 0.01 s
+cref_csv(3) => 0.01 s
+cref_list_of<>(3) => 0.00 s
+list_of(3) => 1.59 s
+
+cref_list_of(10) => 0.02 s
+cref_csv(10) => 0.05 s
+cref_list_of<>(10) => 0.01 s
+list_of(10) => 2.49 s
+
+cref_list_of(30) => 0.07 s
+cref_csv(30) => 0.14 s
+cref_list_of<>(30) => 0.04 s
+list_of(30) => 4.95 s
+
+cref_list_of(80) => 0.22 s
+cref_csv(80) => 0.39 s
+cref_list_of<>(80) => 0.06 s
+list_of(80) => 11.57 s
+
+cref_list_of(160) => 0.45 s
+cref_csv(160) => 0.82 s
+cref_list_of<>(160) => 0.12 s
+list_of(160) => 21.98 s
\ No newline at end of file
Modified: sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.cpp 2010-03-09 00:45:38 EST (Tue, 09 Mar 2010)
@@ -17,7 +17,6 @@
#include <boost/typeof/typeof.hpp>
#include <boost/array.hpp>
#include <boost/range.hpp>
-//#include <boost/range/chain.hpp>//Uncomment when in release
#include <boost/assign/auto_size/ref_list_of.hpp>
#include <boost/assign/auto_size/ref_rebind_list_of.hpp>
@@ -210,19 +209,14 @@
}
// ---- Concatenate ranges
{
- boost::array<int,4> array; array.assign(-1);
+ boost::array<int,4> array; array.assign(d1);
int a=a1, b=b1, c=c1;
BOOST_ASSERT(boost::size(cref_list_of(a)(b)(c).range(array))==7u);
- // Uncomment when range_ex is in the release
- //BOOST_ASSERT(
- // boost::size(
- // boost::chain(
- // cref_list_of(a)(b)(c),
- // array
- // )
- // )== 7u
- //);
+
+ //BOOST_AUTO(tmp,boost::chain(cref_list_of(a)(b)(c),array));
+ //BOOST_ASSERT(boost::size(tmp)== 7u);
+ //*tmp.begin(); // Fails to compile
}
// ---- Range conversion
{
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