Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81057 - sandbox/variadic_templates/sandbox/slim/test
From: cppljevans_at_[hidden]
Date: 2012-10-24 20:20:06


Author: cppljevans
Date: 2012-10-24 20:20:06 EDT (Wed, 24 Oct 2012)
New Revision: 81057
URL: http://svn.boost.org/trac/boost/changeset/81057

Log:
Hopefully, last #include file.

Added:
   sandbox/variadic_templates/sandbox/slim/test/macros.benchmark.pp.hpp (contents, props changed)
Text files modified:
   sandbox/variadic_templates/sandbox/slim/test/Makefile | 4 ++--
   sandbox/variadic_templates/sandbox/slim/test/tuple_benchmark_run.py | 11 +++++++----
   2 files changed, 9 insertions(+), 6 deletions(-)

Modified: sandbox/variadic_templates/sandbox/slim/test/Makefile
==============================================================================
--- sandbox/variadic_templates/sandbox/slim/test/Makefile (original)
+++ sandbox/variadic_templates/sandbox/slim/test/Makefile 2012-10-24 20:20:06 EDT (Wed, 24 Oct 2012)
@@ -17,7 +17,7 @@
 SLIM_DIR=../slim/include
 #INCS:= -I$(SLIM_DIR) $(INCS)
 
-BFLAGS=-DTUPLE_SIZE=4 -DLAST_LESS=2 -DTUPLE_IMPL=tuple_impl_compstor.hpp -DTUPLE_CHUNK=4
+BFLAGS=-DTUPLE_SIZE=4 -DLAST_LESS=2 -DTUPLE_IMPL=tuple_impl_std.hpp -DTUPLE_CHUNK=4
 BFNAME:=$(shell ./flags2filename.pl -S $(BFLAGS))
 PROF_BASE=$(MAIN).$(HOW).$(BFNAME)
 COMPILER.clangxx_ins-rt=$(PATH.llvm.top)/llvm/projects/compiler-rt
@@ -75,7 +75,7 @@
 
 .PHONY: main.o
 main.o : $(MAIN).cpp
- $(COMPILE.$(HOW)) -c -std=c++11 $(BFLAGS) $(INCS) $<
+ $(COMPILE.$(HOW)) -c -MMD -std=c++11 $(BFLAGS) $(INCS) $<
 
 .PHONY: tuple.benchmark.report
 tuple.benchmark.report: $(MAIN).$(HOW).$(MEASURE)

Added: sandbox/variadic_templates/sandbox/slim/test/macros.benchmark.pp.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_templates/sandbox/slim/test/macros.benchmark.pp.hpp 2012-10-24 20:20:06 EDT (Wed, 24 Oct 2012)
@@ -0,0 +1,45 @@
+#if !defined(TUPLE_SIZE)
+ //This only used when not running several benchmarks where
+ //macro values are set on command line with -DMACRO=VALUE.
+ //See tuple.benchmark.mk.
+ #define TUPLE_IMPL tuple_impl_horizontal.hpp
+ //TUPLE_TEST_IMPL selects the tuple implementation method.
+ //TUPLE_TEST_VERTICAL selects the preprocessor generated
+ // tuples.
+ //TUPLE_TEST_HORIZONTAL selects the variadic template generated
+ // tuples (using a multiple inheritance method similar to
+ // that mentioned here:
+ // https://groups.google.com/forum/?fromgroups=#!msg/comp.std.c++/_-6X_xZlKlA/3Fw9_QnZSWQJ
+ // with subject:
+ // Variadic Templates in C++0x need some additional features to come closer to fulfilling their promise
+ // and date:
+ // 01/12/2009
+ // )
+ #define TUPLE_SIZE 4
+ //^size of the tuple used.
+ //Also, the number of at_test calls in test_row<I,J>::exec.
+ #define LAST_LESS 4
+ //^determines number of instantiations of test_col and test_row.
+ #define VALU_AT
+ //^Decides whether value of tuple elements is retrieved
+ //or some dummy value is used
+ //in test_row<I,J>::at_test.
+ //#define TRACE_BENCHMARK
+ #ifdef TRACE_BENCHMARK
+ #define USE_DEMANGLER
+ #ifdef USE_DEMANGLER
+ #include <boost/utility/demangled_type_name.hpp>
+ #endif
+ #endif
+#endif
+ //#define VERT_AMORT
+ //Purpose:
+ // Account for the amortized cost of
+ // amortized::make_indexes
+ //Use something less than TUPLE_SIZE as LAST_LESS
+ //if compile times become too large.
+#define LAST_RC ((LAST_LESS>TUPLE_SIZE)?TUPLE_SIZE:LAST_LESS)
+#define LAST_ROW LAST_RC
+#define LAST_COL LAST_RC
+ //test_row<I,J>::exec for I=0...LAST_ROW-1, for J=0...LAST_COL-1
+ //is called.

Modified: sandbox/variadic_templates/sandbox/slim/test/tuple_benchmark_run.py
==============================================================================
--- sandbox/variadic_templates/sandbox/slim/test/tuple_benchmark_run.py (original)
+++ sandbox/variadic_templates/sandbox/slim/test/tuple_benchmark_run.py 2012-10-24 20:20:06 EDT (Wed, 24 Oct 2012)
@@ -31,6 +31,7 @@
   tuple_min_size=10
   tuple_max_size=20
   tuple_del_size=10
+ boost_root="/home/evansl/prog_dev/boost-svn/ro/boost_1_49_0"
   compiler_map={}
   if False:
     compiler_map["gcc4_8"]=(
@@ -44,11 +45,13 @@
          )
   impl_map_hpp={}#implementation key -> implementation include .hpp file.
   impl_map_inc=collections.defaultdict(lambda:"")#implementation key -> -I include flags to compiler
- impl_map_hpp["horizontal"]="tuple_impl_horizontal.hpp"
- impl_map_hpp["vertical" ]="tuple_impl_vertical.hpp"
+ #impl_map_hpp["horizontal"]="tuple_impl_horizontal.hpp"
+ #impl_map_hpp["vertical" ]="tuple_impl_vertical.hpp"
+ impl_map_inc["vertical" ]=\
+ " -I"+boost_root\
+ #
   impl_map_hpp["std" ]="tuple_impl_std.hpp"
- #impl_map_hpp["compstor" ]="tuple_impl_compstor.hpp"
- boost_root="/home/evansl/prog_dev/boost-svn/ro/boost_1_49_0"
+ impl_map_hpp["compstor" ]="tuple_impl_compstor.hpp"
   impl_map_inc["compstor" ]=\
       " -I"+boost_root\
     + " -I"+boost_root+"/sandbox/rw/variadic_templates"\


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