|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81374 - sandbox/variadic_templates/sandbox/slim/test
From: cppljevans_at_[hidden]
Date: 2012-11-16 13:51:10
Author: cppljevans
Date: 2012-11-16 13:51:09 EST (Fri, 16 Nov 2012)
New Revision: 81374
URL: http://svn.boost.org/trac/boost/changeset/81374
Log:
Major revision.
Text files modified:
sandbox/variadic_templates/sandbox/slim/test/Makefile | 27 +++++
sandbox/variadic_templates/sandbox/slim/test/macros.benchmark.pp.hpp | 9 -
sandbox/variadic_templates/sandbox/slim/test/make_indexes.hpp | 4
sandbox/variadic_templates/sandbox/slim/test/tuple.benchmark.mini.cpp | 17 +--
sandbox/variadic_templates/sandbox/slim/test/tuple.benchmark.mini.time.txt | 134 +++++++++++++++-------------
sandbox/variadic_templates/sandbox/slim/test/tuple_benchmark_domain.py | 28 ++++-
sandbox/variadic_templates/sandbox/slim/test/tuple_benchmark_run.py | 185 +++++++++++++++++++--------------------
7 files changed, 224 insertions(+), 180 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-11-16 13:51:09 EST (Fri, 16 Nov 2012)
@@ -2,12 +2,16 @@
BENCHMARK=mini
BENCHMARK=tree_builder
MAIN=tuple.benchmark.$(BENCHMARK)
-MAIN=tuple.test
+BENCHMARKRUN.which=2012-11-12_13:51:16.064572
+#MAIN=tuple_constexpr.test
MEASURE=time
THISFILE=Makefile
PYTHON=python3.1
+PYTHON=python
HOW=gcc4_8_20120624
+#HOW=gcc4_8v
+HOW=gcc4_8_20121028
#HOW=clangxx_rel
DIR.root := $(shell dirup_dir_file.pl $(PWD) root.imk)
include $(DIR.root)/root.imk
@@ -18,7 +22,7 @@
SLIM_DIR=../slim/include
#INCS:= -I$(SLIM_DIR) $(INCS)
-BFLAGS=-DTUPLE_SIZE=4 -DLAST_LESS=2 -DTUPLE_IMPL=tuple_impl_bcon12_vertical.hpp -DTUPLE_CHUNK=4
+BFLAGS=-DTUPLE_SIZE=4 -DLAST_LESS=2 -DTUPLE_IMPL=vertical -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
@@ -142,6 +146,23 @@
echo:
@echo "SHELL="$(SHELL)
+.PHONY: benchmark_domain
+benchmark_domain:
+ $(PYTHON) tuple_benchmark_domain.py
+
.PHONY: benchmark_run
benchmark_run:
- $(PYTHON) tuple_benchmark_run.py
+ $(PYTHON) tuple_benchmark_run.py $(BENCHMARK)
+
+.PHONY: parse
+parse:
+ $(PYTHON) tuple_benchmark_parserange.py tuple.benchmark.tree_builder.guage_time@$(BENCHMARKRUN.which).txt
+
+.PHONY: tags
+tags:
+ python tuple_benchmark_tags.py
+
+.PHONY: plot
+plot:
+ $(PYTHON) tuple_benchmark_plot.py domain_range.pkl
+
Modified: sandbox/variadic_templates/sandbox/slim/test/macros.benchmark.pp.hpp
==============================================================================
--- sandbox/variadic_templates/sandbox/slim/test/macros.benchmark.pp.hpp (original)
+++ sandbox/variadic_templates/sandbox/slim/test/macros.benchmark.pp.hpp 2012-11-16 13:51:09 EST (Fri, 16 Nov 2012)
@@ -1,7 +1,7 @@
#if !defined(TUPLE_SIZE)
//This only used when not running several benchmarks where
//macro values are set on command line with -DMACRO=VALUE.
- #define TUPLE_IMPL tuple_impl_horizontal.hpp
+ #define TUPLE_IMPL horizontal
//TUPLE_TEST_IMPL selects the tuple implementation method.
//TUPLE_TEST_VERTICAL selects the preprocessor generated
// tuples.
@@ -17,13 +17,14 @@
#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
+ #define LAST_LESS 2
//^determines number of instantiations of test_col and test_row.
+ //if compile times become too large. reduce LAST_LESS.
#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
+ #define TRACE_BENCHMARK
#ifdef TRACE_BENCHMARK
#define USE_DEMANGLER
#ifdef USE_DEMANGLER
@@ -35,8 +36,6 @@
//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
Modified: sandbox/variadic_templates/sandbox/slim/test/make_indexes.hpp
==============================================================================
--- sandbox/variadic_templates/sandbox/slim/test/make_indexes.hpp (original)
+++ sandbox/variadic_templates/sandbox/slim/test/make_indexes.hpp 2012-11-16 13:51:09 EST (Fri, 16 Nov 2012)
@@ -1,5 +1,7 @@
#ifndef MAKE_INDEXES_HPP_INCLUDED
#define MAKE_INDEXES_HPP_INCLUDED
+namespace detail
+{
template<int Max,int... Indices>
struct make_indexes:
make_indexes<Max-1,Max-1,Indices...>
@@ -27,4 +29,6 @@
{
typedef int_indexes<Indices...> type;
};
+
+}
#endif
Modified: sandbox/variadic_templates/sandbox/slim/test/tuple.benchmark.mini.cpp
==============================================================================
--- sandbox/variadic_templates/sandbox/slim/test/tuple.benchmark.mini.cpp (original)
+++ sandbox/variadic_templates/sandbox/slim/test/tuple.benchmark.mini.cpp 2012-11-16 13:51:09 EST (Fri, 16 Nov 2012)
@@ -16,8 +16,9 @@
// when TUPLE_TEST_IMPL == TUPLE_TEST_VERTICAL:
// This method uses the boost preprocessor to generate
// member variables for the tuple elements:
-// HI tI;
+// HI hI;
// where I=0...N-1, where N is the size of the tuple.
+// and HI, i=1...N-1 are the tuple template args.
// when TUPLE_TEST_IMPL == TUPLE_TEST_HORIZONTAL:
// This method uses multiple inheritance of the
// tuple elements "paired" with a key in a
@@ -28,12 +29,7 @@
// HI element<int_key<I>,HI>::a;
//
-template<int Index>
-struct int_key //key's (or indices) to values stored in tuple.
-{
-};
-
-#include BOOST_PP_STRINGIZE(TUPLE_IMPL)
+#include BOOST_PP_STRINGIZE(tuple_impl.TUPLE_IMPL.hpp)
template<int Value>
struct int_value //values stored in tuple
@@ -54,11 +50,12 @@
typedef tuple_bench<Args...> type;
};
-//#define TRACE_MAIN
+#define TRACE_MAIN
#if defined(TRACE_BENCHMARK)||defined(TRACE_MAIN)
#include <iostream>
#endif
+#include "./int_key.hpp"
template<int I,int J=0>
struct test_row
{
@@ -146,14 +143,14 @@
{
#ifdef TRACE_MAIN
- std::cout<<"TUPLE_TEST_IMPL="<<TUPLE_TEST_IMPL<<"\n";
+ std::cout<<"TUPLE_IMPL="<<BOOST_PP_STRINGIZE(TUPLE_IMPL)<<"\n";
std::cout<<"TUPLE_SIZE="<<TUPLE_SIZE<<"\n";
std::cout<<"LAST_ROW="<<LAST_ROW<<"\n";
#endif
int const value=test_col<>::exec();
//The combination of the test_col general and special templates
//means the above call executes:
- // test_row<I>::exec()
+ // test_row<I>::exec()
//for I=0...LAST_COL
#ifdef TRACE_MAIN
std::cout<<"value="<<value<<"\n";
Modified: sandbox/variadic_templates/sandbox/slim/test/tuple.benchmark.mini.time.txt
==============================================================================
--- sandbox/variadic_templates/sandbox/slim/test/tuple.benchmark.mini.time.txt (original)
+++ sandbox/variadic_templates/sandbox/slim/test/tuple.benchmark.mini.time.txt 2012-11-16 13:51:09 EST (Fri, 16 Nov 2012)
@@ -5,68 +5,76 @@
Thread model: posix
compiler_exe= /home/evansl/download/llvm/svn/build/Release/bin/clang
}
-['compiler', 'TUPLE_IMPL', 'TUPLE_SIZE', 'LAST_LESS', 'TUPLE_CHUNK']
-['clangxx', 'horizontal', 10, 4, -1]
+['compiler', 'TUPLE_IMPL', 'TUPLE_SIZE', 'TUPLE_UNROLL_MAX', 'LAST_LESS']
+['clangxx', 'bcon12_horizontal', 10, -1, 4]
{
-user:0.26 system:0.00 elapsed:0.25
-}
-['clangxx', 'horizontal', 20, 4, -1]
-{
-user:0.42 system:0.06 elapsed:0.47
-}
-['clangxx', 'horizontal', 30, 4, -1]
-{
-user:0.60 system:0.10 elapsed:0.69
-}
-['clangxx', 'horizontal', 40, 4, -1]
-{
-user:0.86 system:0.08 elapsed:0.93
-}
-['clangxx', 'bcon12_horizontal', 10, 4, -1]
-{
-user:0.53 system:0.03 elapsed:0.55
-}
-['clangxx', 'bcon12_horizontal', 20, 4, -1]
-{
-user:0.75 system:0.08 elapsed:0.82
-}
-['clangxx', 'bcon12_horizontal', 30, 4, -1]
-{
-user:1.00 system:0.11 elapsed:1.10
-}
-['clangxx', 'bcon12_horizontal', 40, 4, -1]
-{
-user:1.30 system:0.11 elapsed:1.40
-}
-['clangxx', 'vertical', 10, 4, 10]
-{
-user:0.24 system:0.04 elapsed:0.33
-}
-['clangxx', 'vertical', 20, 4, 10]
-{
-user:0.40 system:0.02 elapsed:0.41
-}
-['clangxx', 'vertical', 30, 4, 10]
-{
-user:0.56 system:0.05 elapsed:0.60
-}
-['clangxx', 'vertical', 40, 4, 10]
-{
-user:0.74 system:0.07 elapsed:0.80
-}
-['clangxx', 'bcon12_vertical', 10, 4, -1]
-{
-user:0.45 system:0.05 elapsed:0.49
-}
-['clangxx', 'bcon12_vertical', 20, 4, -1]
-{
-user:0.63 system:0.04 elapsed:0.66
-}
-['clangxx', 'bcon12_vertical', 30, 4, -1]
-{
-user:0.76 system:0.11 elapsed:0.86
-}
-['clangxx', 'bcon12_vertical', 40, 4, -1]
-{
-user:0.98 system:0.08 elapsed:1.05
+tuple.benchmark.mini.cpp:32:10: fatal error: 'tuple_impl.bcon12_horizontal.hpp' file not found
+#include BOOST_PP_STRINGIZE(tuple_impl.TUPLE_IMPL.hpp)
+ ^
+/usr/include/boost/preprocessor/stringize.hpp:28:38: note: expanded from macro 'BOOST_PP_STRINGIZE'
+# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text)
+ ^
+/usr/include/boost/preprocessor/stringize.hpp:31:37: note: expanded from macro 'BOOST_PP_STRINGIZE_I'
+# define BOOST_PP_STRINGIZE_I(text) #text
+ ^
+<scratch space>:2:1: note: expanded from macro '#'
+"tuple_impl.bcon12_horizontal.hpp"
+^
+1 error generated.
+Command exited with non-zero status 1
+user:0.68 system:0.06 elapsed:0.73
+}
+['clangxx', 'bcon12_horizontal', 20, -1, 4]
+{
+tuple.benchmark.mini.cpp:32:10: fatal error: 'tuple_impl.bcon12_horizontal.hpp' file not found
+#include BOOST_PP_STRINGIZE(tuple_impl.TUPLE_IMPL.hpp)
+ ^
+/usr/include/boost/preprocessor/stringize.hpp:28:38: note: expanded from macro 'BOOST_PP_STRINGIZE'
+# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text)
+ ^
+/usr/include/boost/preprocessor/stringize.hpp:31:37: note: expanded from macro 'BOOST_PP_STRINGIZE_I'
+# define BOOST_PP_STRINGIZE_I(text) #text
+ ^
+<scratch space>:2:1: note: expanded from macro '#'
+"tuple_impl.bcon12_horizontal.hpp"
+^
+1 error generated.
+Command exited with non-zero status 1
+user:0.69 system:0.03 elapsed:0.71
+}
+['clangxx', 'bcon12_horizontal', 30, -1, 4]
+{
+tuple.benchmark.mini.cpp:32:10: fatal error: 'tuple_impl.bcon12_horizontal.hpp' file not found
+#include BOOST_PP_STRINGIZE(tuple_impl.TUPLE_IMPL.hpp)
+ ^
+/usr/include/boost/preprocessor/stringize.hpp:28:38: note: expanded from macro 'BOOST_PP_STRINGIZE'
+# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text)
+ ^
+/usr/include/boost/preprocessor/stringize.hpp:31:37: note: expanded from macro 'BOOST_PP_STRINGIZE_I'
+# define BOOST_PP_STRINGIZE_I(text) #text
+ ^
+<scratch space>:2:1: note: expanded from macro '#'
+"tuple_impl.bcon12_horizontal.hpp"
+^
+1 error generated.
+Command exited with non-zero status 1
+user:0.66 system:0.06 elapsed:0.71
+}
+['clangxx', 'bcon12_horizontal', 40, -1, 4]
+{
+tuple.benchmark.mini.cpp:32:10: fatal error: 'tuple_impl.bcon12_horizontal.hpp' file not found
+#include BOOST_PP_STRINGIZE(tuple_impl.TUPLE_IMPL.hpp)
+ ^
+/usr/include/boost/preprocessor/stringize.hpp:28:38: note: expanded from macro 'BOOST_PP_STRINGIZE'
+# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text)
+ ^
+/usr/include/boost/preprocessor/stringize.hpp:31:37: note: expanded from macro 'BOOST_PP_STRINGIZE_I'
+# define BOOST_PP_STRINGIZE_I(text) #text
+ ^
+<scratch space>:2:1: note: expanded from macro '#'
+"tuple_impl.bcon12_horizontal.hpp"
+^
+1 error generated.
+Command exited with non-zero status 1
+user:0.66 system:0.06 elapsed:0.71
}
Modified: sandbox/variadic_templates/sandbox/slim/test/tuple_benchmark_domain.py
==============================================================================
--- sandbox/variadic_templates/sandbox/slim/test/tuple_benchmark_domain.py (original)
+++ sandbox/variadic_templates/sandbox/slim/test/tuple_benchmark_domain.py 2012-11-16 13:51:09 EST (Fri, 16 Nov 2012)
@@ -3,7 +3,7 @@
# of the tuple benchmark. A domain is all
# the various inputs to the benchmark.
# For example:
-# 1) the particular compilers used to compiler the benchmark.
+# 1) the particular compilers used to compile the benchmark.
# 2) the values of various macros used in the source code.
#
from product_dep import product_dep
@@ -29,7 +29,7 @@
return self.sizes
class last(object):
- "LAST_LESS macro values"
+ "LAST_LESS macro values. Only used in mini benchmark."
def __init__(self, size_start, size_step=1):
self.start=size_start
self.step=size_step
@@ -40,13 +40,13 @@
, self.step
)
-class chunk(object):
- "TUPLE_CHUNK macro values(only used with vertical impl)"
+class unroll_max(object):
+ "TUPLE_UNROLL_MAX macro values(only used with vertical impl)"
def __init__(self, size_start=2, size_step=4):
self.start=size_start
self.step=size_step
def __call__(self,xs):
- if xs[1] == 'vertical':
+ if ((xs[1] == 'vertical') or (xs[1] == 'bcon12_vertical')):
if False:
return range(
xs[2]#self.start
@@ -57,6 +57,22 @@
return [10]
return [-1]
+class tree_depth(object):
+ "TREE_DEPTH macro values(only used in tree_builder benchmark)"
+ def __init__(self, depth_start=2, depth_finish=4, depth_step=1):
+ self.start=depth_start
+ self.finish=depth_finish
+ self.step=depth_step
+ def __call__(self,xs):
+ if True:
+ return range(
+ self.start
+ , self.finish+1
+ , self.step
+ )
+ else:
+ return [2]
+
if __name__ == '__main__':
tuple_max_size=8
tuple_min_size=4
@@ -66,7 +82,7 @@
, impls(["impl1","vertical"])
, sizes(range(tuple_min_size,tuple_max_size+1,tuple_del_size))
, last(tuple_min_size,tuple_del_size)
- , chunk()
+ , unroll_max()
])
for element in domain():
print(element)
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-11-16 13:51:09 EST (Fri, 16 Nov 2012)
@@ -1,87 +1,80 @@
-#!/usr/bin/python3.1
-from tuple_benchmark_domain import *
+#!/usr/bin/env python
+"""
+Run compilers on programs while recording resources usage.
+"""
+from __future__ import print_function
+from compiler_map import COMPILER_MAP
+from tuple_benchmark_tags import TAG_TUPLE
+import sys
+from datetime import datetime
import subprocess
-import collections
-
-def measure_time(compiler_exe, compiler_args, measure_out):
- compile_cmd=compiler_exe+compiler_args
- time_format='"user:%U system:%S elapsed:%e"'
- measure_cmd='time --format '+time_format+' '+compile_cmd
- print(":measure_cmd=",measure_cmd)
- rc=subprocess.call(
- measure_cmd
- , shell=True
- , stdout=measure_out
- , stderr=subprocess.STDOUT
- )
- print(":rc=",rc)
-def measure_ftime(compiler_exe, compiler_args, measure_out):
- measure_cmd=compiler_exe+" -ftime-report "+compiler_args
- print(":measure_cmd=",measure_cmd)
- rc=subprocess.call(
- measure_cmd
- , shell=True
- , stdout=measure_out
- , stderr=subprocess.STDOUT
- )
- print(":rc=",rc)
+from tuple_benchmark_domain import *
+import compiler_guage
-if __name__ == '__main__':
- tuple_min_size=10
- tuple_max_size=40
- tuple_del_size=10
+def main(argv):
+ result = None
+ #print("argv=",argv)
+ if len(argv)>1:
+ benchmark_suffix=argv[1]
+ else:
+ benchmark_suffix="mini"
+ benchmark_presuffix="tuple.benchmark."+benchmark_suffix
+ benchmark_basename=benchmark_presuffix+".cpp"
+ #print("benchmark_basename=",benchmark_basename)
boost_root="/home/evansl/prog_dev/boost-svn/ro/boost_1_49_0"
- compiler_map={}
+ impl_map_inc={}#implementation key -> -I include flags to compiler
+ if False:
+ impl_map_inc["horizontal"]=\
+ ""\
+ #
if False:
- compiler_map["gcc4_8"]=(
- "/home/evansl/download/gcc/4.8-20120923/install/bin/g++"
- , "-std=gnu++11"
- )
+ impl_map_inc["vertical"]=\
+ " -I"+boost_root\
+ #
if True:
- compiler_map["clangxx"]=(
- "/home/evansl/download/llvm/svn/build/Release/bin/clang"
- , "-std=c++11 -cxx-isystem /home/evansl/download/llvm/svn/llvm/projects/libcxx/include"
- )
- impl_map_hpp={}#implementation key -> implementation include .hpp file.
- impl_map_hpp["horizontal"]="tuple_impl_horizontal.hpp"
- impl_map_hpp["vertical" ]="tuple_impl_vertical.hpp"
- impl_map_hpp["bcon12_horizontal"]="tuple_impl_bcon12_horizontal.hpp"
- impl_map_hpp["bcon12_vertical" ]="tuple_impl_bcon12_vertical.hpp"
- #impl_map_hpp["std" ]="tuple_impl_std.hpp"
- #impl_map_hpp["compstor" ]="tuple_impl_compstor.hpp"
- impl_map_inc=collections.defaultdict(lambda:"")#implementation key -> -I include flags to compiler
- impl_map_inc["vertical" ]=\
- " -I"+boost_root\
- #
- impl_map_inc["bcon12_vertical" ]=\
- " -I"+boost_root\
- #
- impl_map_inc["compstor" ]=\
- " -I"+boost_root\
- + " -I"+boost_root+"/sandbox/rw/variadic_templates"\
- #
+ impl_map_inc["bcon12_horizontal"]=\
+ ""\
+ #
+ if True:
+ impl_map_inc["bcon12_vertical"]=\
+ " -I"+boost_root\
+ #
+ if False:
+ impl_map_inc["compstor"]=\
+ " -I"+boost_root\
+ + " -I"+boost_root+"/sandbox/rw/variadic_templates"\
+ #
+ if False:
+ impl_map_inc["std"]=\
+ ""\
+ #
+ tuple_min_size=5
+ tuple_max_size=5
+ tuple_del_size=5
name_domain=[
- [ 'compiler', compilers(compiler_map.keys())]
- , [ 'TUPLE_IMPL', impls(impl_map_hpp.keys())]
+ [ 'compiler', compilers(COMPILER_MAP.keys())]
+ , [ 'TUPLE_IMPL', impls(impl_map_inc.keys())]
, [ 'TUPLE_SIZE', sizes(range(tuple_min_size,tuple_max_size+1,tuple_del_size))]
- , [ 'LAST_LESS', last(4,tuple_del_size)]
- , [ 'TUPLE_CHUNK', chunk()]
+ , [ 'TUPLE_UNROLL_MAX', unroll_max()]
]
- domain=product_dep(
+ if benchmark_suffix == "mini" :
+ name_domain.append( [ 'LAST_LESS', last(4,tuple_del_size)])
+ else:
+ name_domain.append( [ 'TREE_DEPTH', tree_depth(2,2,1)])
+ domains=product_dep(
map(lambda t: t[1], name_domain)
)
- measures={
- 'time' : measure_time
- , 'ftime' : measure_ftime
- }
- measure_key='time'
- benchmark="tuple.benchmark.mini"
- measure_out=open(benchmark+"."+measure_key+".txt",mode='w')
- for compiler_name in compiler_map.keys():
- (compiler_exe,compiler_flags)=compiler_map[compiler_name]
- print("compiler=",compiler_name,file=measure_out)
- print("version={",file=measure_out)
+ guage=compiler_guage.guage_time()
+ measure_key=guage.__class__.__name__
+ dtfmt=datetime.now().isoformat('_')
+ dtfmt="_"
+ measure_out=open(benchmark_presuffix+"."+measure_key+"@"+dtfmt+".txt",mode='w')
+ print(TAG_TUPLE.compilers+"[",file=measure_out)
+ for compiler_name in COMPILER_MAP.keys():
+ (compiler_exe,compiler_flags)=COMPILER_MAP[compiler_name]
+ print("compiler_name:",compiler_name,file=measure_out)
+ print(TAG_TUPLE.version+"[",file=measure_out)
measure_out.flush()
rc=subprocess.call(
compiler_exe+" -v"
@@ -90,32 +83,38 @@
, stderr=subprocess.STDOUT
)
if compiler_name == 'clangxx':
- print("compiler_exe=",compiler_exe,file=measure_out)
- print("}",file=measure_out)
- print(list(map(lambda t: t[0], name_domain)),file=measure_out)
- for element in domain():
- print(element,file=measure_out)
- (compiler_name, impl_name, size, last, chk)=element
- #print(":compiler_name=",compiler_name,":impl_name=",impl_name,":size=",size,":last=",last)
- compiler_macros=\
- " -DTUPLE_IMPL="+impl_map_hpp[impl_name]\
- + " -DTUPLE_SIZE="+str(size)\
- + " -DLAST_LESS="+str(last)\
- + " -DTUPLE_CHUNK="+str(chk)
+ print("compiler_exe:",compiler_exe,file=measure_out)
+ print("]"+TAG_TUPLE.version,file=measure_out)
+ print("]"+TAG_TUPLE.compilers,file=measure_out)
+ domain_names=list(map(lambda t:t[0],name_domain))
+ print(TAG_TUPLE.domain_names,domain_names,sep="",end=TAG_TUPLE.domain_names+"\n",file=measure_out)
+ macro_names=domain_names[1:]
+ for element in domains():
+ print(TAG_TUPLE.domain_values,element,sep="",end=TAG_TUPLE.domain_values+"\n",file=measure_out)
+ compiler_name, macro_vals=element[0], element[1:]
+ #print(":compiler_name=",compiler_name,":macro_vals=",macro_vals)
+ compiler_macros=""
+ for name,value in zip(macro_names,macro_vals):
+ compiler_macros+=" -D"+name+"="+str(value)
#print(":compiler_macros=",compiler_macros)
- (compiler_exe,compiler_flags)=compiler_map[compiler_name]
+ (compiler_exe,compiler_flags)=COMPILER_MAP[compiler_name]
#print(":compiler_exe=",compiler_exe,":compiler_flags=",compiler_flags)
compiler_args=\
" -c "\
+ compiler_flags+" "\
+ compiler_macros+" "\
- + impl_map_inc[impl_name]+" "\
- + benchmark+".cpp"\
+ + impl_map_inc[macro_vals[0]]+" "\
+ + benchmark_basename\
#
- print("{",file=measure_out)
+ print(TAG_TUPLE.range_out+"[",file=measure_out)
measure_out.flush()
- measures[measure_key](compiler_exe, compiler_args, measure_out)
- print("}",file=measure_out)
-
-
+ measure_rc=guage.measure(compiler_exe, compiler_args, measure_out)
+ print("]"+TAG_TUPLE.range_out,file=measure_out)
+ if measure_rc != 0:
+ return measure_rc
+ return result
+if __name__ == '__main__':
+ ret = main(sys.argv)
+ if ret is not None:
+ sys.exit(ret)
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