compbench-devel Mailing List for CompBenchmarks (Page 34)
Brought to you by:
xfred
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(48) |
Oct
(51) |
Nov
(66) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(242) |
Feb
(56) |
Mar
(95) |
Apr
(120) |
May
(127) |
Jun
(32) |
Jul
(10) |
Aug
(55) |
Sep
(114) |
Oct
(3) |
Nov
|
Dec
|
From: Frederic T. <xf...@us...> - 2007-01-04 19:47:14
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24156 Modified Files: CBM.pm CBM_wrap.cxx Log Message: Many changes... Index: CBM.pm =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/CBM.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CBM.pm 28 Dec 2006 18:37:37 -0000 1.3 --- CBM.pm 4 Jan 2007 19:47:11 -0000 1.4 *************** *** 67,71 **** *Configuration = *CBMc::CBMSystem_Configuration; *init = *CBMc::CBMSystem_init; ! *bmList = *CBMc::CBMSystem_bmList; *Split = *CBMc::CBMSystem_Split; *Chomp = *CBMc::CBMSystem_Chomp; --- 67,74 ---- *Configuration = *CBMc::CBMSystem_Configuration; *init = *CBMc::CBMSystem_init; ! *packageList = *CBMc::CBMSystem_packageList; ! *packageNumber = *CBMc::CBMSystem_packageNumber; ! *Package = *CBMc::CBMSystem_Package; ! *Benchmark = *CBMc::CBMSystem_Benchmark; *Split = *CBMc::CBMSystem_Split; *Chomp = *CBMc::CBMSystem_Chomp; *************** *** 182,233 **** ! ############# Class : CBM::CBMBenchmark ############## ! package CBM::CBMBenchmark; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( CBM ); %OWNER = (); %ITERATORS = (); ! *Unknown = *CBMc::CBMBenchmark_Unknown; ! *Downloaded = *CBMc::CBMBenchmark_Downloaded; ! *Extracted = *CBMc::CBMBenchmark_Extracted; ! *Patched = *CBMc::CBMBenchmark_Patched; ! *Preconfigured = *CBMc::CBMBenchmark_Preconfigured; ! *Configured = *CBMc::CBMBenchmark_Configured; ! *Made = *CBMc::CBMBenchmark_Made; ! *Tested = *CBMc::CBMBenchmark_Tested; ! *Benchmarked = *CBMc::CBMBenchmark_Benchmarked; ! *packageName = *CBMc::CBMBenchmark_packageName; ! *packageVersion = *CBMc::CBMBenchmark_packageVersion; ! *packageSize = *CBMc::CBMBenchmark_packageSize; ! *packageComments = *CBMc::CBMBenchmark_packageComments; ! *localPackageName = *CBMc::CBMBenchmark_localPackageName; ! *benchmarkName = *CBMc::CBMBenchmark_benchmarkName; ! *benchmarkComments = *CBMc::CBMBenchmark_benchmarkComments; ! *language = *CBMc::CBMBenchmark_language; ! *license = *CBMc::CBMBenchmark_license; ! *homePage = *CBMc::CBMBenchmark_homePage; ! *author = *CBMc::CBMBenchmark_author; ! *localPackageAbsoluteName = *CBMc::CBMBenchmark_localPackageAbsoluteName; ! *localPackageAbsoluteDirectory = *CBMc::CBMBenchmark_localPackageAbsoluteDirectory; ! *extractDirectory = *CBMc::CBMBenchmark_extractDirectory; ! *hasTest = *CBMc::CBMBenchmark_hasTest; ! *downloadURL = *CBMc::CBMBenchmark_downloadURL; ! *display = *CBMc::CBMBenchmark_display; ! *benchmarkSize = *CBMc::CBMBenchmark_benchmarkSize; ! *ContextMatches = *CBMc::CBMBenchmark_ContextMatches; ! *Download = *CBMc::CBMBenchmark_Download; ! *Extract = *CBMc::CBMBenchmark_Extract; ! *Patch = *CBMc::CBMBenchmark_Patch; ! *PreConfigure = *CBMc::CBMBenchmark_PreConfigure; ! *Configure = *CBMc::CBMBenchmark_Configure; ! *Make = *CBMc::CBMBenchmark_Make; ! *Test = *CBMc::CBMBenchmark_Test; ! *Bench = *CBMc::CBMBenchmark_Bench; ! *Release = *CBMc::CBMBenchmark_Release; ! *Install = *CBMc::CBMBenchmark_Install; ! *Fetch = *CBMc::CBMBenchmark_Fetch; ! *Uninstall = *CBMc::CBMBenchmark_Uninstall; ! *getStatus = *CBMc::CBMBenchmark_getStatus; sub DESTROY { return unless $_[0]->isa('HASH'); --- 185,238 ---- ! ############# Class : CBM::CBMPackage ############## ! package CBM::CBMPackage; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( CBM ); %OWNER = (); %ITERATORS = (); ! *Unknown = *CBMc::CBMPackage_Unknown; ! *Downloaded = *CBMc::CBMPackage_Downloaded; ! *Extracted = *CBMc::CBMPackage_Extracted; ! *Patched = *CBMc::CBMPackage_Patched; ! *Preconfigured = *CBMc::CBMPackage_Preconfigured; ! *Configured = *CBMc::CBMPackage_Configured; ! *Made = *CBMc::CBMPackage_Made; ! *Tested = *CBMc::CBMPackage_Tested; ! *Benchmarked = *CBMc::CBMPackage_Benchmarked; ! *display = *CBMc::CBMPackage_display; ! *System = *CBMc::CBMPackage_System; ! *Benchmarks = *CBMc::CBMPackage_Benchmarks; ! *benchmarkNumber = *CBMc::CBMPackage_benchmarkNumber; ! *Benchmark = *CBMc::CBMPackage_Benchmark; ! *storeStatus = *CBMc::CBMPackage_storeStatus; ! *packageName = *CBMc::CBMPackage_packageName; ! *packageVersion = *CBMc::CBMPackage_packageVersion; ! *packageSize = *CBMc::CBMPackage_packageSize; ! *packageComments = *CBMc::CBMPackage_packageComments; ! *localPackageName = *CBMc::CBMPackage_localPackageName; ! *language = *CBMc::CBMPackage_language; ! *license = *CBMc::CBMPackage_license; ! *homePage = *CBMc::CBMPackage_homePage; ! *author = *CBMc::CBMPackage_author; ! *localPackageAbsoluteName = *CBMc::CBMPackage_localPackageAbsoluteName; ! *localPackageAbsoluteDirectory = *CBMc::CBMPackage_localPackageAbsoluteDirectory; ! *extractDirectory = *CBMc::CBMPackage_extractDirectory; ! *hasTest = *CBMc::CBMPackage_hasTest; ! *downloadURL = *CBMc::CBMPackage_downloadURL; ! *benchmarkSize = *CBMc::CBMPackage_benchmarkSize; ! *ContextMatches = *CBMc::CBMPackage_ContextMatches; ! *Download = *CBMc::CBMPackage_Download; ! *Extract = *CBMc::CBMPackage_Extract; ! *Patch = *CBMc::CBMPackage_Patch; ! *PreConfigure = *CBMc::CBMPackage_PreConfigure; ! *Configure = *CBMc::CBMPackage_Configure; ! *Make = *CBMc::CBMPackage_Make; ! *Test = *CBMc::CBMPackage_Test; ! *Release = *CBMc::CBMPackage_Release; ! *Install = *CBMc::CBMPackage_Install; ! *Fetch = *CBMc::CBMPackage_Fetch; ! *Uninstall = *CBMc::CBMPackage_Uninstall; ! *getStatus = *CBMc::CBMPackage_getStatus; sub DESTROY { return unless $_[0]->isa('HASH'); *************** *** 236,240 **** delete $ITERATORS{$self}; if (exists $OWNER{$self}) { ! CBMc::delete_CBMBenchmark($self); delete $OWNER{$self}; } --- 241,245 ---- delete $ITERATORS{$self}; if (exists $OWNER{$self}) { ! CBMc::delete_CBMPackage($self); delete $OWNER{$self}; } *************** *** 254,272 **** ! ############# Class : CBM::CBMBenchmarkSelector ############## ! package CBM::CBMBenchmarkSelector; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( CBM ); %OWNER = (); %ITERATORS = (); ! sub new { ! my $pkg = shift; ! my $self = CBMc::new_CBMBenchmarkSelector(@_); ! bless $self, $pkg if defined($self); ! } ! ! *select = *CBMc::CBMBenchmarkSelector_select; ! *displayList = *CBMc::CBMBenchmarkSelector_displayList; sub DESTROY { return unless $_[0]->isa('HASH'); --- 259,274 ---- ! ############# Class : CBM::CBMBenchmark ############## ! package CBM::CBMBenchmark; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( CBM ); %OWNER = (); %ITERATORS = (); ! *Package = *CBMc::CBMBenchmark_Package; ! *display = *CBMc::CBMBenchmark_display; ! *benchmarkName = *CBMc::CBMBenchmark_benchmarkName; ! *benchmarkComments = *CBMc::CBMBenchmark_benchmarkComments; ! *Bench = *CBMc::CBMBenchmark_Bench; sub DESTROY { return unless $_[0]->isa('HASH'); *************** *** 275,279 **** delete $ITERATORS{$self}; if (exists $OWNER{$self}) { ! CBMc::delete_CBMBenchmarkSelector($self); delete $OWNER{$self}; } --- 277,281 ---- delete $ITERATORS{$self}; if (exists $OWNER{$self}) { ! CBMc::delete_CBMBenchmark($self); delete $OWNER{$self}; } Index: CBM_wrap.cxx =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/CBM_wrap.cxx,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CBM_wrap.cxx 28 Dec 2006 18:37:37 -0000 1.3 --- CBM_wrap.cxx 4 Jan 2007 19:47:11 -0000 1.4 *************** *** 1381,1388 **** #define SWIGTYPE_p_CBMBenchmark swig_types[0] ! #define SWIGTYPE_p_CBMBenchmarkSelector swig_types[1] ! #define SWIGTYPE_p_CBMCompiler swig_types[2] ! #define SWIGTYPE_p_CBMCompilerOptions swig_types[3] ! #define SWIGTYPE_p_CBMCompilerSelector swig_types[4] #define SWIGTYPE_p_CBMSystem swig_types[5] #define SWIGTYPE_p_CBMSystemLinux swig_types[6] --- 1381,1388 ---- [...3608 lines suppressed...] } while(0) /*@SWIG@*/; /*@SWIG:%set_constant@*/ do { ! SV *sv = get_sv((char*) SWIG_prefix "CBMPackage_Made", TRUE | 0x2); ! sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast<int >(CBMPackage::Made))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:%set_constant@*/ do { ! SV *sv = get_sv((char*) SWIG_prefix "CBMPackage_Tested", TRUE | 0x2); ! sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast<int >(CBMPackage::Tested))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:%set_constant@*/ do { ! SV *sv = get_sv((char*) SWIG_prefix "CBMPackage_Benchmarked", TRUE | 0x2); ! sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast<int >(CBMPackage::Benchmarked))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; + SWIG_TypeClientData(SWIGTYPE_p_CBMPackage, (void*) "CBM::CBMPackage"); SWIG_TypeClientData(SWIGTYPE_p_CBMBenchmark, (void*) "CBM::CBMBenchmark"); SWIG_TypeClientData(SWIGTYPE_p_CBMCompiler, (void*) "CBM::CBMCompiler"); SWIG_TypeClientData(SWIGTYPE_p_CBMCompilerSelector, (void*) "CBM::CBMCompilerSelector"); |
From: Frederic T. <xf...@us...> - 2007-01-04 19:46:30
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23784 Added Files: 02-CBMSystem-benchs.pl Log Message: 02-CBMBenchmarkSelector-public.pl renamed. --- NEW FILE: 02-CBMSystem-benchs.pl --- #!/usr/bin/perl -w -I .. use strict; use CBM; use Test::More; require "libtest.pl"; our $top_srcdir; my @benchmarks = `cat $top_srcdir/../../SupportedBenchmarks/benchmarks.list | grep -v '^#' | cut -f1 -d':'`; chomp(@benchmarks); plan tests => (@benchmarks+0)*53; my $sys; $sys = CBM::Init(); my $b; my $p; my %bm_hash; foreach(@benchmarks) { print ">$_\n"; $b = $sys->Benchmark($_); ok(defined($b), "loading $_"); if (!defined($b)) { my $N = 52; while ($N--) { ok(0); } next; } $p=$b->Package(); ok(defined($p), "package for $_"); my $s=$p->getStatus(); ok(defined($s), "status exists for $_"); ok(($s>=0) && ($s<=8), "valid status for $_ : '$s'"); my $pack = "$_"; $pack =~ s/^(.*?)-.+/$1/g; ok($pack eq $p->packageName(), "checking packageName() for $_ : '$pack'/" . $p->packageName()); check_simple($p->packageVersion()); my $siz = $p->packageSize(); check_simple($siz); ok($siz > 0); check_simple($p->packageComments()); check_simple($p->localPackageName()); my $bn = $b->benchmarkName(); check_simple($bn); ok($bn eq $_, "checking benchmark's name : got '$bn', expected '$_'"); check_simple($b->benchmarkComments()); my $lang = $p->language(); check_simple($lang); ok( ($lang eq "C") || ($lang eq "C++")); check_simple($p->license()); check_simple($p->author()); check_simple($p->localPackageAbsoluteName()); check_simple($p->localPackageAbsoluteDirectory()); my $hast = $p->hasTest(); ok( ($hast==0) || ($hast==1) ); } $sys->done(); |
From: Frederic T. <xf...@us...> - 2007-01-04 19:46:16
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23762 Modified Files: Makefile.am Removed Files: 02-CBMBenchmarkSelector-public.pl Log Message: 02-CBMBenchmarkSelector-public.pl renamed. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.am 28 Dec 2006 18:52:01 -0000 1.4 --- Makefile.am 4 Jan 2007 19:46:10 -0000 1.5 *************** *** 3,7 **** prog_tests = 00-Glue.pl \ 00-CBMSystem-public.pl 01-CBMSystem-protected.pl \ ! 02-CBMBenchmarkSelector-public.pl \ 03-CBMCompilerSelector-public.pl --- 3,7 ---- prog_tests = 00-Glue.pl \ 00-CBMSystem-public.pl 01-CBMSystem-protected.pl \ ! 02-CBMSystem-benchs.pl \ 03-CBMCompilerSelector-public.pl *************** *** 9,13 **** $(top_srcdir)/CBM-PI/t/00-CBMSystem-public.pl \ $(top_srcdir)/CBM-PI/t/01-CBMSystem-protected.pl \ ! $(top_srcdir)/CBM-PI/t/02-CBMBenchmarkSelector-public.pl \ $(top_srcdir)/CBM-PI/t/03-CBMCompilerSelector-public.pl --- 9,13 ---- $(top_srcdir)/CBM-PI/t/00-CBMSystem-public.pl \ $(top_srcdir)/CBM-PI/t/01-CBMSystem-protected.pl \ ! $(top_srcdir)/CBM-PI/t/02-CBMSystem-benchs.pl \ $(top_srcdir)/CBM-PI/t/03-CBMCompilerSelector-public.pl --- 02-CBMBenchmarkSelector-public.pl DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-04 19:39:57
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21131 Modified Files: Benchmark.h Package.cpp Package.h Log Message: Fixes for CBMPackage and new related API. Index: Benchmark.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Benchmark.h 4 Jan 2007 18:56:13 -0000 1.14 --- Benchmark.h 4 Jan 2007 19:39:52 -0000 1.15 *************** *** 78,83 **** #define DLPackageWrapper_declare() \ ! BenchmarkVector& Benchmarks(void); \ ! CBMBenchmark *Benchmark(std::string bid) #endif --- 78,83 ---- #define DLPackageWrapper_declare() \ ! virtual BenchmarkVector& Benchmarks(void); \ ! virtual CBMBenchmark *Benchmark(std::string bid) #endif Index: Package.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Package.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Package.cpp 4 Jan 2007 18:56:13 -0000 1.2 --- Package.cpp 4 Jan 2007 19:39:52 -0000 1.3 *************** *** 40,43 **** --- 40,44 ---- CBMBenchmark *CBMPackage::Benchmark(std::string bid) { + std::cerr << "virtual CBMPackage::Benchmark() called" << std::endl; return(0); } Index: Package.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Package.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Package.h 4 Jan 2007 18:56:13 -0000 1.2 --- Package.h 4 Jan 2007 19:39:52 -0000 1.3 *************** *** 52,56 **** private: /** Package status ! * \sa CBMBenchmark::Status * \sa storeStatus() * \sa getStatus() --- 52,56 ---- private: /** Package status ! * \sa CBMPackage::Status * \sa storeStatus() * \sa getStatus() *************** *** 192,196 **** /** Get a benchmark according to its identifier. \return References to a CBMBenchmark object */ ! class CBMBenchmark *Benchmark(std::string bid); /** Stores benchmark status --- 192,196 ---- /** Get a benchmark according to its identifier. \return References to a CBMBenchmark object */ ! virtual class CBMBenchmark *Benchmark(std::string bid); /** Stores benchmark status *************** *** 399,403 **** /** Returns benchmark's status * \return status (enum). ! * \sa CBMBenchmark::Status */ virtual Status getStatus(void); --- 399,403 ---- /** Returns benchmark's status * \return status (enum). ! * \sa CBMPackage::Status */ virtual Status getStatus(void); |
From: Frederic T. <xf...@us...> - 2007-01-04 19:37:53
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20381 Modified Files: 02-CBMBenchmarkSelector-public.pl 03-CBMCompilerSelector-public.pl Log Message: CBMPackage and new related API used. Index: 02-CBMBenchmarkSelector-public.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/02-CBMBenchmarkSelector-public.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 02-CBMBenchmarkSelector-public.pl 28 Dec 2006 18:52:32 -0000 1.3 --- 02-CBMBenchmarkSelector-public.pl 4 Jan 2007 19:37:50 -0000 1.4 *************** *** 10,14 **** my @benchmarks = `cat $top_srcdir/../../SupportedBenchmarks/benchmarks.list | grep -v '^#' | cut -f1 -d':'`; chomp(@benchmarks); ! plan tests => (@benchmarks+0)*52; my $sys; --- 10,14 ---- my @benchmarks = `cat $top_srcdir/../../SupportedBenchmarks/benchmarks.list | grep -v '^#' | cut -f1 -d':'`; chomp(@benchmarks); ! plan tests => (@benchmarks+0)*53; my $sys; *************** *** 16,21 **** $sys = CBM::Init(); - my $BMS = CBM::CBMBenchmarkSelector->new($sys); my $b; my %bm_hash; --- 16,21 ---- $sys = CBM::Init(); my $b; + my $p; my %bm_hash; *************** *** 23,30 **** foreach(@benchmarks) { print ">$_\n"; ! $b = $BMS->select($_); ok(defined($b), "loading $_"); if (!defined($b)) { ! my $N = 14; while ($N--) { ok(0); --- 23,30 ---- foreach(@benchmarks) { print ">$_\n"; ! $b = $sys->Benchmark($_); ok(defined($b), "loading $_"); if (!defined($b)) { ! my $N = 52; while ($N--) { ok(0); *************** *** 32,37 **** next; } ! ! my $s=$b->getStatus(); ok(defined($s), "status exists for $_"); ok(($s>=0) && ($s<=8), "valid status for $_ : '$s'"); --- 32,38 ---- next; } ! $p=$b->Package(); ! ok(defined($p), "package for $_"); ! my $s=$p->getStatus(); ok(defined($s), "status exists for $_"); ok(($s>=0) && ($s<=8), "valid status for $_ : '$s'"); *************** *** 39,52 **** my $pack = "$_"; $pack =~ s/^(.*?)-.+/$1/g; ! ok($pack eq $b->packageName(), "checking packageName() for $_ : '$pack'/" . $b->packageName()); ! check_simple($b->packageVersion()); ! my $siz = $b->packageSize(); check_simple($siz); ok($siz > 0); ! check_simple($b->packageComments()); ! check_simple($b->localPackageName()); my $bn = $b->benchmarkName(); --- 40,53 ---- my $pack = "$_"; $pack =~ s/^(.*?)-.+/$1/g; ! ok($pack eq $p->packageName(), "checking packageName() for $_ : '$pack'/" . $p->packageName()); ! check_simple($p->packageVersion()); ! my $siz = $p->packageSize(); check_simple($siz); ok($siz > 0); ! check_simple($p->packageComments()); ! check_simple($p->localPackageName()); my $bn = $b->benchmarkName(); *************** *** 57,71 **** check_simple($b->benchmarkComments()); ! my $lang = $b->language(); check_simple($lang); ok( ($lang eq "C") || ($lang eq "C++")); ! check_simple($b->license()); ! check_simple($b->author()); ! check_simple($b->localPackageAbsoluteName()); ! check_simple($b->localPackageAbsoluteDirectory()); ! my $hast = $b->hasTest(); ok( ($hast==0) || ($hast==1) ); } --- 58,72 ---- check_simple($b->benchmarkComments()); ! my $lang = $p->language(); check_simple($lang); ok( ($lang eq "C") || ($lang eq "C++")); ! check_simple($p->license()); ! check_simple($p->author()); ! check_simple($p->localPackageAbsoluteName()); ! check_simple($p->localPackageAbsoluteDirectory()); ! my $hast = $p->hasTest(); ok( ($hast==0) || ($hast==1) ); } Index: 03-CBMCompilerSelector-public.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/03-CBMCompilerSelector-public.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 03-CBMCompilerSelector-public.pl 28 Dec 2006 18:52:32 -0000 1.2 --- 03-CBMCompilerSelector-public.pl 4 Jan 2007 19:37:50 -0000 1.3 *************** *** 49,51 **** --- 49,52 ---- } + # !!! CBM::benchmarkNumber("gzip"); $sys->done(); |
From: Frederic T. <xf...@us...> - 2007-01-04 19:37:36
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20354 Modified Files: CBM.i Glue.cpp Glue.h Log Message: CBMPackage and new related API used. Index: Glue.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/Glue.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Glue.cpp 28 Dec 2006 13:24:10 -0000 1.2 --- Glue.cpp 4 Jan 2007 19:37:29 -0000 1.3 *************** *** 9,13 **** ------------------------------------------------------------------------- */ ! #include <Glue.h> CBM_SYSTEM *sys; --- 9,14 ---- ------------------------------------------------------------------------- */ ! #include <CBM-PI/Glue.h> ! #include <Benchmark/Benchmark-DLLoader.h> CBM_SYSTEM *sys; Index: CBM.i =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/CBM.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CBM.i 28 Dec 2006 13:22:57 -0000 1.2 --- CBM.i 4 Jan 2007 19:37:29 -0000 1.3 *************** *** 22,25 **** --- 22,30 ---- %} + %module CBMPackage + %{ + #include "Benchmark/Package.h" + %} + %module CBMBenchmark %{ *************** *** 27,35 **** %} - %module CBMBenchmarkSelector - %{ - #include "Benchmark/Benchmark-Selector.h" - %} - %module CBMCompiler %{ --- 32,35 ---- *************** *** 42,47 **** %include "System/System-Unix.h" %include "System/System-Linux.h" %include "Benchmark/Benchmark.h" - %include "Benchmark/Benchmark-Selector.h" %include "Compiler/Compiler.h" %include "Glue.h" --- 42,47 ---- %include "System/System-Unix.h" %include "System/System-Linux.h" + %include "Benchmark/Package.h" %include "Benchmark/Benchmark.h" %include "Compiler/Compiler.h" %include "Glue.h" Index: Glue.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/Glue.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Glue.h 28 Dec 2006 00:38:14 -0000 1.1 --- Glue.h 4 Jan 2007 19:37:29 -0000 1.2 *************** *** 12,17 **** --- 12,19 ---- #include <libcompbenchmarks.h> + #include <Benchmark/Benchmark.h> extern CBM_SYSTEM *Init(void); + extern std::string & stringref(char *str); extern char *c_str(std::string &str); |
From: Frederic T. <xf...@us...> - 2007-01-04 18:56:17
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5434 Modified Files: Benchmark.cpp Benchmark-DLLoader.cpp Benchmark.h Package.cpp Package.h Log Message: Improvements and adapations for CBMPackage and new related API usage. Index: Benchmark.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Benchmark.h 3 Jan 2007 21:58:38 -0000 1.13 --- Benchmark.h 4 Jan 2007 18:56:13 -0000 1.14 *************** *** 50,53 **** --- 50,56 ---- public: + /** Display informations about benchmark + */ + void display(void); /** Benchmark name \return a std::string representing current benchmark's identification Index: Benchmark-DLLoader.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-DLLoader.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Benchmark-DLLoader.cpp 3 Jan 2007 22:02:28 -0000 1.4 --- Benchmark-DLLoader.cpp 4 Jan 2007 18:56:13 -0000 1.5 *************** *** 56,60 **** dlclose(library); if (UO_verbose) ! std::cout << "N.A." << std::endl; delete(r); return(0); --- 56,60 ---- dlclose(library); if (UO_verbose) ! std::cout << "Invalid" << std::endl; delete(r); return(0); *************** *** 68,72 **** } else { if (UO_verbose) ! std::cout << "N.A." << std::endl; } return(0); --- 68,72 ---- } else { if (UO_verbose) ! std::cout << "N.A. (" << dlerror() << ")" << std::endl; } return(0); Index: Package.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Package.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Package.cpp 3 Jan 2007 21:57:31 -0000 1.1 --- Package.cpp 4 Jan 2007 18:56:13 -0000 1.2 *************** *** 28,31 **** --- 28,41 ---- } + int CBMPackage::benchmarkNumber(void) + { + return(benchmarks.size()); + } + + CBMBenchmark *CBMPackage::Benchmark(int i) + { + return(Benchmark(benchmarks[i])); + } + CBMBenchmark *CBMPackage::Benchmark(std::string bid) { *************** *** 33,36 **** --- 43,58 ---- } + void CBMPackage::display(void) + { + std::cout << "package::Name=" << packageName() << std::endl + << "package::Url=" << downloadURL() << std::endl + << "package::Size=" << packageSize() << std::endl + << "package::Version=" << packageVersion() << std::endl + << "package::Comments=" << packageComments() << std::endl + << "package::License=" << license() << std::endl + << "package::Homepage=" << homePage() << std::endl + << "package::Author=" << author() << std::endl << std::endl; + } + CBMSystem *CBMPackage::System(void) { Index: Package.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Package.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Package.h 3 Jan 2007 21:57:31 -0000 1.1 --- Package.h 4 Jan 2007 18:56:13 -0000 1.2 *************** *** 169,172 **** --- 169,175 ---- CBMCompilerOptions *_currentOptions); public: + /** Display informations about package */ + virtual void display(void); + /** Get system abstraction object \return CBMSystem *************** *** 176,180 **** /** Get all supported benchmarks. \return Array of std::string. */ ! BenchmarkVector& Benchmarks(void); /** Get a benchmark according to its identifier. --- 179,192 ---- /** Get all supported benchmarks. \return Array of std::string. */ ! virtual BenchmarkVector& Benchmarks(void); ! ! /** Get supported benchmarks' number ! \return An integer */ ! virtual int benchmarkNumber(void); ! ! /** Get a benchmark according to its index ! \sa Benchmarks() ! \return A pointer to the benchmark instance */ ! virtual class CBMBenchmark *Benchmark(int i); /** Get a benchmark according to its identifier. Index: Benchmark.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Benchmark.cpp 3 Jan 2007 21:58:38 -0000 1.18 --- Benchmark.cpp 4 Jan 2007 18:56:13 -0000 1.19 *************** *** 1,4 **** --- 1,5 ---- #include <Benchmark/Benchmark.h> #include <Benchmark/Package.h> + #include <iostream> #include <cloptions.h> *************** *** 10,13 **** --- 11,25 ---- } + void CBMBenchmark::display(void) + { + std::cout << "benchmark::Name=" << benchmarkName() << std::endl + << "benchmark::Package=" << Package()->packageName() << std::endl + << "benchmark::Language=" << Package()->language() << std::endl + << "benchmark::Size=" << Package()->benchmarkSize() << std::endl + << "benchmark::Status=" << Package()->getStatus() << std::endl + << "benchmark::Comments=" << benchmarkComments() << std::endl + << std::endl; + } + CBMPackage *CBMBenchmark::Package(void) { |
From: Frederic T. <xf...@us...> - 2007-01-04 18:53:50
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4327 Modified Files: Benchmark-BZIP2.h Log Message: benchmarkProgram() fixed. Index: Benchmark-BZIP2.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BZIP2.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-BZIP2.h 3 Jan 2007 22:06:26 -0000 1.3 --- Benchmark-BZIP2.h 4 Jan 2007 18:53:44 -0000 1.4 *************** *** 1,2 **** --- 1,10 ---- + /* ---------------------------------------------------------------------------- + $Id$ + + This is free software. + For details, see the GNU Public License in the COPYING file, or + Look http://www.fsf.org + ------------------------------------------------------------------------- */ + #ifndef H_CBMBENCHMARKBZIP2 #define H_CBMBENCHMARKBZIP2 *************** *** 38,42 **** DLPackageWrapper_declare(); - virtual std::string benchmarkProgram(void); virtual std::string license(void); virtual std::string homePage(void); --- 46,49 ---- |
From: Frederic T. <xf...@us...> - 2007-01-04 18:53:19
|
Update of /cvsroot/compbench/CompBenchmarks++/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4167 Modified Files: System.cpp System.h Log Message: Changes in packages' handling. Index: System.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/System/System.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** System.cpp 3 Jan 2007 22:03:09 -0000 1.15 --- System.cpp 4 Jan 2007 18:53:05 -0000 1.16 *************** *** 108,111 **** --- 108,112 ---- sprintf(c, "%d", (int) getpid()); tmp=c; + packageList(); return(store("lockfile.pid", tmp)); *************** *** 177,183 **** } ! char *CBMSystem::packageGet(int index) { ! return((char*) packages[index].c_str()); } --- 178,184 ---- } ! CBMPackage *CBMSystem::Package(int index) { ! return(Package(packages[index])); } Index: System.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/System/System.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** System.h 3 Jan 2007 22:03:09 -0000 1.15 --- System.h 4 Jan 2007 18:53:05 -0000 1.16 *************** *** 128,132 **** virtual int packageNumber(void); ! virtual char *packageGet(int index); virtual class CBMPackage *Package(std::string pid); --- 128,132 ---- virtual int packageNumber(void); ! virtual class CBMPackage *Package(int index); virtual class CBMPackage *Package(std::string pid); |
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24946 Modified Files: Benchmark-BENCHPP.cpp Benchmark-BENCHPP.h Benchmark-BENCHPP.libwrapper.h Benchmark-BENCHPPLINUX.cpp Benchmark-BENCHPPLINUX.h Benchmark-BENCHPPLINUX.libwrapper.h Benchmark-BZIP2.cpp Benchmark-BZIP2.h Benchmark-BZIP2.libwrapper.h Benchmark-GZIP.cpp Benchmark-GZIP.h Benchmark-GZIP.libwrapper.h Benchmark-LINPACKC.cpp Benchmark-LINPACKC.h Benchmark-LINPACKC.libwrapper.h Benchmark-NBENCH.h Benchmark-NBENCH.libwrapper.h Benchmark-SCIMARK2.cpp Benchmark-SCIMARK2.h Benchmark-SCIMARK2.libwrapper.h Log Message: Improvements and adapations for CBMPackage and new related API usage. Index: Benchmark-BENCHPP.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPP.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-BENCHPP.cpp 3 Jan 2007 19:15:51 -0000 1.2 --- Benchmark-BENCHPP.cpp 3 Jan 2007 22:06:26 -0000 1.3 *************** *** 28,41 **** } - std::string CBMPackageBENCHPP::benchmarkComments(void) - { - std::string comment; - - comment+=benchmarkBENCHPPComments(); - comment+=" (Comment from README file)"; - - return(comment); - } - std::string CBMPackageBENCHPP::packageVersion(void) { --- 28,31 ---- *************** *** 241,244 **** --- 231,244 ---- } + std::string CBMBenchmarkBENCHPP::benchmarkComments(void) + { + std::string comment; + + comment+=benchmarkBENCHPPComments(); + comment+=" (Comment from README file)"; + + return(comment); + } + std::string CBMBenchmarkBENCHPP::bench(void) { Index: Benchmark-NBENCH.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-NBENCH.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-NBENCH.h 3 Jan 2007 18:53:17 -0000 1.2 --- Benchmark-NBENCH.h 3 Jan 2007 22:06:27 -0000 1.3 *************** *** 31,38 **** protected: - - CBMPackageNBENCH(class CBMSystem *_system); - DLPackageWrapper_declare(); - virtual std::string language(void); --- 31,34 ---- *************** *** 48,51 **** --- 44,50 ---- public: + CBMPackageNBENCH(class CBMSystem *_system); + DLPackageWrapper_declare(); + virtual std::string license(void); virtual std::string homePage(void); Index: Benchmark-NBENCH.libwrapper.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-NBENCH.libwrapper.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-NBENCH.libwrapper.h 28 Dec 2006 17:41:04 -0000 1.1 --- Benchmark-NBENCH.libwrapper.h 3 Jan 2007 22:06:27 -0000 1.2 *************** *** 1,108 **** ! CBMBenchmark *cbmlib_getBenchmark(int idx, CBMSystem *_system) ! { ! switch(idx) { ! case 0: ! return(new CBMBenchmarkNBENCH_NUMSORT(_system)); ! ;; ! case 1: ! return(new CBMBenchmarkNBENCH_STRINGSORT(_system)); ! ;; ! case 2: ! return(new CBMBenchmarkNBENCH_BITFIELD(_system)); ! ;; ! case 3: ! return(new CBMBenchmarkNBENCH_EMF(_system)); ! ;; ! case 4: ! return(new CBMBenchmarkNBENCH_FOURIER(_system)); ! ;; ! case 5: ! return(new CBMBenchmarkNBENCH_ASSIGN(_system)); ! ;; ! case 6: ! return(new CBMBenchmarkNBENCH_HUFFMAN(_system)); ! ;; ! case 7: ! return(new CBMBenchmarkNBENCH_IDEA(_system)); ! ;; ! case 8: ! return(new CBMBenchmarkNBENCH_NNET(_system)); ! ;; ! case 9: ! return(new CBMBenchmarkNBENCH_LU(_system)); ! ;; ! default: ! return(0); ! ;; ! } ! } ! ! CBMBenchmark *cbmlib_getBenchmarkByName(char *bench_id, CBMSystem *_system) ! { ! std::string tmp = bench_id; ! ! if (tmp=="nbench-numsort") { ! return(new CBMBenchmarkNBENCH_NUMSORT(_system)); ! } ! ! if (tmp=="nbench-stringsort") { ! return(new CBMBenchmarkNBENCH_STRINGSORT(_system)); ! } ! ! if (tmp=="nbench-bitfield") { ! return(new CBMBenchmarkNBENCH_BITFIELD(_system)); ! } ! ! if (tmp=="nbench-emf") { ! return(new CBMBenchmarkNBENCH_EMF(_system)); ! } ! ! if (tmp=="nbench-fourier") { ! return(new CBMBenchmarkNBENCH_FOURIER(_system)); ! } ! ! if (tmp=="nbench-assign") { ! return(new CBMBenchmarkNBENCH_ASSIGN(_system)); ! } ! ! if (tmp=="nbench-huffman") { ! return(new CBMBenchmarkNBENCH_HUFFMAN(_system)); ! } ! ! if (tmp=="nbench-idea") { ! return(new CBMBenchmarkNBENCH_IDEA(_system)); ! } ! ! if (tmp=="nbench-nnet") { ! return(new CBMBenchmarkNBENCH_NNET(_system)); ! } ! ! if (tmp=="nbench-lu") { ! return(new CBMBenchmarkNBENCH_LU(_system)); ! } ! return(0); ! } ! int cbmlib_getBenchmarkNumber(void) ! { ! return(10); } - std::vector<std::string> cbmlib_getBenchmarks(void) - { - std::vector<std::string> result; - - result.push_back("nbench-numsort"); - result.push_back("nbench-stringsort"); - result.push_back("nbench-bitfield"); - result.push_back("nbench-emf"); - result.push_back("nbench-fourier"); - result.push_back("nbench-assign"); - result.push_back("nbench-huffman"); - result.push_back("nbench-idea"); - result.push_back("nbench-nnet"); - result.push_back("nbench-lu"); ! return(result); } ! --- 1,61 ---- ! #include <Benchmark/Benchmark-DLLoader.h> ! #include <UI/UI.h> ! BenchmarkVector& CBMPackageNBENCH::Benchmarks(void) { ! if (benchmarks.size()) return(benchmarks); ! benchmarks.push_back("nbench-stringsort"); ! benchmarks.push_back("nbench-lu"); ! benchmarks.push_back("nbench-assign"); ! benchmarks.push_back("nbench-numsort"); ! benchmarks.push_back("nbench-fourier"); ! benchmarks.push_back("nbench-bitfield"); ! benchmarks.push_back("nbench-emf"); ! benchmarks.push_back("nbench-huffman"); ! benchmarks.push_back("nbench-nnet"); ! benchmarks.push_back("nbench-idea"); ! return(benchmarks); } ! CBMBenchmark *CBMPackageNBENCH::Benchmark(std::string bid) { ! if (bid == "nbench-stringsort") { ! return(new CBMBenchmarkNBENCH_STRINGSORT(this)); ! } ! if (bid == "nbench-lu") { ! return(new CBMBenchmarkNBENCH_LU(this)); ! } ! if (bid == "nbench-assign") { ! return(new CBMBenchmarkNBENCH_ASSIGN(this)); ! } ! if (bid == "nbench-numsort") { ! return(new CBMBenchmarkNBENCH_NUMSORT(this)); ! } ! if (bid == "nbench-fourier") { ! return(new CBMBenchmarkNBENCH_FOURIER(this)); ! } ! if (bid == "nbench-bitfield") { ! return(new CBMBenchmarkNBENCH_BITFIELD(this)); ! } ! if (bid == "nbench-emf") { ! return(new CBMBenchmarkNBENCH_EMF(this)); ! } ! if (bid == "nbench-huffman") { ! return(new CBMBenchmarkNBENCH_HUFFMAN(this)); ! } ! if (bid == "nbench-nnet") { ! return(new CBMBenchmarkNBENCH_NNET(this)); ! } ! if (bid == "nbench-idea") { ! return(new CBMBenchmarkNBENCH_IDEA(this)); ! } ! UI->Fatal("Unknown benchmark"); ! return(0); } ! CBMPackage *package_NBENCH = 0; ! CBMPackage *cbmlib_getPackage(void) { ! if (!package_NBENCH) { ! package_NBENCH=new CBMPackageNBENCH(cbmSystem); ! cbmlib_packages.push_back(package_NBENCH); ! } ! return(package_NBENCH); ! } Index: Benchmark-SCIMARK2.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-SCIMARK2.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-SCIMARK2.h 3 Jan 2007 19:04:46 -0000 1.2 --- Benchmark-SCIMARK2.h 3 Jan 2007 22:06:27 -0000 1.3 *************** *** 23,27 **** virtual std::string packageName(void); - virtual std::string benchmarkName(void) = 0; virtual std::string packageVersion(void); --- 23,26 ---- *************** *** 66,69 **** --- 65,69 ---- CBMBenchmarkSCIMARK2(CBMPackage *_package); virtual std::string benchmarkComments(void); + virtual std::string benchmarkName(void) = 0; virtual std::string benchmarkSCIMARK2Comments(void) = 0; virtual std::string scimark2BenchmarkLabel(void) = 0; Index: Benchmark-GZIP.libwrapper.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-GZIP.libwrapper.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-GZIP.libwrapper.h 28 Dec 2006 17:41:03 -0000 1.1 --- Benchmark-GZIP.libwrapper.h 3 Jan 2007 22:06:27 -0000 1.2 *************** *** 1,44 **** ! CBMBenchmark *cbmlib_getBenchmark(int idx, CBMSystem *_system) ! { ! switch(idx) { ! case 0: ! return(new CBMBenchmarkGZIP1(_system)); ! ;; ! case 1: ! return(new CBMBenchmarkGZIP9(_system)); ! ;; ! default: ! return(0); ! ;; ! } ! } ! ! CBMBenchmark *cbmlib_getBenchmarkByName(char *bench_id, CBMSystem *_system) ! { ! std::string tmp = bench_id; ! ! if (tmp=="gzip-1c") { ! return(new CBMBenchmarkGZIP1(_system)); ! } ! ! if (tmp=="gzip-9c") { ! return(new CBMBenchmarkGZIP9(_system)); ! } ! return(0); ! } ! int cbmlib_getBenchmarkNumber(void) ! { ! return(2); } - std::vector<std::string> cbmlib_getBenchmarks(void) - { - std::vector<std::string> result; - - result.push_back("gzip-1c"); - result.push_back("gzip-9c"); ! return(result); } ! --- 1,29 ---- ! #include <Benchmark/Benchmark-DLLoader.h> ! #include <UI/UI.h> ! BenchmarkVector& CBMPackageGZIP::Benchmarks(void) { ! if (benchmarks.size()) return(benchmarks); ! benchmarks.push_back("gzip-9c"); ! benchmarks.push_back("gzip-1c"); ! return(benchmarks); } ! CBMBenchmark *CBMPackageGZIP::Benchmark(std::string bid) { ! if (bid == "gzip-9c") { ! return(new CBMBenchmarkGZIP9(this)); ! } ! if (bid == "gzip-1c") { ! return(new CBMBenchmarkGZIP1(this)); ! } ! UI->Fatal("Unknown benchmark"); ! return(0); } ! CBMPackage *package_GZIP = 0; ! CBMPackage *cbmlib_getPackage(void) { ! if (!package_GZIP) { ! package_GZIP=new CBMPackageGZIP(cbmSystem); ! cbmlib_packages.push_back(package_GZIP); ! } ! return(package_GZIP); ! } Index: Benchmark-LINPACKC.libwrapper.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-LINPACKC.libwrapper.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-LINPACKC.libwrapper.h 28 Dec 2006 17:41:03 -0000 1.1 --- Benchmark-LINPACKC.libwrapper.h 3 Jan 2007 22:06:27 -0000 1.2 *************** *** 1,60 **** ! CBMBenchmark *cbmlib_getBenchmark(int idx, CBMSystem *_system) ! { ! switch(idx) { ! case 0: ! return(new CBMBenchmarkLINPACKC_SP_UNROLL(_system)); ! ;; ! case 1: ! return(new CBMBenchmarkLINPACKC_SP_ROLL(_system)); ! ;; ! case 2: ! return(new CBMBenchmarkLINPACKC_DP_UNROLL(_system)); ! ;; ! case 3: ! return(new CBMBenchmarkLINPACKC_DP_ROLL(_system)); ! ;; ! default: ! return(0); ! ;; ! } ! } ! ! CBMBenchmark *cbmlib_getBenchmarkByName(char *bench_id, CBMSystem *_system) ! { ! std::string tmp = bench_id; ! ! if (tmp=="linpackc-sp-unroll") { ! return(new CBMBenchmarkLINPACKC_SP_UNROLL(_system)); ! } ! ! if (tmp=="linpackc-sp-roll") { ! return(new CBMBenchmarkLINPACKC_SP_ROLL(_system)); ! } ! ! if (tmp=="linpackc-dp-unroll") { ! return(new CBMBenchmarkLINPACKC_DP_UNROLL(_system)); ! } ! ! if (tmp=="linpackc-dp-roll") { ! return(new CBMBenchmarkLINPACKC_DP_ROLL(_system)); ! } ! return(0); ! } ! int cbmlib_getBenchmarkNumber(void) ! { ! return(4); } - std::vector<std::string> cbmlib_getBenchmarks(void) - { - std::vector<std::string> result; ! result.push_back("linpackc-sp-unroll"); ! result.push_back("linpackc-sp-roll"); ! result.push_back("linpackc-dp-unroll"); ! result.push_back("linpackc-dp-roll"); ! ! return(result); } - - --- 1,19 ---- ! #include <Benchmark/Benchmark-DLLoader.h> ! BenchmarkVector& CBMPackageLINPACKC::Benchmarks(void) { ! if (benchmarks.size()) return(benchmarks); ! benchmarks.push_back("linpackc-sp-unroll"); ! benchmarks.push_back("linpackc-dp-roll"); ! benchmarks.push_back("linpackc-dp-unroll"); ! benchmarks.push_back("linpackc-sp-roll"); ! return(benchmarks); } ! CBMPackage *package_LINPACKC = 0; ! CBMPackage *cbmlib_getPackage(void) { ! if (!package_LINPACKC) { ! package_LINPACKC=new CBMPackageLINPACKC(cbmSystem); ! cbmlib_packages.push_back(package_LINPACKC); ! } ! return(package_LINPACKC); } Index: Benchmark-GZIP.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-GZIP.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-GZIP.h 3 Jan 2007 18:49:56 -0000 1.2 --- Benchmark-GZIP.h 3 Jan 2007 22:06:27 -0000 1.3 *************** *** 39,43 **** DLPackageWrapper_declare(); - virtual std::string benchmarkProgram(void); virtual std::string license(void); virtual std::string homePage(void); --- 39,42 ---- *************** *** 49,55 **** }; /** \brief Defines the gzip benchmark using fastest compression level. */ ! class CBMBenchmarkGZIP1 : public CBMBenchmarkxZIP { protected: --- 48,63 ---- }; + /** \brief Abstract class for gzip benchmarks */ + class CBMBenchmarkGZIP : public CBMBenchmarkxZIP + { + protected: + CBMBenchmarkGZIP(CBMPackage *_package); + virtual std::string benchmarkProgram(void); + virtual ~CBMBenchmarkGZIP(); + }; + /** \brief Defines the gzip benchmark using fastest compression level. */ ! class CBMBenchmarkGZIP1 : public CBMBenchmarkGZIP { protected: *************** *** 65,69 **** /** \brief Defines the gzip benchmark using maximum compression level. */ ! class CBMBenchmarkGZIP9 : public CBMBenchmarkxZIP { protected: --- 73,77 ---- /** \brief Defines the gzip benchmark using maximum compression level. */ ! class CBMBenchmarkGZIP9 : public CBMBenchmarkGZIP { protected: Index: Benchmark-BENCHPPLINUX.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPPLINUX.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-BENCHPPLINUX.h 3 Jan 2007 19:56:16 -0000 1.2 --- Benchmark-BENCHPPLINUX.h 3 Jan 2007 22:06:26 -0000 1.3 *************** *** 1,2 **** --- 1,10 ---- + /* ---------------------------------------------------------------------------- + $Id$ + + This is free software. + For details, see the GNU Public License in the COPYING file, or + Look http://www.fsf.org + ------------------------------------------------------------------------- */ + #ifndef H_CBMBENCHMARKBENCHPPLINUX #define H_CBMBENCHMARKBENCHPPLINUX Index: Benchmark-BZIP2.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BZIP2.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-BZIP2.cpp 3 Jan 2007 18:49:56 -0000 1.3 --- Benchmark-BZIP2.cpp 3 Jan 2007 22:06:26 -0000 1.4 *************** *** 122,130 **** } - std::string CBMPackageBZIP2::benchmarkProgram(void) - { - return("bzip2"); - } - std::string CBMPackageBZIP2::license(void) { --- 122,125 ---- *************** *** 150,156 **** { } CBMBenchmarkBZIP21::CBMBenchmarkBZIP21(CBMPackage *_package) ! : CBMBenchmarkxZIP(_package) { } --- 145,165 ---- { } + + CBMBenchmarkBZIP2::CBMBenchmarkBZIP2(CBMPackage *_package) + : CBMBenchmarkxZIP(_package) + { + } + + std::string CBMBenchmarkBZIP2::benchmarkProgram(void) + { + return("bzip2"); + } + + CBMBenchmarkBZIP2::~CBMBenchmarkBZIP2() + { + } CBMBenchmarkBZIP21::CBMBenchmarkBZIP21(CBMPackage *_package) ! : CBMBenchmarkBZIP2(_package) { } *************** *** 176,180 **** CBMBenchmarkBZIP29::CBMBenchmarkBZIP29(CBMPackage *_package) ! : CBMBenchmarkxZIP(_package) { } --- 185,189 ---- CBMBenchmarkBZIP29::CBMBenchmarkBZIP29(CBMPackage *_package) ! : CBMBenchmarkBZIP2(_package) { } Index: Benchmark-GZIP.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-GZIP.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-GZIP.cpp 3 Jan 2007 18:49:56 -0000 1.3 --- Benchmark-GZIP.cpp 3 Jan 2007 22:06:26 -0000 1.4 *************** *** 77,85 **** } - std::string CBMPackageGZIP::benchmarkProgram(void) - { - return("gzip"); - } - std::string CBMPackageGZIP::license(void) { --- 77,80 ---- *************** *** 105,114 **** { } ! ! CBMBenchmarkGZIP1::CBMBenchmarkGZIP1(CBMPackage *_package) : CBMBenchmarkxZIP(_package) { } std::string CBMBenchmarkGZIP1::benchmarkName(void) { --- 100,123 ---- { } ! ! CBMBenchmarkGZIP::CBMBenchmarkGZIP(CBMPackage *_package) : CBMBenchmarkxZIP(_package) { } + std::string CBMBenchmarkGZIP::benchmarkProgram(void) + { + return("gzip"); + } + + CBMBenchmarkGZIP::~CBMBenchmarkGZIP() + { + } + + CBMBenchmarkGZIP1::CBMBenchmarkGZIP1(CBMPackage *_package) + : CBMBenchmarkGZIP(_package) + { + } + std::string CBMBenchmarkGZIP1::benchmarkName(void) { *************** *** 131,135 **** CBMBenchmarkGZIP9::CBMBenchmarkGZIP9(CBMPackage *_package) ! : CBMBenchmarkxZIP(_package) { } --- 140,144 ---- CBMBenchmarkGZIP9::CBMBenchmarkGZIP9(CBMPackage *_package) ! : CBMBenchmarkGZIP(_package) { } Index: Benchmark-BENCHPPLINUX.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPPLINUX.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-BENCHPPLINUX.cpp 3 Jan 2007 19:56:16 -0000 1.3 --- Benchmark-BENCHPPLINUX.cpp 3 Jan 2007 22:06:26 -0000 1.4 *************** *** 1,2 **** --- 1,10 ---- + /* ---------------------------------------------------------------------------- + $Id$ + + This is free software. + For details, see the GNU Public License in the COPYING file, or + Look http://www.fsf.org + ------------------------------------------------------------------------- */ + #include <SupportedBenchmarks/Benchmark-BENCHPPLINUX.h> #include <System/System.h> Index: Benchmark-BENCHPP.libwrapper.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPP.libwrapper.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-BENCHPP.libwrapper.h 28 Dec 2006 17:41:02 -0000 1.1 --- Benchmark-BENCHPP.libwrapper.h 3 Jan 2007 22:06:26 -0000 1.2 *************** *** 1,52 **** ! CBMBenchmark *cbmlib_getBenchmark(int idx, CBMSystem *_system) ! { ! switch(idx) { ! case 0: ! return(new CBMBenchmarkBENCHPP_DHRYSTONE(_system)); ! ;; ! case 1: ! return(new CBMBenchmarkBENCHPP_WHETSTONE(_system)); ! ;; ! case 2: ! return(new CBMBenchmarkBENCHPP_STEPANOV_AL12(_system)); ! ;; ! default: ! return(0); ! ;; ! } ! } ! ! CBMBenchmark *cbmlib_getBenchmarkByName(char *bench_id, CBMSystem *_system) ! { ! std::string tmp = bench_id; ! ! if (tmp=="benchpp-dhrystone") { ! return(new CBMBenchmarkBENCHPP_DHRYSTONE(_system)); ! } ! ! if (tmp=="benchpp-whetstone") { ! return(new CBMBenchmarkBENCHPP_WHETSTONE(_system)); ! } ! ! if (tmp=="benchpp-stepanov-al12") { ! return(new CBMBenchmarkBENCHPP_STEPANOV_AL12(_system)); ! } ! return(0); ! } ! int cbmlib_getBenchmarkNumber(void) ! { ! return(3); } - std::vector<std::string> cbmlib_getBenchmarks(void) - { - std::vector<std::string> result; - - result.push_back("benchpp-dhrystone"); - result.push_back("benchpp-whetstone"); - result.push_back("benchpp-stepanov-al12"); ! return(result); } ! --- 1,33 ---- ! #include <Benchmark/Benchmark-DLLoader.h> ! #include <UI/UI.h> ! BenchmarkVector& CBMPackageBENCHPP::Benchmarks(void) { ! if (benchmarks.size()) return(benchmarks); ! benchmarks.push_back("benchpp-stepanov-al12"); ! benchmarks.push_back("benchpp-whetstone"); ! benchmarks.push_back("benchpp-dhrystone"); ! return(benchmarks); } ! CBMBenchmark *CBMPackageBENCHPP::Benchmark(std::string bid) { ! if (bid == "benchpp-stepanov-al12") { ! return(new CBMBenchmarkBENCHPP_STEPANOV_AL12(this)); ! } ! if (bid == "benchpp-whetstone") { ! return(new CBMBenchmarkBENCHPP_WHETSTONE(this)); ! } ! if (bid == "benchpp-dhrystone") { ! return(new CBMBenchmarkBENCHPP_DHRYSTONE(this)); ! } ! UI->Fatal("Unknown benchmark"); ! return(0); } ! CBMPackage *package_BENCHPP = 0; ! CBMPackage *cbmlib_getPackage(void) { ! if (!package_BENCHPP) { ! package_BENCHPP=new CBMPackageBENCHPP(cbmSystem); ! cbmlib_packages.push_back(package_BENCHPP); ! } ! return(package_BENCHPP); ! } Index: Benchmark-BZIP2.libwrapper.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BZIP2.libwrapper.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-BZIP2.libwrapper.h 28 Dec 2006 17:41:02 -0000 1.1 --- Benchmark-BZIP2.libwrapper.h 3 Jan 2007 22:06:26 -0000 1.2 *************** *** 1,44 **** ! CBMBenchmark *cbmlib_getBenchmark(int idx, CBMSystem *_system) ! { ! switch(idx) { ! case 0: ! return(new CBMBenchmarkBZIP21(_system)); ! ;; ! case 1: ! return(new CBMBenchmarkBZIP29(_system)); ! ;; ! default: ! return(0); ! ;; ! } ! } ! ! CBMBenchmark *cbmlib_getBenchmarkByName(char *bench_id, CBMSystem *_system) ! { ! std::string tmp = bench_id; ! ! if (tmp=="bzip2-1c") { ! return(new CBMBenchmarkBZIP21(_system)); ! } ! ! if (tmp=="bzip2-9c") { ! return(new CBMBenchmarkBZIP29(_system)); ! } ! return(0); ! } ! int cbmlib_getBenchmarkNumber(void) ! { ! return(2); } - std::vector<std::string> cbmlib_getBenchmarks(void) - { - std::vector<std::string> result; - - result.push_back("bzip2-1c"); - result.push_back("bzip2-9c"); ! return(result); } ! --- 1,29 ---- ! #include <Benchmark/Benchmark-DLLoader.h> ! #include <UI/UI.h> ! BenchmarkVector& CBMPackageBZIP2::Benchmarks(void) { ! if (benchmarks.size()) return(benchmarks); ! benchmarks.push_back("bzip2-1c"); ! benchmarks.push_back("bzip2-9c"); ! return(benchmarks); } ! CBMBenchmark *CBMPackageBZIP2::Benchmark(std::string bid) { ! if (bid == "bzip2-1c") { ! return(new CBMBenchmarkBZIP21(this)); ! } ! if (bid == "bzip2-9c") { ! return(new CBMBenchmarkBZIP29(this)); ! } ! UI->Fatal("Unknown benchmark"); ! return(0); } ! CBMPackage *package_BZIP2 = 0; ! CBMPackage *cbmlib_getPackage(void) { ! if (!package_BZIP2) { ! package_BZIP2=new CBMPackageBZIP2(cbmSystem); ! cbmlib_packages.push_back(package_BZIP2); ! } ! return(package_BZIP2); ! } Index: Benchmark-BENCHPP.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPP.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-BENCHPP.h 3 Jan 2007 19:15:51 -0000 1.2 --- Benchmark-BENCHPP.h 3 Jan 2007 22:06:26 -0000 1.3 *************** *** 23,28 **** virtual std::string packageName(void); - virtual std::string benchmarkName(void) = 0; - virtual std::string benchmarkComments(void); virtual std::string packageVersion(void); --- 23,26 ---- *************** *** 35,40 **** virtual std::string language(void); - virtual std::string benchmarkBENCHPPComments(void) = 0; - virtual char* extractDirectory(void); virtual int hasPatch(void); --- 33,36 ---- *************** *** 68,71 **** --- 64,70 ---- protected: CBMBenchmarkBENCHPP(CBMPackage *_package); + virtual std::string benchmarkComments(void); + virtual std::string benchmarkBENCHPPComments(void) = 0; + virtual std::string benchmarkName(void) = 0; virtual std::string benchppBenchmark(void) = 0; virtual std::string bench(void); Index: Benchmark-SCIMARK2.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-SCIMARK2.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-SCIMARK2.cpp 3 Jan 2007 19:04:46 -0000 1.2 --- Benchmark-SCIMARK2.cpp 3 Jan 2007 22:06:27 -0000 1.3 *************** *** 1,2 **** --- 1,10 ---- + /* ---------------------------------------------------------------------------- + $Id$ + + This is free software. + For details, see the GNU Public License in the COPYING file, or + Look http://www.fsf.org + ------------------------------------------------------------------------- */ + #include <SupportedBenchmarks/Benchmark-SCIMARK2.h> #include <System/System.h> *************** *** 198,204 **** } - - - CBMBenchmarkSCIMARK2::CBMBenchmarkSCIMARK2(CBMPackage *_package) : CBMBenchmark(_package) --- 206,209 ---- Index: Benchmark-BENCHPPLINUX.libwrapper.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPPLINUX.libwrapper.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-BENCHPPLINUX.libwrapper.h 28 Dec 2006 17:41:02 -0000 1.1 --- Benchmark-BENCHPPLINUX.libwrapper.h 3 Jan 2007 22:06:26 -0000 1.2 *************** *** 1,308 **** ! CBMBenchmark *cbmlib_getBenchmark(int idx, CBMSystem *_system) ! { ! switch(idx) { ! case 0: ! return(new CBMBenchmarkBENCHPPLINUX_DHRYSTONE(_system)); ! ;; ! case 1: ! return(new CBMBenchmarkBENCHPPLINUX_WHETSTONE(_system)); ! ;; ! case 2: ! return(new CBMBenchmarkBENCHPPLINUX_BOOL_ASSIGN(_system)); ! ;; ! case 3: ! return(new CBMBenchmarkBENCHPPLINUX_BOOL_IF(_system)); ! ;; ! case 4: ! return(new CBMBenchmarkBENCHPPLINUX_2WAY_IFELSE(_system)); ! ;; ! case 5: ! return(new CBMBenchmarkBENCHPPLINUX_2WAY_SWITCH(_system)); ! ;; ! case 6: ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_IFELSE(_system)); ! ;; ! case 7: ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_SWITCH(_system)); ! ;; ! case 8: ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_SPARSE_SWITCH(_system)); ! ;; ! case 9: ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_VFC(_system)); ! ;; ! case 10: ! return(new CBMBenchmarkBENCHPPLINUX_PACKEDBITARRAY(_system)); ! ;; ! case 11: ! return(new CBMBenchmarkBENCHPPLINUX_BITFIELDS(_system)); ! ;; ! case 12: ! return(new CBMBenchmarkBENCHPPLINUX_BITFIELDS_PBA(_system)); ! ;; ! case 13: ! return(new CBMBenchmarkBENCHPPLINUX_PACKUNPACKOBJ(_system)); ! ;; ! case 14: ! return(new CBMBenchmarkBENCHPPLINUX_CONSTPROP(_system)); ! ;; ! case 15: ! return(new CBMBenchmarkBENCHPPLINUX_CONSTPROP_HO(_system)); ! ;; ! case 16: ! return(new CBMBenchmarkBENCHPPLINUX_LOCALCSE(_system)); ! ;; ! case 17: ! return(new CBMBenchmarkBENCHPPLINUX_LOCALCSE_HO(_system)); ! ;; ! case 18: ! return(new CBMBenchmarkBENCHPPLINUX_GLOBALCSE(_system)); ! ;; ! case 19: ! return(new CBMBenchmarkBENCHPPLINUX_GLOBALCSE_HO(_system)); ! ;; ! case 20: ! return(new CBMBenchmarkBENCHPPLINUX_UNNECCOPY(_system)); ! ;; ! case 21: ! return(new CBMBenchmarkBENCHPPLINUX_UNNECCOPY_HO(_system)); ! ;; ! case 22: ! return(new CBMBenchmarkBENCHPPLINUX_CODEMOTION(_system)); ! ;; ! case 23: ! return(new CBMBenchmarkBENCHPPLINUX_CODEMOTION_HO(_system)); ! ;; ! case 24: ! return(new CBMBenchmarkBENCHPPLINUX_INDUCVAR(_system)); ! ;; ! case 25: ! return(new CBMBenchmarkBENCHPPLINUX_INDUCVAR_HO(_system)); ! ;; ! case 26: ! return(new CBMBenchmarkBENCHPPLINUX_REDUCSTRENGTH_HO(_system)); ! ;; ! case 27: ! return(new CBMBenchmarkBENCHPPLINUX_DEADCODE(_system)); ! ;; ! case 28: ! return(new CBMBenchmarkBENCHPPLINUX_DEADCODE_HO(_system)); ! ;; ! case 29: ! return(new CBMBenchmarkBENCHPPLINUX_LOOPJAMMING(_system)); ! ;; ! case 30: ! return(new CBMBenchmarkBENCHPPLINUX_LOOPJAMMING_HO(_system)); ! ;; ! case 31: ! return(new CBMBenchmarkBENCHPPLINUX_REDUNCODE(_system)); ! ;; ! case 32: ! return(new CBMBenchmarkBENCHPPLINUX_REDUNCODE_HO(_system)); ! ;; ! case 33: ! return(new CBMBenchmarkBENCHPPLINUX_STRINGOPS(_system)); ! ;; ! case 34: ! return(new CBMBenchmarkBENCHPPLINUX_STRINGOPS_HO(_system)); ! ;; ! default: ! return(0); ! ;; ! } ! } ! ! CBMBenchmark *cbmlib_getBenchmarkByName(char *bench_id, CBMSystem *_system) ! { ! std::string tmp = bench_id; ! ! if (tmp=="benchpplinux-dhrystone") { ! return(new CBMBenchmarkBENCHPPLINUX_DHRYSTONE(_system)); ! } ! ! if (tmp=="benchpplinux-whetstone") { ! return(new CBMBenchmarkBENCHPPLINUX_WHETSTONE(_system)); ! } ! ! if (tmp=="benchpplinux-bool-assign") { ! return(new CBMBenchmarkBENCHPPLINUX_BOOL_ASSIGN(_system)); ! } ! ! if (tmp=="benchpplinux-bool-if") { ! return(new CBMBenchmarkBENCHPPLINUX_BOOL_IF(_system)); ! } ! ! if (tmp=="benchpplinux-2wifelse") { ! return(new CBMBenchmarkBENCHPPLINUX_2WAY_IFELSE(_system)); ! } ! ! if (tmp=="benchpplinux-2wswitch") { ! return(new CBMBenchmarkBENCHPPLINUX_2WAY_SWITCH(_system)); ! } ! ! if (tmp=="benchpplinux-10wifelse") { ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_IFELSE(_system)); ! } ! ! if (tmp=="benchpplinux-10wswitch") { ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_SWITCH(_system)); ! } ! ! if (tmp=="benchpplinux-10wsparseswitch") { ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_SPARSE_SWITCH(_system)); ! } ! ! if (tmp=="benchpplinux-10wvfc") { ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_VFC(_system)); ! } ! ! if (tmp=="benchpplinux-packedbitarray") { ! return(new CBMBenchmarkBENCHPPLINUX_PACKEDBITARRAY(_system)); ! } ! ! if (tmp=="benchpplinux-bitfields") { ! return(new CBMBenchmarkBENCHPPLINUX_BITFIELDS(_system)); ! } ! ! if (tmp=="benchpplinux-bitfields-pba") { ! return(new CBMBenchmarkBENCHPPLINUX_BITFIELDS_PBA(_system)); ! } ! ! if (tmp=="benchpplinux-packunpackobjets") { ! return(new CBMBenchmarkBENCHPPLINUX_PACKUNPACKOBJ(_system)); ! } ! ! if (tmp=="benchpplinux-constantpropagation") { ! return(new CBMBenchmarkBENCHPPLINUX_CONSTPROP(_system)); ! } ! ! if (tmp=="benchpplinux-constantpropagation-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_CONSTPROP_HO(_system)); ! } ! ! if (tmp=="benchpplinux-localcommonse") { ! return(new CBMBenchmarkBENCHPPLINUX_LOCALCSE(_system)); ! } ! ! if (tmp=="benchpplinux-localcommonse-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_LOCALCSE_HO(_system)); ! } ! ! if (tmp=="benchpplinux-globalcommonse") { ! return(new CBMBenchmarkBENCHPPLINUX_GLOBALCSE(_system)); ! } ! ! if (tmp=="benchpplinux-globalcommonse-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_GLOBALCSE_HO(_system)); ! } ! ! if (tmp=="benchpplinux-unneccopy") { ! return(new CBMBenchmarkBENCHPPLINUX_UNNECCOPY(_system)); ! } ! ! if (tmp=="benchpplinux-unneccopy-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_UNNECCOPY_HO(_system)); ! } ! ! if (tmp=="benchpplinux-codemotion") { ! return(new CBMBenchmarkBENCHPPLINUX_CODEMOTION(_system)); ! } ! ! if (tmp=="benchpplinux-codemotion-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_CODEMOTION_HO(_system)); ! } ! ! if (tmp=="benchpplinux-inducvar") { ! return(new CBMBenchmarkBENCHPPLINUX_INDUCVAR(_system)); ! } ! ! if (tmp=="benchpplinux-inducvar-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_INDUCVAR_HO(_system)); ! } ! ! if (tmp=="benchpplinux-reducstrength-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_REDUCSTRENGTH_HO(_system)); ! } ! ! if (tmp=="benchpplinux-deadcode") { ! return(new CBMBenchmarkBENCHPPLINUX_DEADCODE(_system)); ! } ! ! if (tmp=="benchpplinux-deadcode-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_DEADCODE_HO(_system)); ! } ! ! if (tmp=="benchpplinux-loopjamming") { ! return(new CBMBenchmarkBENCHPPLINUX_LOOPJAMMING(_system)); ! } ! ! if (tmp=="benchpplinux-loopjamming-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_LOOPJAMMING_HO(_system)); ! } ! ! if (tmp=="benchpplinux-reduncode") { ! return(new CBMBenchmarkBENCHPPLINUX_REDUNCODE(_system)); ! } ! ! if (tmp=="benchpplinux-reduncode-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_REDUNCODE_HO(_system)); ! } ! ! if (tmp=="benchpplinux-stringops") { ! return(new CBMBenchmarkBENCHPPLINUX_STRINGOPS(_system)); ! } ! ! if (tmp=="benchpplinux-stringops-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_STRINGOPS_HO(_system)); ! } ! return(0); ! } ! int cbmlib_getBenchmarkNumber(void) ! { ! return(35); } - std::vector<std::string> cbmlib_getBenchmarks(void) - { - std::vector<std::string> result; ! result.push_back("benchpplinux-dhrystone"); ! result.push_back("benchpplinux-whetstone"); ! result.push_back("benchpplinux-bool-assign"); ! result.push_back("benchpplinux-bool-if"); ! result.push_back("benchpplinux-2wifelse"); ! result.push_back("benchpplinux-2wswitch"); ! result.push_back("benchpplinux-10wifelse"); ! result.push_back("benchpplinux-10wswitch"); ! result.push_back("benchpplinux-10wsparseswitch"); ! result.push_back("benchpplinux-10wvfc"); ! result.push_back("benchpplinux-packedbitarray"); ! result.push_back("benchpplinux-bitfields"); ! result.push_back("benchpplinux-bitfields-pba"); ! result.push_back("benchpplinux-packunpackobjets"); ! result.push_back("benchpplinux-constantpropagation"); ! result.push_back("benchpplinux-constantpropagation-ho"); ! result.push_back("benchpplinux-localcommonse"); ! result.push_back("benchpplinux-localcommonse-ho"); ! result.push_back("benchpplinux-globalcommonse"); ! result.push_back("benchpplinux-globalcommonse-ho"); ! result.push_back("benchpplinux-unneccopy"); ! result.push_back("benchpplinux-unneccopy-ho"); ! result.push_back("benchpplinux-codemotion"); ! result.push_back("benchpplinux-codemotion-ho"); ! result.push_back("benchpplinux-inducvar"); ! result.push_back("benchpplinux-inducvar-ho"); ! result.push_back("benchpplinux-reducstrength-ho"); ! result.push_back("benchpplinux-deadcode"); ! result.push_back("benchpplinux-deadcode-ho"); ! result.push_back("benchpplinux-loopjamming"); ! result.push_back("benchpplinux-loopjamming-ho"); ! result.push_back("benchpplinux-reduncode"); ! result.push_back("benchpplinux-reduncode-ho"); ! result.push_back("benchpplinux-stringops"); ! result.push_back("benchpplinux-stringops-ho"); ! ! return(result); } ! --- 1,161 ---- ! #include <Benchmark/Benchmark-DLLoader.h> ! #include <UI/UI.h> ! BenchmarkVector& CBMPackageBENCHPPLINUX::Benchmarks(void) { ! if (benchmarks.size()) return(benchmarks); ! benchmarks.push_back("benchpplinux-bool-assign"); ! benchmarks.push_back("benchpplinux-constantpropagation"); ! benchmarks.push_back("benchpplinux-10wsparseswitch"); ! benchmarks.push_back("benchpplinux-dhrystone"); ! benchmarks.push_back("benchpplinux-inducvar-ho"); ! benchmarks.push_back("benchpplinux-loopjamming-ho"); ! benchmarks.push_back("benchpplinux-codemotion"); ! benchmarks.push_back("benchpplinux-10wvfc"); ! benchmarks.push_back("benchpplinux-2wifelse"); ! benchmarks.push_back("benchpplinux-globalcommonse-ho"); ! benchmarks.push_back("benchpplinux-bitfields"); ! benchmarks.push_back("benchpplinux-globalcommonse"); ! benchmarks.push_back("benchpplinux-2wswitch"); ! benchmarks.push_back("benchpplinux-inducvar"); ! benchmarks.push_back("benchpplinux-bitfields-pba"); ! benchmarks.push_back("benchpplinux-deadcode"); ! benchmarks.push_back("benchpplinux-reduncode-ho"); ! benchmarks.push_back("benchpplinux-10wifelse"); ! benchmarks.push_back("benchpplinux-unneccopy-ho"); ! benchmarks.push_back("benchpplinux-10wswitch"); ! benchmarks.push_back("benchpplinux-packunpackobjets"); ! benchmarks.push_back("benchpplinux-bool-if"); ! benchmarks.push_back("benchpplinux-unneccopy"); ! benchmarks.push_back("benchpplinux-reducstrength-ho"); ! benchmarks.push_back("benchpplinux-deadcode-ho"); ! benchmarks.push_back("benchpplinux-reduncode"); ! benchmarks.push_back("benchpplinux-constantpropagation-ho"); ! benchmarks.push_back("benchpplinux-codemotion-ho"); ! benchmarks.push_back("benchpplinux-whetstone"); ! benchmarks.push_back("benchpplinux-stringops"); ! benchmarks.push_back("benchpplinux-localcommonse-ho"); ! benchmarks.push_back("benchpplinux-localcommonse"); ! benchmarks.push_back("benchpplinux-stringops-ho"); ! benchmarks.push_back("benchpplinux-packedbitarray"); ! benchmarks.push_back("benchpplinux-loopjamming"); ! return(benchmarks); } ! CBMBenchmark *CBMPackageBENCHPPLINUX::Benchmark(std::string bid) { ! if (bid == "benchpplinux-bool-assign") { ! return(new CBMBenchmarkBENCHPPLINUX_BOOL_ASSIGN(this)); ! } ! if (bid == "benchpplinux-constantpropagation") { ! return(new CBMBenchmarkBENCHPPLINUX_CONSTPROP(this)); ! } ! if (bid == "benchpplinux-10wsparseswitch") { ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_SPARSE_SWITCH(this)); ! } ! if (bid == "benchpplinux-dhrystone") { ! return(new CBMBenchmarkBENCHPPLINUX_DHRYSTONE(this)); ! } ! if (bid == "benchpplinux-inducvar-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_INDUCVAR_HO(this)); ! } ! if (bid == "benchpplinux-loopjamming-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_LOOPJAMMING_HO(this)); ! } ! if (bid == "benchpplinux-codemotion") { ! return(new CBMBenchmarkBENCHPPLINUX_CODEMOTION(this)); ! } ! if (bid == "benchpplinux-10wvfc") { ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_VFC(this)); ! } ! if (bid == "benchpplinux-2wifelse") { ! return(new CBMBenchmarkBENCHPPLINUX_2WAY_IFELSE(this)); ! } ! if (bid == "benchpplinux-globalcommonse-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_GLOBALCSE_HO(this)); ! } ! if (bid == "benchpplinux-bitfields") { ! return(new CBMBenchmarkBENCHPPLINUX_BITFIELDS(this)); ! } ! if (bid == "benchpplinux-globalcommonse") { ! return(new CBMBenchmarkBENCHPPLINUX_GLOBALCSE(this)); ! } ! if (bid == "benchpplinux-2wswitch") { ! return(new CBMBenchmarkBENCHPPLINUX_2WAY_SWITCH(this)); ! } ! if (bid == "benchpplinux-inducvar") { ! return(new CBMBenchmarkBENCHPPLINUX_INDUCVAR(this)); ! } ! if (bid == "benchpplinux-bitfields-pba") { ! return(new CBMBenchmarkBENCHPPLINUX_BITFIELDS_PBA(this)); ! } ! if (bid == "benchpplinux-deadcode") { ! return(new CBMBenchmarkBENCHPPLINUX_DEADCODE(this)); ! } ! if (bid == "benchpplinux-reduncode-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_REDUNCODE_HO(this)); ! } ! if (bid == "benchpplinux-10wifelse") { ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_IFELSE(this)); ! } ! if (bid == "benchpplinux-unneccopy-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_UNNECCOPY_HO(this)); ! } ! if (bid == "benchpplinux-10wswitch") { ! return(new CBMBenchmarkBENCHPPLINUX_10WAY_SWITCH(this)); ! } ! if (bid == "benchpplinux-packunpackobjets") { ! return(new CBMBenchmarkBENCHPPLINUX_PACKUNPACKOBJ(this)); ! } ! if (bid == "benchpplinux-bool-if") { ! return(new CBMBenchmarkBENCHPPLINUX_BOOL_IF(this)); ! } ! if (bid == "benchpplinux-unneccopy") { ! return(new CBMBenchmarkBENCHPPLINUX_UNNECCOPY(this)); ! } ! if (bid == "benchpplinux-reducstrength-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_REDUCSTRENGTH_HO(this)); ! } ! if (bid == "benchpplinux-deadcode-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_DEADCODE_HO(this)); ! } ! if (bid == "benchpplinux-reduncode") { ! return(new CBMBenchmarkBENCHPPLINUX_REDUNCODE(this)); ! } ! if (bid == "benchpplinux-constantpropagation-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_CONSTPROP_HO(this)); ! } ! if (bid == "benchpplinux-codemotion-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_CODEMOTION_HO(this)); ! } ! if (bid == "benchpplinux-whetstone") { ! return(new CBMBenchmarkBENCHPPLINUX_WHETSTONE(this)); ! } ! if (bid == "benchpplinux-stringops") { ! return(new CBMBenchmarkBENCHPPLINUX_STRINGOPS(this)); ! } ! if (bid == "benchpplinux-localcommonse-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_LOCALCSE_HO(this)); ! } ! if (bid == "benchpplinux-localcommonse") { ! return(new CBMBenchmarkBENCHPPLINUX_LOCALCSE(this)); ! } ! if (bid == "benchpplinux-stringops-ho") { ! return(new CBMBenchmarkBENCHPPLINUX_STRINGOPS_HO(this)); ! } ! if (bid == "benchpplinux-packedbitarray") { ! return(new CBMBenchmarkBENCHPPLINUX_PACKEDBITARRAY(this)); ! } ! if (bid == "benchpplinux-loopjamming") { ! return(new CBMBenchmarkBENCHPPLINUX_LOOPJAMMING(this)); ! } ! UI->Fatal("Unknown benchmark"); ! return(0); } ! CBMPackage *package_BENCHPPLINUX = 0; ! CBMPackage *cbmlib_getPackage(void) { ! if (!package_BENCHPPLINUX) { ! package_BENCHPPLINUX=new CBMPackageBENCHPPLINUX(cbmSystem); ! cbmlib_packages.push_back(package_BENCHPPLINUX); ! } ! return(package_BENCHPPLINUX); ! } Index: Benchmark-LINPACKC.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-LINPACKC.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-LINPACKC.cpp 3 Jan 2007 20:05:20 -0000 1.2 --- Benchmark-LINPACKC.cpp 3 Jan 2007 22:06:27 -0000 1.3 *************** *** 5,8 **** --- 5,9 ---- #include <SupportedBenchmarks/Benchmark-LINPACKC.libwrapper.h> + // !!! CBMPackageLINPACKC::CBMPackageLINPACKC(CBMSystem *_system) *************** *** 26,38 **** } - std::string CBMPackageLINPACKC::benchmarkComments(void) - { - std::string comment; - - comment="linpackc benchmark with specific compilation options :"; - comment+=benchmarkLINPACKCComments(); - return(comment); - } - std::string CBMPackageLINPACKC::packageVersion(void) { --- 27,30 ---- *************** *** 46,50 **** int CBMPackageLINPACKC::ContextMatches(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { std::string localFlags; --- 38,42 ---- int CBMPackageLINPACKC::ContextMatches(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { std::string localFlags; *************** *** 260,263 **** --- 252,265 ---- } + std::string CBMBenchmarkLINPACKC::benchmarkComments(void) + { + std::string comment; + + comment="linpackc benchmark with specific compilation options :"; + comment+=benchmarkLINPACKCComments(); + return(comment); + } + + std::string CBMBenchmarkLINPACKC::bench(void) { Index: Benchmark-SCIMARK2.libwrapper.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-SCIMARK2.libwrapper.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-SCIMARK2.libwrapper.h 28 Dec 2006 17:41:04 -0000 1.1 --- Benchmark-SCIMARK2.libwrapper.h 3 Jan 2007 22:06:27 -0000 1.2 *************** *** 1,68 **** ! CBMBenchmark *cbmlib_getBenchmark(int idx, CBMSystem *_system) ! { ! switch(idx) { ! case 0: ! return(new CBMBenchmarkSCIMARK2_FOURIER(_system)); ! ;; ! case 1: ! return(new CBMBenchmarkSCIMARK2_SOR(_system)); ! ;; ! case 2: ! return(new CBMBenchmarkSCIMARK2_MC(_system)); ! ;; ! case 3: ! return(new CBMBenchmarkSCIMARK2_SMM(_system)); ! ;; ! case 4: ! return(new CBMBenchmarkSCIMARK2_LU(_system)); ! ;; ! default: ! return(0); ! ;; ! } ! } ! ! CBMBenchmark *cbmlib_getBenchmarkByName(char *bench_id, CBMSystem *_system) ! { ! std::string tmp = bench_id; ! ! if (tmp=="scimark2-fourier") { ! return(new CBMBenchmarkSCIMARK2_FOURIER(_system)); ! } ! ! if (tmp=="scimark2-sor") { ! return(new CBMBenchmarkSCIMARK2_SOR(_system)); ! } ! ! if (tmp=="scimark2-mc") { ! return(new CBMBenchmarkSCIMARK2_MC(_system)); ! } ! ! if (tmp=="scimark2-smm") { ! return(new CBMBenchmarkSCIMARK2_SMM(_system)); ! } ! ! if (tmp=="scimark2-lu") { ! return(new CBMBenchmarkSCIMARK2_LU(_system)); ! } ! return(0); ! } ! int cbmlib_getBenchmarkNumber(void) ! { ! return(5); } - std::vector<std::string> cbmlib_getBenchmarks(void) - { - std::vector<std::string> result; - - result.push_back("scimark2-fourier"); - result.push_back("scimark2-sor"); - result.push_back("scimark2-mc"); - result.push_back("scimark2-smm"); - result.push_back("scimark2-lu"); ! return(result); } ! --- 1,41 ---- ! #include <Benchmark/Benchmark-DLLoader.h> ! #include <UI/UI.h> ! BenchmarkVector& CBMPackageSCIMARK2::Benchmarks(void) { ! if (benchmarks.size()) return(benchmarks); ! benchmarks.push_back("scimark2-smm"); ! benchmarks.push_back("scimark2-lu"); ! benchmarks.push_back("scimark2-fourier"); ! benchmarks.push_back("scimark2-mc"); ! benchmarks.push_back("scimark2-sor"); ! return(benchmarks); } ! CBMBenchmark *CBMPackageSCIMARK2::Benchmark(std::string bid) { ! if (bid == "scimark2-smm") { ! return(new CBMBenchmarkSCIMARK2_SMM(this)); ! } ! if (bid == "scimark2-lu") { ! return(new CBMBenchmarkSCIMARK2_LU(this)); ! } ! if (bid == "scimark2-fourier") { ! return(new CBMBenchmarkSCIMARK2_FOURIER(this)); ! } ! if (bid == "scimark2-mc") { ! return(new CBMBenchmarkSCIMARK2_MC(this)); ! } ! if (bid == "scimark2-sor") { ! return(new CBMBenchmarkSCIMARK2_SOR(this)); ! } ! UI->Fatal("Unknown benchmark"); ! return(0); } ! CBMPackage *package_SCIMARK2 = 0; ! CBMPackage *cbmlib_getPackage(void) { ! if (!package_SCIMARK2) { ! package_SCIMARK2=new CBMPackageSCIMARK2(cbmSystem); ! cbmlib_packages.push_back(package_SCIMARK2); ! } ! return(package_SCIMARK2); ! } Index: Benchmark-BZIP2.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BZIP2.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-BZIP2.h 3 Jan 2007 18:49:56 -0000 1.2 --- Benchmark-BZIP2.h 3 Jan 2007 22:06:26 -0000 1.3 *************** *** 48,54 **** }; /** \brief Defines the bzip2 benchmark using fastest compression level. */ ! class CBMBenchmarkBZIP21 : public CBMBenchmarkxZIP { protected: --- 48,63 ---- }; + /** \brief Abstract class for bzip2 benchmarks */ + class CBMBenchmarkBZIP2 : public CBMBenchmarkxZIP + { + protected: + CBMBenchmarkBZIP2(CBMPackage *_package); + virtual std::string benchmarkProgram(void); + virtual ~CBMBenchmarkBZIP2(); + }; + /** \brief Defines the bzip2 benchmark using fastest compression level. */ ! class CBMBenchmarkBZIP21 : public CBMBenchmarkBZIP2 { protected: *************** *** 64,68 **** /** \brief Defines the bzip2 benchmark using maximum compression level. */ ! class CBMBenchmarkBZIP29 : public CBMBenchmarkxZIP { protected: --- 73,77 ---- /** \brief Defines the bzip2 benchmark using maximum compression level. */ ! class CBMBenchmarkBZIP29 : public CBMBenchmarkBZIP2 { protected: Index: Benchmark-LINPACKC.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-LINPACKC.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-LINPACKC.h 3 Jan 2007 20:05:20 -0000 1.2 --- Benchmark-LINPACKC.h 3 Jan 2007 22:06:27 -0000 1.3 *************** *** 23,27 **** virtual std::string packageName(void); - virtual std::string benchmarkComments(void); virtual std::string packageVersion(void); --- 23,26 ---- *************** *** 43,53 **** protected: - virtual std::string linpackPrecisionFlags(void) = 0; - virtual std::string linpackRollFlags(void) = 0; - virtual std::string language(void); - virtual std::string benchmarkLINPACKCComments(void) = 0; - virtual char* extractDirectory(void); virtual int hasPatch(void); --- 42,47 ---- *************** *** 81,84 **** --- 75,83 ---- protected: CBMBenchmarkLINPACKC(CBMPackage *_package); + virtual std::string benchmarkComments(void); + virtual std::string linpackPrecisionFlags(void) = 0; + virtual std::string linpackRollFlags(void) = 0; + virtual std::string benchmarkLINPACKCComments(void) = 0; + virtual std::string bench(void); virtual ~CBMBenchmarkLINPACKC(); |
From: Frederic T. <xf...@us...> - 2007-01-03 22:04:56
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24139 Removed Files: benchmarks-genlibwrapper.sh Log Message: Obsoleted (replaced by a Perl script). --- benchmarks-genlibwrapper.sh DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-03 22:04:21
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24112 Added Files: benchmarks-genlibwrapper.pl Log Message: First import. --- NEW FILE: benchmarks-genlibwrapper.pl --- #!/usr/bin/perl -w use strict; my %DATA; my $PACKAGE = $ARGV[0]; my $BENCHLIST_DIR = $ARGV[1]; $PACKAGE=~ s/.+Benchmark-(.*?)\.libwrapper.h/$1/; sub parse { my $f = "$BENCHLIST_DIR/benchmarks.list"; open(FD, $f) || die ("$!: $f"); while (<FD>) { if (/^\s*#/) { next; } if (/(.*):(.*):(.*)/) { if ($2 ne $PACKAGE) { next; } $DATA{$2}->{$1}=$3; } } close(FD); } sub generate { print "#include <Benchmark/Benchmark-DLLoader.h>\n"; print "#include <UI/UI.h>\n\n"; print "BenchmarkVector& CBMPackage$PACKAGE\::Benchmarks(void) {\n"; print " if (benchmarks.size()) return(benchmarks);\n"; foreach(keys %{$DATA{$PACKAGE}}) { print " benchmarks.push_back(\"$_\");\n"; } print " return(benchmarks);\n"; print "}\n\n"; print "CBMBenchmark *CBMPackage$PACKAGE\::Benchmark(std::string bid) {\n"; foreach(keys %{$DATA{$PACKAGE}}) { print " if (bid == \"$_\") {\n"; print " return(new CBMBenchmark$DATA{$PACKAGE}->{$_}(this));\n"; print " }\n"; } print " UI->Fatal(\"Unknown benchmark\");\n"; print " return(0);\n"; print "}\n\n"; print "CBMPackage *package_$PACKAGE = 0;\n"; print "CBMPackage *cbmlib_getPackage(void) {\n"; print " if (!package_$PACKAGE) {\n"; print " package_$PACKAGE=new CBMPackage$PACKAGE(cbmSystem);\n"; print " cbmlib_packages.push_back(package_$PACKAGE);\n"; print " }\n"; print " return(package_$PACKAGE);\n"; print "}\n"; } parse(); generate(); |
From: Frederic T. <xf...@us...> - 2007-01-03 22:03:53
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23736 Removed Files: Benchmark-Selector.cpp Log Message: Obsoleted (replaced by a Perl script). --- Benchmark-Selector.cpp DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-03 22:03:17
|
Update of /cvsroot/compbench/CompBenchmarks++/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23697 Modified Files: System.cpp System.h Log Message: Simplified interface to get benchmarks and packages. Index: System.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/System/System.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** System.cpp 28 Dec 2006 18:14:15 -0000 1.14 --- System.cpp 3 Jan 2007 22:03:09 -0000 1.15 *************** *** 116,124 **** ! std::vector<std::string> CBMSystem::bmList(void) { DIR *fd; struct dirent *de; - std::vector<std::string> result; std::string dum; unsigned int e; --- 116,123 ---- ! PackageVector &CBMSystem::packageList(int _force) { DIR *fd; struct dirent *de; std::string dum; unsigned int e; *************** *** 131,134 **** --- 130,136 ---- int inserted; + if ((packages.size()!=0) && (!_force)) + return(packages); + for(p_i=0;p_i<p_n;p_i++) { dir=cbmlib_paths[p_i]; *************** *** 152,158 **** inserted=0; ! r_n=result.size(); for(r_i=0;r_i<r_n;r_i++) { ! if (result[r_i] == dum) { inserted=1; break; --- 154,160 ---- inserted=0; ! r_n=packages.size(); for(r_i=0;r_i<r_n;r_i++) { ! if (packages[r_i] == dum) { inserted=1; break; *************** *** 161,165 **** if (!inserted) ! result.push_back(dum); } } --- 163,167 ---- if (!inserted) ! packages.push_back(dum); } } *************** *** 167,171 **** } ! return(result); } --- 169,208 ---- } ! return(packages); ! } ! ! int CBMSystem::packageNumber(void) ! { ! return(packages.size()); ! } ! ! char *CBMSystem::packageGet(int index) ! { ! return((char*) packages[index].c_str()); ! } ! ! CBMPackage *CBMSystem::Package(std::string pid) ! { ! cbmlib_internal *p = cbmlib_load((char*) pid.c_str()); ! ! if (p) ! return(p->PackageGet()); ! ! return(0); ! } ! ! CBMBenchmark *CBMSystem::Benchmark(std::string bid) ! { ! std::string pid; ! CBMPackage *P = 0; ! ! pid=Split(bid, "-", 0); ! P=Package(pid); ! ! if (P) { ! return(P->Benchmark(bid)); ! } ! ! return(0); } Index: System.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/System/System.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** System.h 28 Dec 2006 18:14:15 -0000 1.14 --- System.h 3 Jan 2007 22:03:09 -0000 1.15 *************** *** 15,18 **** --- 15,23 ---- #include <time.h> + + /** Defines a vector of packages. + */ + typedef std::vector<std::string> PackageVector; + /** \brief Operating system (and optionnaly hardware) abstraction layer. * *************** *** 39,42 **** --- 44,50 ---- protected: + /** \sa Packages() */ + PackageVector packages; + /** Stores the last (shell) command executed by compbenchmarks library. */ std::string lastCommand; *************** *** 117,121 **** * in declared directories. * \return a std::string list of benchmarks (id) */ ! virtual std::vector<std::string> bmList(void); /** Split a std::string. --- 125,135 ---- * in declared directories. * \return a std::string list of benchmarks (id) */ ! virtual PackageVector& packageList(int _force = 0); ! ! virtual int packageNumber(void); ! virtual char *packageGet(int index); ! ! virtual class CBMPackage *Package(std::string pid); ! virtual class CBMBenchmark *Benchmark(std::string bid); /** Split a std::string. |
From: Frederic T. <xf...@us...> - 2007-01-03 22:02:32
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23335 Modified Files: Benchmark-DLLoader.cpp Benchmark-DLLoader.h Log Message: Simplified interface. Index: Benchmark-DLLoader.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-DLLoader.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-DLLoader.cpp 28 Dec 2006 18:18:15 -0000 1.3 --- Benchmark-DLLoader.cpp 3 Jan 2007 22:02:28 -0000 1.4 *************** *** 8,15 **** --- 8,18 ---- std::vector<std::string> cbmlib_paths; + std::vector<CBMPackage*> cbmlib_packages; /* cache... */ std::vector<cbmlib_internal*> cbmlib_loaded_libraries; + int PACKAGE_AUTOPURGE=1; + cbmlib_internal *cbmlib_check_previousload(char *package_id) { *************** *** 20,24 **** for(i=0; i<s; i++) { l=cbmlib_loaded_libraries[i]; ! if (l->package_id==package_id) return(l); } --- 23,27 ---- for(i=0; i<s; i++) { l=cbmlib_loaded_libraries[i]; ! if (l->PackageGet()->packageName()==package_id) return(l); } *************** *** 48,85 **** r->library=library; if (UO_verbose) ! std::cout << " Checking cbmlib_getBenchmarkNumber... "; ! r->Number=(cbmlib_internal_number_t) (dlsym(r->library, "cbmlib_getBenchmarkNumber")); ! if (!r->Number) { ! dlclose(library); ! if (UO_verbose) ! std::cout << "N.A." << std::endl; ! delete(r); ! return(0); ! } else { ! if (UO_verbose) ! std::cout << "found." << std::endl; ! } ! ! ! ! ! if (UO_verbose) ! std::cout << " Checking cbmlib_getBenchmarks... "; ! r->GetBenchmarks=(cbmlib_internal_getBenchmarks_t) (dlsym(r->library, "cbmlib_getBenchmarks")); ! if (!r->GetBenchmarks) { ! dlclose(library); ! if (UO_verbose) ! std::cout << "N.A." << std::endl; ! delete(r); ! return(0); ! } else { ! if (UO_verbose) ! std::cout << "found." << std::endl; ! } ! ! if (UO_verbose) ! std::cout << " Checking cbmlib_getBenchmark... "; ! r->Bench=(cbmlib_internal_bench_t) dlsym(r->library, "cbmlib_getBenchmark"); ! if (!r->Bench) { dlclose(library); if (UO_verbose) --- 51,57 ---- r->library=library; if (UO_verbose) ! std::cout << " Checking cbmlib_getPackage... "; ! r->PackageGet=(cbmlib_internal_getPackage_t) (dlsym(r->library, "cbmlib_getPackage")); ! if (!r->PackageGet) { dlclose(library); if (UO_verbose) *************** *** 92,109 **** } - if (UO_verbose) - std::cout << " Checking cbmlib_getBenchmarkByName... "; - r->BenchByName=(cbmlib_internal_benchbyname_t) dlsym(r->library, "cbmlib_getBenchmarkByName"); - if (!r->Bench) { - dlclose(library); - if (UO_verbose) - std::cout << "N.A." << std::endl; - delete(r); - return(0); - } else { - if (UO_verbose) - std::cout << "found." << std::endl; - } - r->package_id=package_id; cbmlib_loaded_libraries.push_back(r); return(r); --- 64,67 ---- *************** *** 136,159 **** } - CBMBenchmark *cbmlib_bench_load(char *bench_id, CBMSystem *_system) - { - std::string bench = bench_id; - std::string package = _system->Split(bench, "-", 0); - CBMBenchmark *b; - cbmlib_internal *l = cbmlib_load((char*) package.c_str()); - - if (l) { - b=l->BenchByName(bench_id, _system); - return(b); - } else - return(0); - } - void cbmlib_done(void) { int i; ! int s = cbmlib_loaded_libraries.size(); cbmlib_internal *l; for(i=0; i<s; i++) { l=cbmlib_loaded_libraries[i]; --- 94,111 ---- } void cbmlib_done(void) { int i; ! int s; cbmlib_internal *l; + s = cbmlib_packages.size(); + + PACKAGE_AUTOPURGE=0; + for(i=0; i<s; i++) { + delete(cbmlib_packages[i]); + } + + s = cbmlib_loaded_libraries.size(); for(i=0; i<s; i++) { l=cbmlib_loaded_libraries[i]; Index: Benchmark-DLLoader.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-DLLoader.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Benchmark-DLLoader.h 28 Dec 2006 18:18:15 -0000 1.3 --- Benchmark-DLLoader.h 3 Jan 2007 22:02:28 -0000 1.4 *************** *** 12,15 **** --- 12,17 ---- #include <System/System.h> #include <Benchmark/Benchmark.h> + #include <Benchmark/Package.h> + #include <dlfcn.h> #include <vector> *************** *** 18,43 **** extern std::vector<std::string> cbmlib_paths; ! /** Function prototype for getting benchmark's number in a shared library */ ! typedef int (*cbmlib_internal_number_t)(void); ! /** Function prototype for getting a benchmark object by its index */ ! typedef CBMBenchmark* (*cbmlib_internal_bench_t)(int, CBMSystem*); ! /** Function prototype for getting a benchmark object by its name */ ! typedef CBMBenchmark* (*cbmlib_internal_benchbyname_t)(char*, CBMSystem*); ! /** Function prototype for getting all benchmarks wihtin a package */ ! typedef std::vector<std::string> (*cbmlib_internal_getBenchmarks_t)(void); /** Low-level internal benchmark's shared library object */ typedef struct cbmlib_internal { ! void *library; ! std::string package_id; ! cbmlib_internal_number_t Number; ! cbmlib_internal_bench_t Bench; ! cbmlib_internal_benchbyname_t BenchByName; ! cbmlib_internal_getBenchmarks_t GetBenchmarks; }; - /** \brief Low-level library loading according to the benchmark/package's internal name. --- 20,36 ---- extern std::vector<std::string> cbmlib_paths; ! extern std::vector<CBMPackage*> cbmlib_packages; ! extern int PACKAGE_AUTOPURGE; + /** Function prototype for accessing a CBMPackage object */ + typedef CBMPackage* (*cbmlib_internal_getPackage_t)(void); /** Low-level internal benchmark's shared library object */ typedef struct cbmlib_internal { ! void *library; ! cbmlib_internal_getPackage_t PackageGet; }; /** \brief Low-level library loading according to the benchmark/package's internal name. |
From: Frederic T. <xf...@us...> - 2007-01-03 22:02:15
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23308 Modified Files: Benchmark-xZIP.cpp Benchmark-xZIP.h Log Message: CBMPackage and new related API used. Index: Benchmark-xZIP.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-xZIP.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-xZIP.cpp 25 Sep 2006 15:38:51 -0000 1.2 --- Benchmark-xZIP.cpp 3 Jan 2007 22:02:11 -0000 1.3 *************** *** 4,13 **** #include <fstream> ! CBMBenchmarkxZIP::CBMBenchmarkxZIP(CBMSystem *_system) ! : CBMBenchmarkAutotools(_system) { } ! int CBMBenchmarkxZIP::preConfigure(int _force) { std::string fileName; --- 4,13 ---- #include <fstream> ! CBMPackagexZIP::CBMPackagexZIP(CBMSystem *_system) ! : CBMPackageAutotools(_system) { } ! int CBMPackagexZIP::preConfigure(int _force) { std::string fileName; *************** *** 28,34 **** } std::string CBMBenchmarkxZIP::bench(void) { ! time_t start = system->Time(); time_t end; std::string cmd; --- 28,43 ---- } + CBMPackagexZIP::~CBMPackagexZIP() + { + } + + CBMBenchmarkxZIP::CBMBenchmarkxZIP(CBMPackage *_package) + : CBMBenchmark(_package) + { + } + std::string CBMBenchmarkxZIP::bench(void) { ! time_t start = System()->Time(); time_t end; std::string cmd; *************** *** 38,42 **** cmd="cd "; ! cmd+=localPackageAbsoluteDirectory(); cmd+=" && ./"; cmd+=benchmarkProgram(); --- 47,51 ---- cmd="cd "; ! cmd+=package->localPackageAbsoluteDirectory(); cmd+=" && ./"; cmd+=benchmarkProgram(); *************** *** 45,56 **** cmd+="c Compbenchmarks.dat > /dev/null"; ! if (system->exec(cmd, sstdout)==0) { ! end=system->Time(); ! sprintf(dum, "%0.0f", ((float)benchmarkSize())/((int)(end-start))); result=dum; return(result); } else { return("0"); ! } } --- 54,65 ---- cmd+="c Compbenchmarks.dat > /dev/null"; ! if (System()->exec(cmd, sstdout)==0) { ! end=System()->Time(); ! sprintf(dum, "%0.0f", ((float)package->benchmarkSize())/((int)(end-start))); result=dum; return(result); } else { return("0"); ! } } *************** *** 58,60 **** { } - --- 67,68 ---- Index: Benchmark-xZIP.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-xZIP.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-xZIP.h 19 Sep 2006 17:09:35 -0000 1.2 --- Benchmark-xZIP.h 3 Jan 2007 22:02:11 -0000 1.3 *************** *** 13,27 **** ! /** \brief Defines an abstract benchmark based on xZIP utilities. * ! * This class can be overloaded in order to get new external benchmarks and packages ! * supported by CompBenchmarks. It provides a 70M (through preConfigure()) file that ! * can be compressed. */ ! class CBMBenchmarkxZIP : public CBMBenchmarkAutotools { private: protected: /** Compression level \return compression level ("0" .. "9") used. --- 13,56 ---- ! /** \brief Defines an abstract package based on ZIP utilities. * ! * This class can be overloaded in order to get new external packages ! * supported by CompBenchmarks. It provides a 70M (through preConfigure()) ! * file that can be compressed. ! * \sa CBMBenchmarkxZIP */ ! class CBMPackagexZIP : public CBMPackageAutotools { private: protected: + /** Pre-configure package + * Creates a ~70M files used for compression benchmarks. + * \param _force must be set to 1 to force operation. + * \sa CBMBenchmark::preConfigure() */ + virtual int preConfigure(int _force = 0); + + public: + /** Constructor */ + CBMPackagexZIP(class CBMSystem *_system); + + /** Virtual destructor */ + virtual ~CBMPackagexZIP(); + + }; + + /** \brief Defines an abstract benchmark based on ZIP utilities. + * + * This class can be overloaded in order to get new external packages + * supported by CompBenchmarks. It provides a 70M (through preConfigure()) + * file that can be compressed. + * \sa CBMPackagexZIP + */ + + class CBMBenchmarkxZIP : public CBMBenchmark + { + protected: + CBMBenchmarkxZIP(CBMPackage *_package); + /** Compression level \return compression level ("0" .. "9") used. *************** *** 34,55 **** virtual std::string benchmarkProgram(void) = 0; - /** Pre-configure package - * Creates a ~70M files used for compression benchmarks. - * \param _force must be set to 1 to force operation. - * \sa CBMBenchmark::preConfigure() */ - virtual int preConfigure(int _force = 0); /** Runs the benchmark * Gives the amount of compressed bytes per seconds (as CompBenchmarks always apply * "bigger is better" policy to benchmarks' results, we can just rely on time). */ - virtual std::string bench(void); - - public: - /** Constructor */ - CBMBenchmarkxZIP(class CBMSystem *_system); ! /** Virtual destructor */ virtual ~CBMBenchmarkxZIP(); - }; --- 63,73 ---- virtual std::string benchmarkProgram(void) = 0; /** Runs the benchmark * Gives the amount of compressed bytes per seconds (as CompBenchmarks always apply * "bigger is better" policy to benchmarks' results, we can just rely on time). */ ! virtual std::string bench(void); virtual ~CBMBenchmarkxZIP(); }; |
From: Frederic T. <xf...@us...> - 2007-01-03 22:00:18
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv22488 Modified Files: Makefile.am Log Message: Files for CBMPackage added. Benchmark selection mechanism refactored (obsolete files removed). Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Makefile.am,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Makefile.am 28 Dec 2006 17:39:46 -0000 1.16 --- Makefile.am 3 Jan 2007 22:00:15 -0000 1.17 *************** *** 3,11 **** noinst_LTLIBRARIES = libBenchmark.la ! sources = Benchmark.cpp \ Benchmark-DLLoader.cpp \ Benchmark-Autotools.cpp \ ! Benchmark-xZIP.cpp \ ! Benchmark-Selector.cpp libBenchmark_la_SOURCES = $(sources) --- 3,12 ---- noinst_LTLIBRARIES = libBenchmark.la ! sources = Package.cpp \ ! Benchmark.cpp \ Benchmark-DLLoader.cpp \ Benchmark-Autotools.cpp \ ! Benchmark-xZIP.cpp ! # Benchmark-Selector.cpp libBenchmark_la_SOURCES = $(sources) |
From: Frederic T. <xf...@us...> - 2007-01-03 21:58:42
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21777 Modified Files: Benchmark.cpp Benchmark.h Log Message: Splited to CBMPackage. Index: Benchmark.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Benchmark.h 28 Dec 2006 18:17:36 -0000 1.12 --- Benchmark.h 3 Jan 2007 21:58:38 -0000 1.13 *************** *** 30,130 **** { public: ! /** Benchmark status ! * Defines typedef used to code internal status of a given benchmark ! */ ! typedef enum Status { Unknown, /*!< Unkown; benchmark/package probably ! * not yet installed */ ! Downloaded, /*!< Package has been downloaded and checksum ! * is Ok. */ ! Extracted, /*!< Package has been successfuly extracted */ ! Patched, /*!< Package has been patched (optional step) */ ! Preconfigured, /*!< Package is now preconfigured. Also ! * optionnal, but each package goes throught ! * that step */ ! Configured, /*!< Package is configured (./configure) */ ! Made, /*!< Package has been made (make) */ ! Tested, /*!< Package has been tested */ ! Benchmarked }; /*!< Benchmarked */ ! private: - /** Package or benchmark status - * \sa CBMBenchmark::Status - * \sa storeStatus() - * \sa getStatus() - * \sa readStatus() */ - Status status; - - /** Expected MD5 on downloaded package - * \return MD5 expected, as an std::string */ - virtual std::string expectedMD5(void) = 0; - - /** Benchmark's status - * Initialise the status from file in the directory defined by CBMSystem::Status. - * \sa CBMBenchmark::Status - * \return 1 if ok. */ - virtual int readStatus(void); - - /** Remove context. - * \sa storeContext() - */ - virtual int resetContext(void); - protected: ! /** Stores current compiler. */ ! CBMCompiler *currentCompiler; ! /** Stores current (compiler) options. */ ! CBMCompilerOptions *currentOptions; ! ! /** System used */ ! class CBMSystem *system; /** Constructor * Initialise the CBMBenchmark::system variable. */ ! CBMBenchmark(class CBMSystem *_system); ! ! /** Pure method to extract package ! \return 1 if ok ! \sa Extract() ! \sa localPackageAbsoluteDirectory() */ ! virtual int extract(int _force = 0) = 0; ! ! /** Indicates if the package needs patching ! * Must be overloaded if so. Returns 0 by default. ! * \return 0 by default, 1 if patch is needed. ! * \sa patch() ! * \sa Patch() ! */ ! virtual int hasPatch(void); ! ! /** Method to patch package ! * Must be overloaded to patch package. ! * \sa Patch() */ ! virtual int patch(int _force = 0); ! ! /** Method to test package. ! * Must be overloaded to test package using a method provided by package ! * maintainers. ! * \sa Test() */ ! virtual int test(int _force = 0); ! ! /** Pure virtual method to pre-configure package ! * Pre-configuration creates any needed elements (files or what ever) to benchmark ! * package. ! * \return 1 if ok. ! * \sa PreConfigure() ! */ ! virtual int preConfigure(int _force) = 0; ! ! /** Pure virtual method to configure package ! * Broadly speaking, this is ./configure ! * \sa Configure() ! * \return 1 if ok */ ! virtual int configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) = 0; ! /** Pure virtual method to build package ! * This could be a simple make, for instance. ! * \return 1 if ok ! * \sa Make() */ ! virtual int make(void) = 0; /** Pure virtual method to run benchmark --- 30,46 ---- { public: ! class CBMPackage *Package(void); private: protected: ! class CBMPackage *package; /** Constructor * Initialise the CBMBenchmark::system variable. */ ! CBMBenchmark(class CBMPackage *_package); ! /** Give object for underlaying system. ! Use package pointer. ! \sa package ! */ ! virtual CBMSystem *System(void); /** Pure virtual method to run benchmark *************** *** 133,202 **** virtual std::string bench(void) = 0; - /** Pure virtual method to clean-up sources - * Useful bettween two Make() to get all sources compiled with same environment. - * \sa Release() - * \sa Configure() - * \sa Make() */ - virtual int release(void) = 0; - - /** Uninstall benchmark - * Removes information used by CompBenchmarks as well as any downloaded, extracted - * or built element. Default behaviour should be ok in most case. - * \return 1 if ok. */ - virtual int uninstall(void); - - /** Stores benchmark status - * Probably internal usage only. - * \return 1 if ok - * \sa readStatus() - */ - virtual int storeStatus(Status _status); - - /** Gets a context ID - * Give an unique ID according to compiler and options used. This can avoid useless - * recompilations. - * \return ID (MD5) as std::string - * \sa Make() - * \sa storeContext() - * \sa ContextMatches() - */ - virtual std::string contextID(CBMCompiler *_currentCompiler, - CBMCompilerOptions *_currentOptions); - - /** Stores (compilation) context ID - * Stores the context ID for the current benchmark. - * \sa contextID() - * \sa ContextMatches() - * \return 1 if ok - */ - virtual int storeContext(CBMCompiler *_currentCompiler, - CBMCompilerOptions *_currentOptions); public: - - /** Package name - * \return a std::string like 'gzip', without quotes */ - virtual std::string packageName(void); - - /** Package version - * \return a std::string like '1.2.4', without quotes */ - virtual std::string packageVersion(void) = 0; - - /** Package size, in bytes - * \return an integer coding the size of package's archive (to download) in bytes. - */ - virtual int packageSize(void) = 0; - - /** Package comments - * Gives comments about package. Short description, or what ever. - * \return comments, as std::string - */ - virtual std::string packageComments(void) = 0; - - /** Package local filename - * \return a relative filename containing the local name of the uncompressed - * package (like 'gzip-1.2.4.tar.Z', without quotes) */ - virtual std::string localPackageName(void) = 0; - - /** Benchmark name \return a std::string representing current benchmark's identification --- 49,53 ---- *************** *** 208,356 **** virtual std::string benchmarkComments(void) = 0; ! /** Benchmark's language ! * \return std::string (C or C++) */ ! virtual std::string language(void) = 0; ! ! /** Returns package or benchmark license ! \return a std::string describing license */ ! virtual std::string license(void) = 0; ! ! /** Returns package home page ! \return URL in std::string */ ! virtual std::string homePage(void) = 0; ! ! /** Author(s) of package ! \return std::string containing authors. */ ! virtual std::string author(void) = 0; ! ! /** Convenience method ! * \return local uncompressed absolute archive filename for benchmark. ! * \sa localPackageName() */ ! virtual std::string localPackageAbsoluteName(void); ! /** Convenience method ! * \return directory used for extracting package ! * \sa CBMSystem::Extract */ ! virtual std::string localPackageAbsoluteDirectory(void); ! ! /** Relative directory to extract package ! * \return relative directory to use (or used, depending) for package extraction ! * \sa CBMSystem::Extract */ ! virtual char* extractDirectory(void) = 0; ! ! /** Indicates if the package provides a test method. ! * Must be overloaded if so. Returns 0 by default. ! * \return 0 by default, 1 if patch is needed. ! * \sa test() ! * \sa Test() ! */ ! virtual int hasTest(void); ! ! /** URL used for downloading package. ! * \return std::string representing the URL of the package ! * \sa expectedMD5() */ ! virtual std::string downloadURL(void) = 0; ! ! ! /** Display informations about benchmark ! Used by compbenchmark-config. Format is strict, default behaviour must be ! kept. */ ! virtual void display(void); ! /** Total size of benchmark ! * \return Total size, in bytes, of the benchmark/package. This comprises data used ! * in pre-configuration step. ! * \sa preConfigure() ! * \sa packageSize() */ ! virtual int benchmarkSize(void) = 0; ! ! /** Compairs previous compilation context to current one ! * \return 1 if they match. ! * \sa contextID() ! * \sa storeContext() ! * \sa Make() ! */ ! virtual int ContextMatches(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); ! /** Download package. ! * Gets downloadURL() object from Internet and verify checksum. ! * Uses download(). Overloading is unadvised. ! * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Downloaded. ! * \param _force sets to 1 to force operation. May changes status. ! * \return 1 if ok. ! * \sa status */ ! virtual int Download(int _force = 0); ! ! /** Extract package. ! * Extracts downloaded package. ! * Uses extract(). Overloading is unadvised. ! * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Extracted. ! * \param _force sets to 1 to force operation. May changes status. ! * \return 1 if ok. ! * \sa Download() ! * \sa status */ ! virtual int Extract(int _force = 0); ! ! /** Patch package. ! * Patches extracted package. ! * Overloading is unadvised, 1 is returned without any action, by default. ! * If hasPatch() returns 1, uses patch(). ! * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Patched. ! * \param _force sets to 1 to force operation. May changes status. ! * \return 1 if ok. ! * \sa Extract() ! * \sa status */ ! virtual int Patch(int _force = 0); ! ! /** Preconfigure package. ! * Preconfigure downloaded package. ! * Uses preConfigure(). Overloading is unadvised. ! * This step won't be done and'll return 1 if ! * getStatus()>=CBMPackage::PreConfigured. May changes status. ! * \param _force sets to 1 to force operation. ! * \return 1 if ok. ! * \sa Patch() ! * \sa status */ ! virtual int PreConfigure(int _force = 0); ! ! /** Configure package. ! * Configure downloaded package. ! * Uses configure(). Overloading is unadvised. Argument are used to keep ! * compiler and options used for current bench (context), even ! * if ./configure script is not present : they'll be used by Make(). ! * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Configured. May changes status. ! * \return 1 if ok. ! * \sa Download() ! * \sa Release() ! * \sa ContextMatches() ! * \sa Make(). ! * \sa status */ ! virtual int Configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions); ! ! ! /** Build package. ! * Builds package. ! * Uses make(). Overloading is unadvised. ! * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Made. ! * \param _force sets to 1 to force operation. May changes status. ! * \return 1 if ok. May changes status. ! * \sa Configure() ! * \sa Release() ! * \sa status ! * \sa ContextMatches() */ ! virtual int Make(int _force = 0); ! ! /** Test a package. ! * Test a built package. ! * Overloading is unadvised, 1 is returned without any action, by default. ! * If hasPatch() returns 1, uses patch(). ! * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Benchmarked. ! * \param _force sets to 1 to force operation. May changes status. ! * \return 1 if ok. ! * \sa Make() ! * \sa status */ ! virtual int Test(int _force = 0); ! ! ! /** Run benchmarks. * Uses bench(). Overloading is unadvised. * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Benchmarked. --- 59,63 ---- virtual std::string benchmarkComments(void) = 0; ! /** Run benchmark. * Uses bench(). Overloading is unadvised. * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Benchmarked. *************** *** 360,411 **** virtual std::string Bench(void); - /** Clean objects. - * Uses release(). Overloading is unadvised. - * This step won't be done and'll return 0 if getStatus()<CBMPackage::Made. May changes status. - * \return 1 if ok. - * \sa Bench() */ - virtual int Release(void); - - /** Install package. - * Installs package, uses, in that order Download(), Extract(), Patch() (if needed) - * and PreConfigure(). Overloading is unadvised. - * This step won't be done and'll return 1 if getStatus()>=CBMPackage::PreConfigured. - * \param _force assign to 1 for forcing operation. - * \return 1 if ok. May changes status. - * \sa status */ - virtual int Install(int _force = 0); - - /** Copy a local archive. - * Copy package to directory defined by CBMSystem::Download. It'll be ready - * to be extracted using Install(). - * \param _source the archive file - * \param _force assign to 1 for forcing operation. - * \return 1 if ok. May changes status. - * \sa status - * \sa extract */ - virtual int Fetch(char *_source, int _force = 0); - - /** Uninstall package. - * Uses uninstall(). Overloading is unadvised. - * This step won't be done and'll return 1 if getStatus()==CBMPackage::Unknown. - * \return 1 if ok. May changes status. - * \sa status */ - virtual int Uninstall(void); - - /** Returns benchmark's status - * \return status (enum). - * \sa CBMBenchmark::Status */ - virtual Status getStatus(void); - /** Virtual destructor */ virtual ~CBMBenchmark(); - }; ! #define lib_declare() \ ! extern "C" int cbmlib_getBenchmarkNumber(void); \ ! extern "C" CBMBenchmark *cbmlib_getBenchmark(int idx, class CBMSystem *_system); \ ! extern "C" CBMBenchmark *cbmlib_getBenchmarkByName(char *bench_id, class CBMSystem *_system); \ ! extern "C" std::vector<std::string> cbmlib_getBenchmarks(void) #endif --- 67,80 ---- virtual std::string Bench(void); /** Virtual destructor */ virtual ~CBMBenchmark(); }; ! #define DLdeclare() \ ! extern "C" CBMPackage *cbmlib_getPackage(void) ! ! #define DLPackageWrapper_declare() \ ! BenchmarkVector& Benchmarks(void); \ ! CBMBenchmark *Benchmark(std::string bid) #endif Index: Benchmark.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Benchmark.cpp 28 Dec 2006 13:19:47 -0000 1.17 --- Benchmark.cpp 3 Jan 2007 21:58:38 -0000 1.18 *************** *** 1,485 **** #include <Benchmark/Benchmark.h> ! ! #include <System/System.h> ! #include <UI/UI.h> #include <cloptions.h> ! #include <config.h> ! ! #include <fstream> ! #include <iostream> ! #include <string> ! ! CBMBenchmark::CBMBenchmark(CBMSystem *_system) ! { ! system=_system; ! status=Unknown; ! currentCompiler=0; ! currentOptions=0; ! } ! ! std::string CBMBenchmark::packageName(void) ! { ! return(""); ! } ! ! int CBMBenchmark::readStatus(void) ! { ! char s; ! std::string r; ! std::string id; ! ! id="bm-status-"; ! id+=packageName(); ! ! ! r=system->read((char*) id.c_str()); ! ! if (r!="") { ! s=r.c_str()[0]; ! status=(Status) ((int) s - (int) '0'); ! return(1); ! } else { ! /* !!! */ ! return(0); ! } ! } ! ! int CBMBenchmark::resetContext(void) ! { ! std::string contextFile; ! ! contextFile=system->temporaryDirectory(CBMSystem::Status); ! contextFile+="/"; ! ! contextFile+="bm-context-"; ! contextFile+=packageName(); ! ! return(system->unlink(contextFile)); ! } ! ! std::string CBMBenchmark::localPackageAbsoluteName(void) ! { ! std::string localFile = system->temporaryDirectory(CBMSystem::Download); ! ! localFile+="/"; ! localFile+=localPackageName(); ! ! return(localFile); ! } ! ! std::string CBMBenchmark::localPackageAbsoluteDirectory(void) ! { ! std::string cmd; ! ! cmd+=system->temporaryDirectory(CBMSystem::Extract); ! cmd+="/"; ! cmd+=extractDirectory(); ! ! return(cmd); ! } ! ! int CBMBenchmark::hasPatch(void) ! { ! return(0); ! } ! ! int CBMBenchmark::patch(int _force) ! { ! return(1); ! } ! ! int CBMBenchmark::hasTest(void) ! { ! return(0); ! } ! ! int CBMBenchmark::test(int _force) ! { ! return(1); ! } ! ! ! int CBMBenchmark::uninstall(void) ! { ! std::string where = localPackageAbsoluteDirectory(); ! std::string cmd; ! cmd+=CBM_PROG_RM; ! cmd+=" -rf "; ! std::string sstdout; ! ! cmd+=where; ! ! return(system->exec(cmd, sstdout)==0); ! ! } ! ! int CBMBenchmark::storeStatus(Status _status) ! { ! int r; ! char c[16] = { 0 }; ! std::string tmp; ! std::string id; ! ! id="bm-status-"; ! id+=packageName(); ! ! sprintf(c, "%d", (int) _status); ! tmp=c; ! r=system->store((char*) id.c_str(), ! tmp); ! ! status=_status; ! return(r); ! } ! ! std::string CBMBenchmark::contextID(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) ! { ! std::string what = _currentCompiler->Binary(); ! what+="\n"; ! what+=_currentOptions->Options(); ! return(what); ! } ! ! int CBMBenchmark::storeContext(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) ! { ! std::string context = contextID(_currentCompiler, ! _currentOptions); ! std::string id; ! int r; ! ! id="bm-context-"; ! id+=packageName(); ! ! r=system->store((char*) id.c_str(), ! context); ! ! return(r); ! } ! ! int CBMBenchmark::ContextMatches(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) ! { ! std::string previousContext; ! std::string context; ! std::string id; ! ! id="bm-context-"; ! id+=packageName(); ! ! previousContext=system->read((char*) id.c_str()); ! context=contextID(_currentCompiler, ! _currentOptions); ! ! if (context==previousContext) { ! currentCompiler=_currentCompiler; ! currentOptions=_currentOptions; ! return(1); ! } else { ! return(0); ! } ! } ! ! void CBMBenchmark::display(void) ! { ! std::cout << "package::Name=" << packageName() << std::endl ! << "package::Url=" << downloadURL() << std::endl ! << "package::Size=" << packageSize() << std::endl ! << "package::Version=" << packageVersion() << std::endl ! << "package::Comments=" << packageComments() << std::endl ! << "package::License=" << license() << std::endl ! << "package::Homepage=" << homePage() << std::endl ! << "package::Author=" << author() << std::endl << std::endl ! << "benchmark::Name=" << benchmarkName() << std::endl ! << "benchmark::Package=" << packageName() << std::endl ! << "benchmark::Language=" << language() << std::endl ! << "benchmark::Size=" << benchmarkSize() << std::endl ! << "benchmark::Status=" << getStatus() << std::endl ! << "benchmark::Comments=" << benchmarkComments() << std::endl ! << std::endl; ! } ! ! int CBMBenchmark::Download(int _force) ! { ! std::string localFile = localPackageAbsoluteName(); ! std::string expected_md5; ! std::string md5; ! std::string info; ! ! if ((!_force) && ! (getStatus()>=Downloaded)) { ! return(1); ! } ! ! info=packageName(); ! info+=" "; ! info+=packageVersion(); ! ! UI->Information(CBMUI::BenchDownload, ! info); ! ! try { ! system->download(downloadURL(), ! (char*) localFile.c_str()); ! } ! ! catch (...) { ! } ! ! if (cbmSystem->fileExists(localFile)) { ! expected_md5=expectedMD5(); ! md5=system->md5File(localFile); ! ! if (expected_md5==md5) { ! UI->Information(CBMUI::ChecksumOK, ! localFile); ! ! storeStatus(Downloaded); ! return(1); ! } else { ! UI->Information(CBMUI::ChecksumFailed, ! localFile); ! ! system->unlink((char*) localFile.c_str()); ! info="Unsuccesfull download "; ! info+=downloadURL(); ! info+=" to "; ! info+=localFile; ! UI->Fatal(info); ! return(0); ! } ! } else { ! info="Can't download "; ! info+=downloadURL(); ! info+=" to "; ! info+=localFile; ! UI->Fatal(info); ! ! system->unlink((char*) localFile.c_str()); ! } ! return(0); ! } ! ! int CBMBenchmark::Extract(int _force) ! { ! int r; ! ! if ((!_force) && ! (getStatus()>=Extracted)) { ! return(1); ! } ! ! UI->Information(CBMUI::BenchExtract, ! packageName()); ! ! r=extract(_force); ! ! if (r) ! storeStatus(Extracted); ! else { ! std::string info; ! info="Error extracting "; ! info+=localPackageAbsoluteName(); ! info+=" into "; ! info+=system->temporaryDirectory(CBMSystem::Extract); ! UI->Fatal(info); ! } ! ! return(r); ! } ! ! int CBMBenchmark::Patch(int _force) ! { ! int r; ! ! if (!hasPatch()) ! return(1); ! ! if ((!_force) && ! (getStatus()>=Patched)) { ! return(1); ! } ! ! UI->Information(CBMUI::BenchPatch, ! packageName()); ! ! r=patch(_force); ! ! if (r) ! storeStatus(Patched); ! else { ! std::string info; ! info="Error patching "; ! info+=localPackageAbsoluteName(); ! UI->Fatal(info); ! } ! ! return(r); ! } ! ! int CBMBenchmark::PreConfigure(int _force) ! { ! int r; ! ! if ((!_force) && (getStatus()>=Preconfigured)) { ! return(1); ! } ! if ( ((!hasPatch()) && (getStatus()<Extracted)) || ! ((hasPatch()) && (getStatus()<Patched)) ) { ! return(0); ! } ! ! ! UI->Information(CBMUI::BenchPreconfigure, ! packageName()); ! ! r=preConfigure(_force); ! ! if (r) ! storeStatus(Preconfigured); ! else { ! std::string info; ! ! info="Error in "; ! info+=packageName(); ! info+="'s pre-configuration"; ! UI->Fatal(info); ! } ! return(r); ! } ! ! int CBMBenchmark::Configure(CBMCompiler *_currentCompiler, ! CBMCompilerOptions *_currentOptions) { ! int r; ! std::string info; ! ! if (getStatus()>=Configured) { ! currentCompiler=_currentCompiler; ! currentOptions=_currentOptions; ! return(1); ! } ! ! info=packageName(); ! info+=" with compiler "; ! info+=_currentCompiler->Binary(); ! if (_currentOptions->Options()=="") { ! info+=" without options"; ! } else { ! info+=" and options "; ! info+=_currentOptions->Options(); ! } ! ! if (language()!=_currentCompiler->language()) { ! ! storeContext(_currentCompiler, ! _currentOptions); ! info=_currentCompiler->Binary(); ! info+=" is a "; ! info+=_currentCompiler->language(); ! info+=" compiler, while benchmark is written is "; ! info+=language(); ! info+="."; ! UI->Fatal(info); ! } ! ! UI->Information(CBMUI::BenchConfigure, ! info); ! ! r=configure(_currentCompiler, ! _currentOptions); ! ! if (r) { ! storeStatus(Configured); ! currentCompiler=_currentCompiler; ! currentOptions=_currentOptions; ! } else { ! info="Configure failed for "; ! info+=packageName(); ! UI->Fatal(info); ! } ! ! return(r); } ! int CBMBenchmark::Make(int _force) { ! int r; ! std::string info; ! time_t beg; ! time_t end; ! ! if ((getStatus()>=Made) && (!_force)) { ! return(1); ! } ! ! UI->Information(CBMUI::BenchMake, ! packageName()); ! ! beg=system->Time(); ! r=make(); ! if (r) { ! end=system->Time(); ! std::cout << "Build time : " << (double) (end-beg) << std::endl; ! storeStatus(Made); ! storeContext(currentCompiler, ! currentOptions); ! } else { ! info="Make failed for "; ! info+=packageName(); ! UI->Fatal(info); ! ! } ! ! return(r); } ! int CBMBenchmark::Test(int _force) { ! int r; ! std::string dum; ! ! if (!hasTest()) ! return(1); ! ! if (getStatus()<Configured) { ! UI->Fatal("Package is not configured"); ! } ! ! if ((!_force) && ! (getStatus()>=Benchmarked)) { ! return(1); ! } ! ! if (getStatus()<Made) { return(0); - } - - if (UO_enableTestSuite) { - UI->Information(CBMUI::BenchTest, - packageName()); - - r=test(_force); - } else { - dum=packageName(); - dum+=" : passed (disabled by user option)."; - UI->Information(CBMUI::BenchTest, - dum); - r=1; - } - - if (r) - storeStatus(Tested); - else { - std::string info; - info="Error testing "; - info+=localPackageAbsoluteName(); - UI->Fatal(info); - } - - return(r); } --- 1,24 ---- #include <Benchmark/Benchmark.h> ! #include <Benchmark/Package.h> #include <cloptions.h> + #include <UI/UI.h> ! CBMBenchmark::CBMBenchmark(CBMPackage *_package) { ! package=_package; } ! CBMPackage *CBMBenchmark::Package(void) { ! return(package); } ! CBMSystem *CBMBenchmark::System(void) { ! if (package) ! return(package->System()); ! else return(0); } *************** *** 490,494 **** ! if (((getStatus()<Tested) && (hasTest())) && (UO_enableTestSuite)) { info=benchmarkName(); --- 29,33 ---- ! if (((Package()->getStatus()<CBMPackage::Tested) && (Package()->hasTest())) && (UO_enableTestSuite)) { info=benchmarkName(); *************** *** 504,516 **** r=bench(); ! system->Chomp(r); if (r!="0") { ! storeStatus(Benchmarked); UI->Information(CBMUI::BenchResult, r); } else { info="Benchmarking failed for "; ! info+=packageName(); UI->Fatal(info); } --- 43,55 ---- r=bench(); ! Package()->System()->Chomp(r); if (r!="0") { ! Package()->storeStatus(CBMPackage::Benchmarked); UI->Information(CBMUI::BenchResult, r); } else { info="Benchmarking failed for "; ! info+=Package()->packageName(); UI->Fatal(info); } *************** *** 519,649 **** } - int CBMBenchmark::Release(void) - { - int r; - std::string info; - - if (getStatus()<Configured) { - return(0); - } - - UI->Information(CBMUI::BenchClean, - packageName()); - - - r=release(); - if (r) { - resetContext(); - storeStatus(Preconfigured); - } else { - info="Clean failed for "; - info+=packageName(); - /* UI->Fatal(info); */ - } - - return(r); - } - - int CBMBenchmark::Install(int _force) - { - int r; - - if (downloadURL()=="") { - UI->Fatal("Package is not known to be hosted anymore on the Internet. Use --fetch option."); - } - - resetContext(); - - r=Download(_force); - if (!r) - return(0); - - r=Extract(_force); - if (!r) - return(0); - - if (hasPatch()) { - r=Patch(); - if (!r) - return(0); - } - - r=PreConfigure(_force); - return(r); - } - - int CBMBenchmark::Fetch(char *_source, int _force) - { - std::string dest = localPackageAbsoluteName(); - std::string source = _source; - std::string expected_md5; - std::string md5; - - if ((getStatus()>=Downloaded) && (!_force)) { - return(1); - } - - if (dest!=source) { - cbmSystem->copy(source, dest); - } - - if (cbmSystem->fileExists(dest)) { - expected_md5=expectedMD5(); - md5=system->md5File(dest); - - if (expected_md5==md5) { - UI->Information(CBMUI::ChecksumOK, - dest); - - storeStatus(Downloaded); - return(1); - } else { - UI->Information(CBMUI::ChecksumFailed, - dest); - } - } - - return(0); - } - - int CBMBenchmark::Uninstall(void) - { - std::string statusFile; - int r; - - UI->Information(CBMUI::BenchUninstall, - packageName()); - - statusFile=system->temporaryDirectory(CBMSystem::Status); - statusFile+="/"; - statusFile+="bm-status-"; - statusFile+=packageName(); - - - if (getStatus()!=Unknown) { - system->unlink(localPackageAbsoluteName().c_str()); - system->unlink(statusFile.c_str()); - resetContext(); - r=uninstall(); - storeStatus(Unknown); - currentCompiler=0; - currentOptions=0; - return(r); - } else - return(0); - } - - CBMBenchmark::Status CBMBenchmark::getStatus(void) - { - // Status result = Unknown; - std::string localFile = localPackageAbsoluteName(); - - if (status==Unknown) { - readStatus(); - return(status); - } else - return(status); - } - CBMBenchmark::~CBMBenchmark() { --- 58,61 ---- |
From: Frederic T. <xf...@us...> - 2007-01-03 21:58:07
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21407 Modified Files: Benchmark-Autotools.cpp Benchmark-Autotools.h Log Message: CBMPackage and new related API used. Index: Benchmark-Autotools.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-Autotools.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Benchmark-Autotools.cpp 1 Nov 2006 12:59:04 -0000 1.4 --- Benchmark-Autotools.cpp 3 Jan 2007 21:58:02 -0000 1.5 *************** *** 6,15 **** #include <fstream> ! CBMBenchmarkAutotools::CBMBenchmarkAutotools(CBMSystem *_system) ! : CBMBenchmark(_system) { } ! int CBMBenchmarkAutotools::extract(int _force) { std::string localFile = localPackageAbsoluteName(); --- 6,15 ---- #include <fstream> ! CBMPackageAutotools::CBMPackageAutotools(CBMSystem *_system) ! : CBMPackage(_system) { } ! int CBMPackageAutotools::extract(int _force) { std::string localFile = localPackageAbsoluteName(); *************** *** 30,34 **** } ! int CBMBenchmarkAutotools::configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) --- 30,34 ---- } ! int CBMPackageAutotools::configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) *************** *** 72,76 **** } ! int CBMBenchmarkAutotools::make(void) { std::string cmd; --- 72,76 ---- } ! int CBMPackageAutotools::make(void) { std::string cmd; *************** *** 86,90 **** } ! int CBMBenchmarkAutotools::release(void) { std::string cmd; --- 86,90 ---- } ! int CBMPackageAutotools::release(void) { std::string cmd; *************** *** 100,104 **** } ! CBMBenchmarkAutotools::~CBMBenchmarkAutotools() { } --- 100,104 ---- } ! CBMPackageAutotools::~CBMPackageAutotools() { } Index: Benchmark-Autotools.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-Autotools.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Benchmark-Autotools.h 1 Nov 2006 12:59:04 -0000 1.4 --- Benchmark-Autotools.h 3 Jan 2007 21:58:02 -0000 1.5 *************** *** 10,23 **** #define H_CBMBENCHMARKAUTOTOOLS #include <Benchmark/Benchmark.h> ! ! /** \brief Defines an abstract benchmark based on autotools. * ! * This class can be overloaded in order to get new external benchmarks and packages ! * supported by CompBenchmarks. Basically it sets up packages (like gzip) using ! * GNU autotools (./configure, make). */ ! class CBMBenchmarkAutotools : public CBMBenchmark { private: --- 10,23 ---- #define H_CBMBENCHMARKAUTOTOOLS + #include <Benchmark/Package.h> #include <Benchmark/Benchmark.h> ! /** \brief Defines an abstract package based on autotools. * ! * This class can be overloaded in order to get new external packages ! * supported by CompBenchmarks. Basically it sets up packages (like gzip) ! * using GNU autotools (./configure, make). */ ! class CBMPackageAutotools : public CBMPackage { private: *************** *** 51,60 **** virtual int release(void); - public: /** Constructor */ ! CBMBenchmarkAutotools(class CBMSystem *_system); /** Virtual destructor */ ! virtual ~CBMBenchmarkAutotools(); }; --- 51,59 ---- virtual int release(void); /** Constructor */ ! CBMPackageAutotools(class CBMSystem *_system); /** Virtual destructor */ ! virtual ~CBMPackageAutotools(); }; |
From: Frederic T. <xf...@us...> - 2007-01-03 21:57:35
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21385 Added Files: Package.cpp Package.h Log Message: First import. --- NEW FILE: Package.cpp --- #include <Benchmark/Package.h> #include <Benchmark/Benchmark.h> #include <Benchmark/Benchmark-DLLoader.h> #include <System/System.h> #include <UI/UI.h> #include <cloptions.h> #include <config.h> #include <fstream> #include <iostream> #include <string> CBMPackage::CBMPackage(CBMSystem *_system) { system=_system; status=Unknown; currentCompiler=0; currentOptions=0; } BenchmarkVector& CBMPackage::Benchmarks(void) { return(benchmarks); } CBMBenchmark *CBMPackage::Benchmark(std::string bid) { return(0); } CBMSystem *CBMPackage::System(void) { return(system); } std::string CBMPackage::packageName(void) { return(""); } int CBMPackage::readStatus(void) { char s; std::string r; std::string id; id="bm-status-"; id+=packageName(); r=system->read((char*) id.c_str()); if (r!="") { s=r.c_str()[0]; status=(Status) ((int) s - (int) '0'); return(1); } else { /* !!! */ return(0); } } int CBMPackage::resetContext(void) { std::string contextFile; contextFile=system->temporaryDirectory(CBMSystem::Status); contextFile+="/"; contextFile+="bm-context-"; contextFile+=packageName(); return(system->unlink(contextFile)); } std::string CBMPackage::localPackageAbsoluteName(void) { std::string localFile = system->temporaryDirectory(CBMSystem::Download); localFile+="/"; localFile+=localPackageName(); return(localFile); } std::string CBMPackage::localPackageAbsoluteDirectory(void) { std::string cmd; cmd+=system->temporaryDirectory(CBMSystem::Extract); cmd+="/"; cmd+=extractDirectory(); return(cmd); } int CBMPackage::hasPatch(void) { return(0); } int CBMPackage::patch(int _force) { return(1); } int CBMPackage::hasTest(void) { return(0); } int CBMPackage::test(int _force) { return(1); } int CBMPackage::uninstall(void) { std::string where = localPackageAbsoluteDirectory(); std::string cmd; cmd+=CBM_PROG_RM; cmd+=" -rf "; std::string sstdout; cmd+=where; return(system->exec(cmd, sstdout)==0); } int CBMPackage::storeStatus(Status _status) { int r; char c[16] = { 0 }; std::string tmp; std::string id; id="bm-status-"; id+=packageName(); sprintf(c, "%d", (int) _status); tmp=c; r=system->store((char*) id.c_str(), tmp); status=_status; return(r); } std::string CBMPackage::contextID(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { std::string what = _currentCompiler->Binary(); what+="\n"; what+=_currentOptions->Options(); return(what); } int CBMPackage::storeContext(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { std::string context = contextID(_currentCompiler, _currentOptions); std::string id; int r; id="bm-context-"; id+=packageName(); r=system->store((char*) id.c_str(), context); return(r); } int CBMPackage::ContextMatches(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { std::string previousContext; std::string context; std::string id; id="bm-context-"; id+=packageName(); previousContext=system->read((char*) id.c_str()); context=contextID(_currentCompiler, _currentOptions); if (context==previousContext) { currentCompiler=_currentCompiler; currentOptions=_currentOptions; return(1); } else { return(0); } } int CBMPackage::Download(int _force) { std::string localFile = localPackageAbsoluteName(); std::string expected_md5; std::string md5; std::string info; if ((!_force) && (getStatus()>=Downloaded)) { return(1); } info=packageName(); info+=" "; info+=packageVersion(); UI->Information(CBMUI::BenchDownload, info); try { system->download(downloadURL(), (char*) localFile.c_str()); } catch (...) { } if (cbmSystem->fileExists(localFile)) { expected_md5=expectedMD5(); md5=system->md5File(localFile); if (expected_md5==md5) { UI->Information(CBMUI::ChecksumOK, localFile); storeStatus(Downloaded); return(1); } else { UI->Information(CBMUI::ChecksumFailed, localFile); system->unlink((char*) localFile.c_str()); info="Unsuccesfull download "; info+=downloadURL(); info+=" to "; info+=localFile; UI->Fatal(info); return(0); } } else { info="Can't download "; info+=downloadURL(); info+=" to "; info+=localFile; UI->Fatal(info); system->unlink((char*) localFile.c_str()); } return(0); } int CBMPackage::Extract(int _force) { int r; if ((!_force) && (getStatus()>=Extracted)) { return(1); } UI->Information(CBMUI::BenchExtract, packageName()); r=extract(_force); if (r) storeStatus(Extracted); else { std::string info; info="Error extracting "; info+=localPackageAbsoluteName(); info+=" into "; info+=system->temporaryDirectory(CBMSystem::Extract); UI->Fatal(info); } return(r); } int CBMPackage::Patch(int _force) { int r; if (!hasPatch()) return(1); if ((!_force) && (getStatus()>=Patched)) { return(1); } UI->Information(CBMUI::BenchPatch, packageName()); r=patch(_force); if (r) storeStatus(Patched); else { std::string info; info="Error patching "; info+=localPackageAbsoluteName(); UI->Fatal(info); } return(r); } int CBMPackage::PreConfigure(int _force) { int r; if ((!_force) && (getStatus()>=Preconfigured)) { return(1); } if ( ((!hasPatch()) && (getStatus()<Extracted)) || ((hasPatch()) && (getStatus()<Patched)) ) { return(0); } UI->Information(CBMUI::BenchPreconfigure, packageName()); r=preConfigure(_force); if (r) storeStatus(Preconfigured); else { std::string info; info="Error in "; info+=packageName(); info+="'s pre-configuration"; UI->Fatal(info); } return(r); } int CBMPackage::Configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { int r; std::string info; if (getStatus()>=Configured) { currentCompiler=_currentCompiler; currentOptions=_currentOptions; return(1); } info=packageName(); info+=" with compiler "; info+=_currentCompiler->Binary(); if (_currentOptions->Options()=="") { info+=" without options"; } else { info+=" and options "; info+=_currentOptions->Options(); } if (language()!=_currentCompiler->language()) { storeContext(_currentCompiler, _currentOptions); info=_currentCompiler->Binary(); info+=" is a "; info+=_currentCompiler->language(); info+=" compiler, while benchmark is written is "; info+=language(); info+="."; UI->Fatal(info); } UI->Information(CBMUI::BenchConfigure, info); r=configure(_currentCompiler, _currentOptions); if (r) { storeStatus(Configured); currentCompiler=_currentCompiler; currentOptions=_currentOptions; } else { info="Configure failed for "; info+=packageName(); UI->Fatal(info); } return(r); } int CBMPackage::Make(int _force) { int r; std::string info; time_t beg; time_t end; if ((getStatus()>=Made) && (!_force)) { return(1); } UI->Information(CBMUI::BenchMake, packageName()); beg=system->Time(); r=make(); if (r) { end=system->Time(); std::cout << "Build time : " << (double) (end-beg) << std::endl; storeStatus(Made); storeContext(currentCompiler, currentOptions); } else { info="Make failed for "; info+=packageName(); UI->Fatal(info); } return(r); } int CBMPackage::Test(int _force) { int r; std::string dum; if (!hasTest()) return(1); if (getStatus()<Configured) { UI->Fatal("Package is not configured"); } if ((!_force) && (getStatus()>=Benchmarked)) { return(1); } if (getStatus()<Made) { return(0); } if (UO_enableTestSuite) { UI->Information(CBMUI::BenchTest, packageName()); r=test(_force); } else { dum=packageName(); dum+=" : passed (disabled by user option)."; UI->Information(CBMUI::BenchTest, dum); r=1; } if (r) storeStatus(Tested); else { std::string info; info="Error testing "; info+=localPackageAbsoluteName(); UI->Fatal(info); } return(r); } int CBMPackage::Release(void) { int r; std::string info; if (getStatus()<Configured) { return(0); } UI->Information(CBMUI::BenchClean, packageName()); r=release(); if (r) { resetContext(); storeStatus(Preconfigured); } else { info="Clean failed for "; info+=packageName(); /* UI->Fatal(info); */ } return(r); } int CBMPackage::Install(int _force) { int r; if (downloadURL()=="") { UI->Fatal("Package is not known to be hosted anymore on the Internet. Use --fetch option."); } resetContext(); r=Download(_force); if (!r) return(0); r=Extract(_force); if (!r) return(0); if (hasPatch()) { r=Patch(); if (!r) return(0); } r=PreConfigure(_force); return(r); } int CBMPackage::Fetch(char *_source, int _force) { std::string dest = localPackageAbsoluteName(); std::string source = _source; std::string expected_md5; std::string md5; if ((getStatus()>=Downloaded) && (!_force)) { return(1); } if (dest!=source) { cbmSystem->copy(source, dest); } if (cbmSystem->fileExists(dest)) { expected_md5=expectedMD5(); md5=system->md5File(dest); if (expected_md5==md5) { UI->Information(CBMUI::ChecksumOK, dest); storeStatus(Downloaded); return(1); } else { UI->Information(CBMUI::ChecksumFailed, dest); } } return(0); } int CBMPackage::Uninstall(void) { std::string statusFile; int r; UI->Information(CBMUI::BenchUninstall, packageName()); statusFile=system->temporaryDirectory(CBMSystem::Status); statusFile+="/"; statusFile+="bm-status-"; statusFile+=packageName(); if (getStatus()!=Unknown) { system->unlink(localPackageAbsoluteName().c_str()); system->unlink(statusFile.c_str()); resetContext(); r=uninstall(); storeStatus(Unknown); currentCompiler=0; currentOptions=0; return(r); } else return(0); } CBMPackage::Status CBMPackage::getStatus(void) { // Status result = Unknown; std::string localFile = localPackageAbsoluteName(); if (status==Unknown) { readStatus(); return(status); } else return(status); } CBMPackage::~CBMPackage() { std::vector<CBMPackage*>::iterator it; if (PACKAGE_AUTOPURGE) { for(it=cbmlib_packages.begin(); it!=cbmlib_packages.end();) { if (*it == this) { cbmlib_packages.erase(it); break; } } } } --- NEW FILE: Package.h --- /* ---------------------------------------------------------------------------- $Id: Package.h,v 1.1 2007/01/03 21:57:31 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMPACKAGE #define H_CBMPACKAGE #include <Compiler/Compiler.h> #include <Compiler/Compiler-Options.h> #include <vector> class CBMSystem; /** Defines a vector of benchmarks. Basically owned by CBMPackage instance. */ typedef std::vector<std::string> BenchmarkVector; /** \brief Defines an abstract package. * * This class can be overloaded in order to get new external packages * supported by CompBenchmarks. Basically it sets up packages (like gzip), * and prepares related benchmarks for evaluation. * * \sa CBMBenchmark */ class CBMPackage { public: /** Package status * Defines typedef used to code internal status of a given package */ typedef enum Status { Unknown, /*!< Unkown; benchmark/package probably * not yet installed */ Downloaded, /*!< Package has been downloaded and checksum * is Ok. */ Extracted, /*!< Package has been successfuly extracted */ Patched, /*!< Package has been patched (optional step) */ Preconfigured, /*!< Package is now preconfigured. Also * optionnal, but each package goes throught * that step */ Configured, /*!< Package is configured (./configure) */ Made, /*!< Package has been made (make) */ Tested, /*!< Package has been tested */ Benchmarked }; /*!< Benchmarked */ private: /** Package status * \sa CBMBenchmark::Status * \sa storeStatus() * \sa getStatus() * \sa readStatus() */ Status status; /** Expected MD5 on downloaded package * \return MD5 expected, as an std::string */ virtual std::string expectedMD5(void) = 0; /** Package's status * Initialise the status from file in the directory defined * by CBMSystem::Status. * * \sa CBMBenchmark::Status * \return 1 if ok. */ virtual int readStatus(void); /** Remove context. * \sa storeContext() */ virtual int resetContext(void); protected: /** \sa Benchmarks() */ BenchmarkVector benchmarks; /** Stores current compiler. */ CBMCompiler *currentCompiler; /** Stores current (compiler) options. */ CBMCompilerOptions *currentOptions; /** System used */ class CBMSystem *system; /** Constructor * Initialise the CBMPackage::system variable. */ CBMPackage(class CBMSystem *_system); /** Pure method to extract package \return 1 if ok \sa Extract() \sa localPackageAbsoluteDirectory() */ virtual int extract(int _force = 0) = 0; /** Indicates if the package needs patching * Must be overloaded if so. Returns 0 by default. * \return 0 by default, 1 if patch is needed. * \sa patch() * \sa Patch() */ virtual int hasPatch(void); /** Method to patch package * Must be overloaded to patch package. * \sa Patch() */ virtual int patch(int _force = 0); /** Method to test package. * Must be overloaded to test package using a method provided by package * maintainers. * \sa Test() */ virtual int test(int _force = 0); /** Pure virtual method to pre-configure package * Pre-configuration creates any needed elements (files or what ever) to benchmark * package. * \return 1 if ok. * \sa PreConfigure() */ virtual int preConfigure(int _force) = 0; /** Pure virtual method to configure package * Broadly speaking, this is ./configure * \sa Configure() * \return 1 if ok */ virtual int configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) = 0; /** Pure virtual method to build package * This could be a simple make, for instance. * \return 1 if ok * \sa Make() */ virtual int make(void) = 0; /** Pure virtual method to clean-up sources * Useful bettween two Make() to get all sources compiled with same environment. * \sa Release() * \sa Configure() * \sa Make() */ virtual int release(void) = 0; /** Uninstall benchmark * Removes information used by CompBenchmarks as well as any downloaded, extracted * or built element. Default behaviour should be ok in most case. * \return 1 if ok. */ virtual int uninstall(void); /** Gets a context ID * Give an unique ID according to compiler and options used. This can avoid useless * recompilations. * \return ID (MD5) as std::string * \sa Make() * \sa storeContext() * \sa ContextMatches() */ virtual std::string contextID(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions); /** Stores (compilation) context ID * Stores the context ID for the current benchmark. * \sa contextID() * \sa ContextMatches() * \return 1 if ok */ virtual int storeContext(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions); public: /** Get system abstraction object \return CBMSystem */ virtual CBMSystem *System(void); /** Get all supported benchmarks. \return Array of std::string. */ BenchmarkVector& Benchmarks(void); /** Get a benchmark according to its identifier. \return References to a CBMBenchmark object */ class CBMBenchmark *Benchmark(std::string bid); /** Stores benchmark status * Probably internal usage only. * \return 1 if ok * \sa readStatus() */ virtual int storeStatus(Status _status); /** Package name * \return a std::string like 'gzip', without quotes */ virtual std::string packageName(void); /** Package version * \return a std::string like '1.2.4', without quotes */ virtual std::string packageVersion(void) = 0; /** Package size, in bytes * \return an integer coding the size of package's archive (to download) in bytes. */ virtual int packageSize(void) = 0; /** Package comments * Gives comments about package. Short description, or what ever. * \return comments, as std::string */ virtual std::string packageComments(void) = 0; /** Package local filename * \return a relative filename containing the local name of the uncompressed * package (like 'gzip-1.2.4.tar.Z', without quotes) */ virtual std::string localPackageName(void) = 0; /** Benchmark's language * \return std::string (C or C++) */ virtual std::string language(void) = 0; /** Returns package or benchmark license \return a std::string describing license */ virtual std::string license(void) = 0; /** Returns package home page \return URL in std::string */ virtual std::string homePage(void) = 0; /** Author(s) of package \return std::string containing authors. */ virtual std::string author(void) = 0; /** Convenience method * \return local uncompressed absolute archive filename for benchmark. * \sa localPackageName() */ virtual std::string localPackageAbsoluteName(void); /** Convenience method * \return directory used for extracting package * \sa CBMSystem::Extract */ virtual std::string localPackageAbsoluteDirectory(void); /** Relative directory to extract package * \return relative directory to use (or used, depending) for package extraction * \sa CBMSystem::Extract */ virtual char* extractDirectory(void) = 0; /** Indicates if the package provides a test method. * Must be overloaded if so. Returns 0 by default. * \return 0 by default, 1 if patch is needed. * \sa test() * \sa Test() */ virtual int hasTest(void); /** URL used for downloading package. * \return std::string representing the URL of the package * \sa expectedMD5() */ virtual std::string downloadURL(void) = 0; /** Total size of the package * \return Total size, in bytes, of thepackage. This comprises data used * in pre-configuration step. * \sa preConfigure() * \sa packageSize() */ virtual int benchmarkSize(void) = 0; /** Compairs previous compilation context to current one * \return 1 if they match. * \sa contextID() * \sa storeContext() * \sa Make() */ virtual int ContextMatches(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions); /** Download package. * Gets downloadURL() object from Internet and verify checksum. * Uses download(). Overloading is unadvised. * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Downloaded. * \param _force sets to 1 to force operation. May changes status. * \return 1 if ok. * \sa status */ virtual int Download(int _force = 0); /** Extract package. * Extracts downloaded package. * Uses extract(). Overloading is unadvised. * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Extracted. * \param _force sets to 1 to force operation. May changes status. * \return 1 if ok. * \sa Download() * \sa status */ virtual int Extract(int _force = 0); /** Patch package. * Patches extracted package. * Overloading is unadvised, 1 is returned without any action, by default. * If hasPatch() returns 1, uses patch(). * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Patched. * \param _force sets to 1 to force operation. May changes status. * \return 1 if ok. * \sa Extract() * \sa status */ virtual int Patch(int _force = 0); /** Preconfigure package. * Preconfigure downloaded package. * Uses preConfigure(). Overloading is unadvised. * This step won't be done and'll return 1 if * getStatus()>=CBMPackage::PreConfigured. May changes status. * \param _force sets to 1 to force operation. * \return 1 if ok. * \sa Patch() * \sa status */ virtual int PreConfigure(int _force = 0); /** Configure package. * Configure downloaded package. * Uses configure(). Overloading is unadvised. Argument are used to keep * compiler and options used for current bench (context), even * if ./configure script is not present : they'll be used by Make(). * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Configured. May changes status. * \return 1 if ok. * \sa Download() * \sa Release() * \sa ContextMatches() * \sa Make(). * \sa status */ virtual int Configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions); /** Build package. * Builds package. * Uses make(). Overloading is unadvised. * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Made. * \param _force sets to 1 to force operation. May changes status. * \return 1 if ok. May changes status. * \sa Configure() * \sa Release() * \sa status * \sa ContextMatches() */ virtual int Make(int _force = 0); /** Test a package. * Test a built package. * Overloading is unadvised, 1 is returned without any action, by default. * If hasPatch() returns 1, uses patch(). * This step won't be done and'll return 1 if getStatus()>=CBMPackage::Benchmarked. * \param _force sets to 1 to force operation. May changes status. * \return 1 if ok. * \sa Make() * \sa status */ virtual int Test(int _force = 0); /** Clean objects. * Uses release(). Overloading is unadvised. * This step won't be done and'll return 0 if getStatus()<CBMPackage::Made. May changes status. * \return 1 if ok. * \sa Bench() */ virtual int Release(void); /** Install package. * Installs package, uses, in that order Download(), Extract(), Patch() (if needed) * and PreConfigure(). Overloading is unadvised. * This step won't be done and'll return 1 if getStatus()>=CBMPackage::PreConfigured. * \param _force assign to 1 for forcing operation. * \return 1 if ok. May changes status. * \sa status */ virtual int Install(int _force = 0); /** Copy a local archive. * Copy package to directory defined by CBMSystem::Download. It'll be ready * to be extracted using Install(). * \param _source the archive file * \param _force assign to 1 for forcing operation. * \return 1 if ok. May changes status. * \sa status * \sa extract */ virtual int Fetch(char *_source, int _force = 0); /** Uninstall package. * Uses uninstall(). Overloading is unadvised. * This step won't be done and'll return 1 if getStatus()==CBMPackage::Unknown. * \return 1 if ok. May changes status. * \sa status */ virtual int Uninstall(void); /** Returns benchmark's status * \return status (enum). * \sa CBMBenchmark::Status */ virtual Status getStatus(void); /** Virtual destructor */ virtual ~CBMPackage(); }; #endif |
From: Frederic T. <xf...@us...> - 2007-01-03 21:57:07
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21197 Removed Files: benchmarks-genliblist.sh Log Message: Obsoleted (replaced by a Perl script). --- benchmarks-genliblist.sh DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-03 21:56:20
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20982 Removed Files: Benchmark-Selector.cpp Benchmark-Selector.h Log Message: Obsoleted. --- Benchmark-Selector.cpp DELETED --- --- Benchmark-Selector.h DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-03 20:05:26
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12133 Modified Files: Benchmark-LINPACKC.cpp Benchmark-LINPACKC.h Log Message: CBMPackage and new related API used. Index: Benchmark-LINPACKC.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-LINPACKC.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-LINPACKC.cpp 28 Dec 2006 17:41:03 -0000 1.1 --- Benchmark-LINPACKC.cpp 3 Jan 2007 20:05:20 -0000 1.2 *************** *** 6,30 **** #include <SupportedBenchmarks/Benchmark-LINPACKC.libwrapper.h> ! CBMBenchmarkLINPACKC::CBMBenchmarkLINPACKC(CBMSystem *_system) ! : CBMBenchmark(_system) { } ! std::string CBMBenchmarkLINPACKC::downloadURL(void) { return("http://www.netlib.org/benchmark/linpackc"); } ! std::string CBMBenchmarkLINPACKC::expectedMD5(void) { return("f6e06f98fdbf7e39f84aa9e6c04de131"); } ! std::string CBMBenchmarkLINPACKC::packageName(void) { return("linpackc"); } ! std::string CBMBenchmarkLINPACKC::benchmarkComments(void) { std::string comment; --- 6,30 ---- #include <SupportedBenchmarks/Benchmark-LINPACKC.libwrapper.h> ! CBMPackageLINPACKC::CBMPackageLINPACKC(CBMSystem *_system) ! : CBMPackage(_system) { } ! std::string CBMPackageLINPACKC::downloadURL(void) { return("http://www.netlib.org/benchmark/linpackc"); } ! std::string CBMPackageLINPACKC::expectedMD5(void) { return("f6e06f98fdbf7e39f84aa9e6c04de131"); } ! std::string CBMPackageLINPACKC::packageName(void) { return("linpackc"); } ! std::string CBMPackageLINPACKC::benchmarkComments(void) { std::string comment; *************** *** 35,49 **** } ! std::string CBMBenchmarkLINPACKC::packageVersion(void) { return("02-25-1994"); } ! int CBMBenchmarkLINPACKC::packageSize(void) { return(907); } ! int CBMBenchmarkLINPACKC::ContextMatches(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { --- 35,49 ---- } ! std::string CBMPackageLINPACKC::packageVersion(void) { return("02-25-1994"); } ! int CBMPackageLINPACKC::packageSize(void) { return(907); } ! int CBMPackageLINPACKC::ContextMatches(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { *************** *** 51,56 **** std::string previousFlags; ! int r = CBMBenchmark::ContextMatches(_currentCompiler, ! _currentOptions); if (!r) { --- 51,56 ---- std::string previousFlags; ! int r = CBMPackage::ContextMatches(_currentCompiler, ! _currentOptions); if (!r) { *************** *** 62,66 **** localFlags+=linpackRollFlags(); ! previousFlags=system->read("linpackc-localflags"); if ((previousFlags==localFlags) && --- 62,66 ---- localFlags+=linpackRollFlags(); ! previousFlags=System()->read("linpackc-localflags"); if ((previousFlags==localFlags) && *************** *** 73,92 **** ! std::string CBMBenchmarkLINPACKC::packageComments(void) { return("Official linpackc benchmark translated to C by Bonnie Toy. A minor patch is applied."); } ! std::string CBMBenchmarkLINPACKC::localPackageName(void) { return("linpackc.c"); } ! std::string CBMBenchmarkLINPACKC::language(void) { return("C"); } ! char* CBMBenchmarkLINPACKC::extractDirectory(void) { std::string dum = "linpackc-"; --- 73,92 ---- ! std::string CBMPackageLINPACKC::packageComments(void) { return("Official linpackc benchmark translated to C by Bonnie Toy. A minor patch is applied."); } ! std::string CBMPackageLINPACKC::localPackageName(void) { return("linpackc.c"); } ! std::string CBMPackageLINPACKC::language(void) { return("C"); } ! char* CBMPackageLINPACKC::extractDirectory(void) { std::string dum = "linpackc-"; *************** *** 96,105 **** } ! int CBMBenchmarkLINPACKC::hasPatch(void) { return(1); } ! int CBMBenchmarkLINPACKC::patch(int _force) { std::string cmd; --- 96,105 ---- } ! int CBMPackageLINPACKC::hasPatch(void) { return(1); } ! int CBMPackageLINPACKC::patch(int _force) { std::string cmd; *************** *** 127,131 **** } ! int CBMBenchmarkLINPACKC::extract(int _force) { std::string localFile = localPackageAbsoluteName(); --- 127,131 ---- } ! int CBMPackageLINPACKC::extract(int _force) { std::string localFile = localPackageAbsoluteName(); *************** *** 152,161 **** } ! int CBMBenchmarkLINPACKC::preConfigure(int _force) { return(1); } ! int CBMBenchmarkLINPACKC::configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { --- 152,161 ---- } ! int CBMPackageLINPACKC::preConfigure(int _force) { return(1); } ! int CBMPackageLINPACKC::configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { *************** *** 163,167 **** } ! int CBMBenchmarkLINPACKC::make(void) { std::string cmd; --- 163,167 ---- } ! int CBMPackageLINPACKC::make(void) { std::string cmd; *************** *** 217,242 **** } ! std::string CBMBenchmarkLINPACKC::bench(void) ! { ! std::string cmd; ! std::string result; ! ! cmd="cd "; ! cmd+=localPackageAbsoluteDirectory(); ! cmd+=" && echo $(./linpackc 2>&1 | "; ! cmd+=CBM_PROG_GREP; ! cmd+=" 'Kflops' | "; ! cmd+=CBM_PROG_CUT; ! cmd+=" -f5 -d' ')"; ! ! if (system->exec(cmd, result)==0) { ! return(result); ! } else { ! return("0"); ! } ! ! } ! ! int CBMBenchmarkLINPACKC::release(void) { std::string cmd; --- 217,221 ---- } ! int CBMPackageLINPACKC::release(void) { std::string cmd; *************** *** 250,279 **** } ! std::string CBMBenchmarkLINPACKC::license(void) { return("Not specified"); } ! std::string CBMBenchmarkLINPACKC::homePage(void) { return("http://math.nist.gov/scimark/"); } ! std::string CBMBenchmarkLINPACKC::author(void) { return("Roldan Pozo & Bruce R Miller"); } ! int CBMBenchmarkLINPACKC::benchmarkSize(void) { return(packageSize()); } CBMBenchmarkLINPACKC::~CBMBenchmarkLINPACKC() { } ! CBMBenchmarkLINPACKC_SP_UNROLL::CBMBenchmarkLINPACKC_SP_UNROLL(CBMSystem *_system) ! : CBMBenchmarkLINPACKC(_system) { } --- 229,290 ---- } ! std::string CBMPackageLINPACKC::license(void) { return("Not specified"); } ! std::string CBMPackageLINPACKC::homePage(void) { return("http://math.nist.gov/scimark/"); } ! std::string CBMPackageLINPACKC::author(void) { return("Roldan Pozo & Bruce R Miller"); } ! int CBMPackageLINPACKC::benchmarkSize(void) { return(packageSize()); } + CBMPackageLINPACKC::~CBMPackageLINPACKC() + { + } + + + + CBMBenchmarkLINPACKC::CBMBenchmarkLINPACKC(CBMPackage *_package) + : CBMBenchmark(_package) + { + } + + std::string CBMBenchmarkLINPACKC::bench(void) + { + std::string cmd; + std::string result; + + cmd="cd "; + cmd+=package->localPackageAbsoluteDirectory(); + cmd+=" && echo $(./linpackc 2>&1 | "; + cmd+=CBM_PROG_GREP; + cmd+=" 'Kflops' | "; + cmd+=CBM_PROG_CUT; + cmd+=" -f5 -d' ')"; + + if (System()->exec(cmd, result)==0) { + return(result); + } else { + return("0"); + } + + } + CBMBenchmarkLINPACKC::~CBMBenchmarkLINPACKC() { } ! CBMBenchmarkLINPACKC_SP_UNROLL::CBMBenchmarkLINPACKC_SP_UNROLL(CBMPackage *_package) ! : CBMBenchmarkLINPACKC(_package) { } *************** *** 306,311 **** } ! CBMBenchmarkLINPACKC_SP_ROLL::CBMBenchmarkLINPACKC_SP_ROLL(CBMSystem *_system) ! : CBMBenchmarkLINPACKC(_system) { } --- 317,322 ---- } ! CBMBenchmarkLINPACKC_SP_ROLL::CBMBenchmarkLINPACKC_SP_ROLL(CBMPackage *_package) ! : CBMBenchmarkLINPACKC(_package) { } *************** *** 338,343 **** } ! CBMBenchmarkLINPACKC_DP_UNROLL::CBMBenchmarkLINPACKC_DP_UNROLL(CBMSystem *_system) ! : CBMBenchmarkLINPACKC(_system) { } --- 349,354 ---- } ! CBMBenchmarkLINPACKC_DP_UNROLL::CBMBenchmarkLINPACKC_DP_UNROLL(CBMPackage *_package) ! : CBMBenchmarkLINPACKC(_package) { } *************** *** 370,375 **** } ! CBMBenchmarkLINPACKC_DP_ROLL::CBMBenchmarkLINPACKC_DP_ROLL(CBMSystem *_system) ! : CBMBenchmarkLINPACKC(_system) { } --- 381,386 ---- } ! CBMBenchmarkLINPACKC_DP_ROLL::CBMBenchmarkLINPACKC_DP_ROLL(CBMPackage *_package) ! : CBMBenchmarkLINPACKC(_package) { } Index: Benchmark-LINPACKC.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-LINPACKC.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-LINPACKC.h 28 Dec 2006 17:41:03 -0000 1.1 --- Benchmark-LINPACKC.h 3 Jan 2007 20:05:20 -0000 1.2 *************** *** 11,18 **** #include <Benchmark/Benchmark.h> /** \brief Defines the linpackc package. */ ! class CBMBenchmarkLINPACKC : public CBMBenchmark { public: --- 11,19 ---- #include <Benchmark/Benchmark.h> + #include <Benchmark/Package.h> /** \brief Defines the linpackc package. */ ! class CBMPackageLINPACKC : public CBMPackage { public: *************** *** 45,50 **** virtual std::string linpackRollFlags(void) = 0; - CBMBenchmarkLINPACKC(class CBMSystem *_system); - virtual std::string language(void); --- 46,49 ---- *************** *** 62,69 **** virtual int make(void); - virtual std::string bench(void); virtual int release(void); public: virtual std::string license(void); virtual std::string homePage(void); --- 61,70 ---- virtual int make(void); virtual int release(void); public: + CBMPackageLINPACKC(class CBMSystem *_system); + DLPackageWrapper_declare(); + virtual std::string license(void); virtual std::string homePage(void); *************** *** 71,74 **** --- 72,85 ---- virtual int benchmarkSize(void); + virtual ~CBMPackageLINPACKC(); + }; + + /** \brief Abstract class for CBMPackageLINPACKC benchmarks + */ + class CBMBenchmarkLINPACKC : public CBMBenchmark + { + protected: + CBMBenchmarkLINPACKC(CBMPackage *_package); + virtual std::string bench(void); virtual ~CBMBenchmarkLINPACKC(); }; *************** *** 88,92 **** public: ! CBMBenchmarkLINPACKC_SP_UNROLL(class CBMSystem *_system); virtual std::string benchmarkName(void); --- 99,103 ---- public: ! CBMBenchmarkLINPACKC_SP_UNROLL(CBMPackage *_package); virtual std::string benchmarkName(void); *************** *** 109,113 **** public: ! CBMBenchmarkLINPACKC_SP_ROLL(class CBMSystem *_system); virtual std::string benchmarkName(void); --- 120,124 ---- public: ! CBMBenchmarkLINPACKC_SP_ROLL(CBMPackage *_package); virtual std::string benchmarkName(void); *************** *** 131,135 **** public: ! CBMBenchmarkLINPACKC_DP_UNROLL(class CBMSystem *_system); virtual std::string benchmarkName(void); --- 142,146 ---- public: ! CBMBenchmarkLINPACKC_DP_UNROLL(CBMPackage *_package); virtual std::string benchmarkName(void); *************** *** 152,156 **** public: ! CBMBenchmarkLINPACKC_DP_ROLL(class CBMSystem *_system); virtual std::string benchmarkName(void); --- 163,167 ---- public: ! CBMBenchmarkLINPACKC_DP_ROLL(CBMPackage *_package); virtual std::string benchmarkName(void); *************** *** 160,164 **** }; ! lib_declare(); #endif --- 171,175 ---- }; ! DLdeclare(); #endif |
From: Frederic T. <xf...@us...> - 2007-01-03 19:56:20
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8680 Modified Files: Benchmark-BENCHPPLINUX.cpp Benchmark-BENCHPPLINUX.h Log Message: CBMPackage and new related API used. Index: Benchmark-BENCHPPLINUX.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPPLINUX.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-BENCHPPLINUX.h 28 Dec 2006 17:41:02 -0000 1.1 --- Benchmark-BENCHPPLINUX.h 3 Jan 2007 19:56:16 -0000 1.2 *************** *** 3,10 **** #include <Benchmark/Benchmark.h> /** \brief Defines the benchpp-linux package. */ ! class CBMBenchmarkBENCHPPLINUX : public CBMBenchmark { public: --- 3,11 ---- #include <Benchmark/Benchmark.h> + #include <Benchmark/Package.h> /** \brief Defines the benchpp-linux package. */ ! class CBMPackageBENCHPPLINUX : public CBMPackage { public: *************** *** 14,19 **** virtual std::string packageName(void); - virtual std::string benchmarkName(void) = 0; - virtual std::string benchmarkComments(void); virtual std::string packageVersion(void); --- 15,18 ---- *************** *** 27,36 **** protected: - CBMBenchmarkBENCHPPLINUX(class CBMSystem *_system); - - virtual std::string benchppBenchmark(void) = 0; - - virtual std::string benchmarkBENCHPPLINUXComments(void) = 0; - virtual char* extractDirectory(void); --- 26,29 ---- *************** *** 41,48 **** virtual int make(void); - virtual std::string bench(void); virtual int release(void); public: virtual std::string license(void); virtual std::string homePage(void); --- 34,43 ---- virtual int make(void); virtual int release(void); public: + CBMPackageBENCHPPLINUX(class CBMSystem *_system); + DLPackageWrapper_declare(); + virtual std::string license(void); virtual std::string homePage(void); *************** *** 50,57 **** virtual int benchmarkSize(void); ! virtual ~CBMBenchmarkBENCHPPLINUX(); }; /** \brief Defines the dhrystone benchmark within benchpp-linux package. */ --- 45,68 ---- virtual int benchmarkSize(void); ! virtual ~CBMPackageBENCHPPLINUX(); }; + /** \brief Abstact class for CBMPackageBENCHPPLINUX benchmarks + */ + class CBMBenchmarkBENCHPPLINUX : public CBMBenchmark + { + protected: + CBMBenchmarkBENCHPPLINUX(CBMPackage *_package); + + virtual std::string bench(void); + virtual std::string benchmarkComments(void); + virtual std::string benchmarkName(void) = 0; + virtual std::string benchppBenchmark(void) = 0; + virtual std::string benchmarkBENCHPPLINUXComments(void) = 0; + + virtual ~CBMBenchmarkBENCHPPLINUX(); + }; + /** \brief Defines the dhrystone benchmark within benchpp-linux package. */ *************** *** 66,70 **** public: ! CBMBenchmarkBENCHPPLINUX_DHRYSTONE(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_DHRYSTONE(); }; --- 77,81 ---- public: ! CBMBenchmarkBENCHPPLINUX_DHRYSTONE(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_DHRYSTONE(); }; *************** *** 82,86 **** public: ! CBMBenchmarkBENCHPPLINUX_WHETSTONE(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_WHETSTONE(); }; --- 93,97 ---- public: ! CBMBenchmarkBENCHPPLINUX_WHETSTONE(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_WHETSTONE(); }; *************** *** 91,95 **** { protected: ! CBMBenchmarkBENCHPPLINUX_IterationsPerSec(class CBMSystem *_system); virtual std::string bench(void); --- 102,106 ---- { protected: ! CBMBenchmarkBENCHPPLINUX_IterationsPerSec(CBMPackage *_package); virtual std::string bench(void); *************** *** 110,114 **** public: ! CBMBenchmarkBENCHPPLINUX_BOOL_ASSIGN(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_BOOL_ASSIGN(); }; --- 121,125 ---- public: ! CBMBenchmarkBENCHPPLINUX_BOOL_ASSIGN(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_BOOL_ASSIGN(); }; *************** *** 127,131 **** public: ! CBMBenchmarkBENCHPPLINUX_BOOL_IF(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_BOOL_IF(); }; --- 138,142 ---- public: ! CBMBenchmarkBENCHPPLINUX_BOOL_IF(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_BOOL_IF(); }; *************** *** 144,148 **** public: ! CBMBenchmarkBENCHPPLINUX_2WAY_IFELSE(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_2WAY_IFELSE(); }; --- 155,159 ---- public: ! CBMBenchmarkBENCHPPLINUX_2WAY_IFELSE(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_2WAY_IFELSE(); }; *************** *** 162,166 **** public: ! CBMBenchmarkBENCHPPLINUX_2WAY_SWITCH(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_2WAY_SWITCH(); }; --- 173,177 ---- public: ! CBMBenchmarkBENCHPPLINUX_2WAY_SWITCH(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_2WAY_SWITCH(); }; *************** *** 180,184 **** public: ! CBMBenchmarkBENCHPPLINUX_10WAY_IFELSE(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_10WAY_IFELSE(); }; --- 191,195 ---- public: ! CBMBenchmarkBENCHPPLINUX_10WAY_IFELSE(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_10WAY_IFELSE(); }; *************** *** 198,202 **** public: ! CBMBenchmarkBENCHPPLINUX_10WAY_SWITCH(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_10WAY_SWITCH(); }; --- 209,213 ---- public: ! CBMBenchmarkBENCHPPLINUX_10WAY_SWITCH(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_10WAY_SWITCH(); }; *************** *** 215,219 **** public: ! CBMBenchmarkBENCHPPLINUX_10WAY_SPARSE_SWITCH(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_10WAY_SPARSE_SWITCH(); }; --- 226,230 ---- public: ! CBMBenchmarkBENCHPPLINUX_10WAY_SPARSE_SWITCH(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_10WAY_SPARSE_SWITCH(); }; *************** *** 232,236 **** public: ! CBMBenchmarkBENCHPPLINUX_10WAY_VFC(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_10WAY_VFC(); }; --- 243,247 ---- public: ! CBMBenchmarkBENCHPPLINUX_10WAY_VFC(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_10WAY_VFC(); }; *************** *** 249,253 **** public: ! CBMBenchmarkBENCHPPLINUX_PACKEDBITARRAY(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_PACKEDBITARRAY(); }; --- 260,264 ---- public: ! CBMBenchmarkBENCHPPLINUX_PACKEDBITARRAY(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_PACKEDBITARRAY(); }; *************** *** 266,270 **** public: ! CBMBenchmarkBENCHPPLINUX_BITFIELDS(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_BITFIELDS(); }; --- 277,281 ---- public: ! CBMBenchmarkBENCHPPLINUX_BITFIELDS(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_BITFIELDS(); }; *************** *** 283,287 **** public: ! CBMBenchmarkBENCHPPLINUX_BITFIELDS_PBA(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_BITFIELDS_PBA(); }; --- 294,298 ---- public: ! CBMBenchmarkBENCHPPLINUX_BITFIELDS_PBA(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_BITFIELDS_PBA(); }; *************** *** 300,304 **** public: ! CBMBenchmarkBENCHPPLINUX_PACKUNPACKOBJ(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_PACKUNPACKOBJ(); }; --- 311,315 ---- public: ! CBMBenchmarkBENCHPPLINUX_PACKUNPACKOBJ(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_PACKUNPACKOBJ(); }; *************** *** 317,321 **** public: ! CBMBenchmarkBENCHPPLINUX_CONSTPROP(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_CONSTPROP(); }; --- 328,332 ---- public: ! CBMBenchmarkBENCHPPLINUX_CONSTPROP(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_CONSTPROP(); }; *************** *** 334,338 **** public: ! CBMBenchmarkBENCHPPLINUX_CONSTPROP_HO(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_CONSTPROP_HO(); }; --- 345,349 ---- public: ! CBMBenchmarkBENCHPPLINUX_CONSTPROP_HO(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_CONSTPROP_HO(); }; *************** *** 351,355 **** public: ! CBMBenchmarkBENCHPPLINUX_LOCALCSE(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_LOCALCSE(); }; --- 362,366 ---- public: ! CBMBenchmarkBENCHPPLINUX_LOCALCSE(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_LOCALCSE(); }; *************** *** 368,372 **** public: ! CBMBenchmarkBENCHPPLINUX_LOCALCSE_HO(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_LOCALCSE_HO(); }; --- 379,383 ---- public: ! CBMBenchmarkBENCHPPLINUX_LOCALCSE_HO(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_LOCALCSE_HO(); }; *************** *** 386,390 **** public: ! CBMBenchmarkBENCHPPLINUX_GLOBALCSE(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_GLOBALCSE(); }; --- 397,401 ---- public: ! CBMBenchmarkBENCHPPLINUX_GLOBALCSE(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_GLOBALCSE(); }; *************** *** 403,407 **** public: ! CBMBenchmarkBENCHPPLINUX_GLOBALCSE_HO(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_GLOBALCSE_HO(); }; --- 414,418 ---- public: ! CBMBenchmarkBENCHPPLINUX_GLOBALCSE_HO(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_GLOBALCSE_HO(); }; *************** *** 420,424 **** public: ! CBMBenchmarkBENCHPPLINUX_UNNECCOPY(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_UNNECCOPY(); }; --- 431,435 ---- public: ! CBMBenchmarkBENCHPPLINUX_UNNECCOPY(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_UNNECCOPY(); }; *************** *** 437,441 **** public: ! CBMBenchmarkBENCHPPLINUX_UNNECCOPY_HO(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_UNNECCOPY_HO(); }; --- 448,452 ---- public: ! CBMBenchmarkBENCHPPLINUX_UNNECCOPY_HO(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_UNNECCOPY_HO(); }; *************** *** 454,458 **** public: ! CBMBenchmarkBENCHPPLINUX_CODEMOTION(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_CODEMOTION(); }; --- 465,469 ---- public: ! CBMBenchmarkBENCHPPLINUX_CODEMOTION(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_CODEMOTION(); }; *************** *** 471,475 **** public: ! CBMBenchmarkBENCHPPLINUX_CODEMOTION_HO(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_CODEMOTION_HO(); }; --- 482,486 ---- public: ! CBMBenchmarkBENCHPPLINUX_CODEMOTION_HO(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_CODEMOTION_HO(); }; *************** *** 488,492 **** public: ! CBMBenchmarkBENCHPPLINUX_INDUCVAR(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_INDUCVAR(); }; --- 499,503 ---- public: ! CBMBenchmarkBENCHPPLINUX_INDUCVAR(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_INDUCVAR(); }; *************** *** 505,509 **** public: ! CBMBenchmarkBENCHPPLINUX_INDUCVAR_HO(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_INDUCVAR_HO(); }; --- 516,520 ---- public: ! CBMBenchmarkBENCHPPLINUX_INDUCVAR_HO(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_INDUCVAR_HO(); }; *************** *** 522,526 **** public: ! CBMBenchmarkBENCHPPLINUX_REDUCSTRENGTH_HO(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_REDUCSTRENGTH_HO(); }; --- 533,537 ---- public: ! CBMBenchmarkBENCHPPLINUX_REDUCSTRENGTH_HO(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_REDUCSTRENGTH_HO(); }; *************** *** 539,543 **** public: ! CBMBenchmarkBENCHPPLINUX_DEADCODE(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_DEADCODE(); }; --- 550,554 ---- public: ! CBMBenchmarkBENCHPPLINUX_DEADCODE(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_DEADCODE(); }; *************** *** 556,560 **** public: ! CBMBenchmarkBENCHPPLINUX_DEADCODE_HO(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_DEADCODE_HO(); }; --- 567,571 ---- public: ! CBMBenchmarkBENCHPPLINUX_DEADCODE_HO(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_DEADCODE_HO(); }; *************** *** 573,577 **** public: ! CBMBenchmarkBENCHPPLINUX_LOOPJAMMING(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_LOOPJAMMING(); }; --- 584,588 ---- public: ! CBMBenchmarkBENCHPPLINUX_LOOPJAMMING(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_LOOPJAMMING(); }; *************** *** 591,595 **** public: ! CBMBenchmarkBENCHPPLINUX_LOOPJAMMING_HO(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_LOOPJAMMING_HO(); }; --- 602,606 ---- public: ! CBMBenchmarkBENCHPPLINUX_LOOPJAMMING_HO(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_LOOPJAMMING_HO(); }; *************** *** 608,612 **** public: ! CBMBenchmarkBENCHPPLINUX_REDUNCODE(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_REDUNCODE(); }; --- 619,623 ---- public: ! CBMBenchmarkBENCHPPLINUX_REDUNCODE(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_REDUNCODE(); }; *************** *** 626,630 **** public: ! CBMBenchmarkBENCHPPLINUX_REDUNCODE_HO(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_REDUNCODE_HO(); }; --- 637,641 ---- public: ! CBMBenchmarkBENCHPPLINUX_REDUNCODE_HO(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_REDUNCODE_HO(); }; *************** *** 643,647 **** public: ! CBMBenchmarkBENCHPPLINUX_STRINGOPS(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_STRINGOPS(); }; --- 654,658 ---- public: ! CBMBenchmarkBENCHPPLINUX_STRINGOPS(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_STRINGOPS(); }; *************** *** 660,668 **** public: ! CBMBenchmarkBENCHPPLINUX_STRINGOPS_HO(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPPLINUX_STRINGOPS_HO(); }; ! lib_declare(); #endif --- 671,679 ---- public: ! CBMBenchmarkBENCHPPLINUX_STRINGOPS_HO(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPPLINUX_STRINGOPS_HO(); }; ! DLdeclare(); #endif Index: Benchmark-BENCHPPLINUX.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPPLINUX.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Benchmark-BENCHPPLINUX.cpp 3 Jan 2007 17:29:50 -0000 1.2 --- Benchmark-BENCHPPLINUX.cpp 3 Jan 2007 19:56:16 -0000 1.3 *************** *** 10,54 **** #include <SupportedBenchmarks/Benchmark-BENCHPPLINUX.libwrapper.h> ! CBMBenchmarkBENCHPPLINUX::CBMBenchmarkBENCHPPLINUX(CBMSystem *_system) ! : CBMBenchmark(_system) { } ! std::string CBMBenchmarkBENCHPPLINUX::downloadURL(void) { return("http://downloads.sourceforge.net/benchpplinux/bench_plus_plus_1.1_linux5.tgz"); } ! std::string CBMBenchmarkBENCHPPLINUX::expectedMD5(void) { return("003deea400b98ec0bc14f4227a99f2c5"); } ! std::string CBMBenchmarkBENCHPPLINUX::packageName(void) { return("benchpplinux"); } ! std::string CBMBenchmarkBENCHPPLINUX::benchmarkComments(void) ! { ! std::string comment; ! ! comment+=benchmarkBENCHPPLINUXComments(); ! comment+=" (Comment from README file)"; ! ! return(comment); ! } ! ! std::string CBMBenchmarkBENCHPPLINUX::packageVersion(void) { return("1.1v5"); } ! int CBMBenchmarkBENCHPPLINUX::packageSize(void) { return(83702); } ! std::string CBMBenchmarkBENCHPPLINUX::packageComments(void) { return("Bench++ for Linux was initially a port of Bench++ (based on" \ --- 10,44 ---- #include <SupportedBenchmarks/Benchmark-BENCHPPLINUX.libwrapper.h> ! CBMPackageBENCHPPLINUX::CBMPackageBENCHPPLINUX(CBMSystem *_system) ! : CBMPackage(_system) { } ! std::string CBMPackageBENCHPPLINUX::downloadURL(void) { return("http://downloads.sourceforge.net/benchpplinux/bench_plus_plus_1.1_linux5.tgz"); } ! std::string CBMPackageBENCHPPLINUX::expectedMD5(void) { return("003deea400b98ec0bc14f4227a99f2c5"); } ! std::string CBMPackageBENCHPPLINUX::packageName(void) { return("benchpplinux"); } ! std::string CBMPackageBENCHPPLINUX::packageVersion(void) { return("1.1v5"); } ! int CBMPackageBENCHPPLINUX::packageSize(void) { return(83702); } ! std::string CBMPackageBENCHPPLINUX::packageComments(void) { return("Bench++ for Linux was initially a port of Bench++ (based on" \ *************** *** 56,75 **** } ! std::string CBMBenchmarkBENCHPPLINUX::localPackageName(void) { return("bench_plus_plus_1.1_linux5.tgz"); } ! std::string CBMBenchmarkBENCHPPLINUX::language(void) { return("C++"); } ! char* CBMBenchmarkBENCHPPLINUX::extractDirectory(void) { return("bench++-linux"); } ! int CBMBenchmarkBENCHPPLINUX::extract(int _force) { std::string localFile = localPackageAbsoluteName(); --- 46,65 ---- } ! std::string CBMPackageBENCHPPLINUX::localPackageName(void) { return("bench_plus_plus_1.1_linux5.tgz"); } ! std::string CBMPackageBENCHPPLINUX::language(void) { return("C++"); } ! char* CBMPackageBENCHPPLINUX::extractDirectory(void) { return("bench++-linux"); } ! int CBMPackageBENCHPPLINUX::extract(int _force) { std::string localFile = localPackageAbsoluteName(); *************** *** 92,101 **** } ! int CBMBenchmarkBENCHPPLINUX::preConfigure(int _force) { return(1); } ! int CBMBenchmarkBENCHPPLINUX::configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { --- 82,91 ---- } ! int CBMPackageBENCHPPLINUX::preConfigure(int _force) { return(1); } ! int CBMPackageBENCHPPLINUX::configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { *************** *** 119,123 **** } ! int CBMBenchmarkBENCHPPLINUX::make(void) { std::string cmd; --- 109,113 ---- } ! int CBMPackageBENCHPPLINUX::make(void) { std::string cmd; *************** *** 141,168 **** } ! std::string CBMBenchmarkBENCHPPLINUX::bench(void) ! { ! std::string cmd; ! std::string result; ! ! cmd="cd "; ! cmd+=localPackageAbsoluteDirectory(); ! cmd+=" && echo $(./"; ! cmd+=benchppBenchmark(); ! cmd+=" | "; ! cmd+=CBM_PROG_TAIL; ! cmd+=" -1 | "; ! cmd+=CBM_PROG_CUT; ! cmd+=" -f2 -d':')"; ! ! if (system->exec(cmd, result)==0) { ! return(result); ! } else { ! return("0"); ! } ! ! } ! ! int CBMBenchmarkBENCHPPLINUX::release(void) { std::string cmd; --- 131,135 ---- } ! int CBMPackageBENCHPPLINUX::release(void) { std::string cmd; *************** *** 178,207 **** } ! std::string CBMBenchmarkBENCHPPLINUX::license(void) { return("Public domain"); } ! std::string CBMBenchmarkBENCHPPLINUX::homePage(void) { return("http://benchpplinux.sf.net"); } ! std::string CBMBenchmarkBENCHPPLINUX::author(void) { return("Marcos Marado"); } ! int CBMBenchmarkBENCHPPLINUX::benchmarkSize(void) { return(packageSize()); } CBMBenchmarkBENCHPPLINUX::~CBMBenchmarkBENCHPPLINUX() { } ! CBMBenchmarkBENCHPPLINUX_DHRYSTONE::CBMBenchmarkBENCHPPLINUX_DHRYSTONE(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX(_system) { } --- 145,220 ---- } ! std::string CBMPackageBENCHPPLINUX::license(void) { return("Public domain"); } ! std::string CBMPackageBENCHPPLINUX::homePage(void) { return("http://benchpplinux.sf.net"); } ! std::string CBMPackageBENCHPPLINUX::author(void) { return("Marcos Marado"); } ! int CBMPackageBENCHPPLINUX::benchmarkSize(void) { return(packageSize()); } + CBMPackageBENCHPPLINUX::~CBMPackageBENCHPPLINUX() + { + } + + CBMBenchmarkBENCHPPLINUX::CBMBenchmarkBENCHPPLINUX(CBMPackage *_package) + : CBMBenchmark(_package) + { + } + + std::string CBMBenchmarkBENCHPPLINUX::bench(void) + { + std::string cmd; + std::string result; + + cmd="cd "; + cmd+=package->localPackageAbsoluteDirectory(); + cmd+=" && echo $(./"; + cmd+=benchppBenchmark(); + cmd+=" | "; + cmd+=CBM_PROG_TAIL; + cmd+=" -1 | "; + cmd+=CBM_PROG_CUT; + cmd+=" -f2 -d':')"; + + if (System()->exec(cmd, result)==0) { + return(result); + } else { + return("0"); + } + + } + + std::string CBMBenchmarkBENCHPPLINUX::benchmarkComments(void) + { + std::string comment; + + comment+=benchmarkBENCHPPLINUXComments(); + comment+=" (Comment from README file)"; + + return(comment); + } + CBMBenchmarkBENCHPPLINUX::~CBMBenchmarkBENCHPPLINUX() { } ! ! ! ! ! CBMBenchmarkBENCHPPLINUX_DHRYSTONE::CBMBenchmarkBENCHPPLINUX_DHRYSTONE(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX(_package) { } *************** *** 226,231 **** } ! CBMBenchmarkBENCHPPLINUX_WHETSTONE::CBMBenchmarkBENCHPPLINUX_WHETSTONE(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX(_system) { } --- 239,244 ---- } ! CBMBenchmarkBENCHPPLINUX_WHETSTONE::CBMBenchmarkBENCHPPLINUX_WHETSTONE(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX(_package) { } *************** *** 252,257 **** ! CBMBenchmarkBENCHPPLINUX_IterationsPerSec::CBMBenchmarkBENCHPPLINUX_IterationsPerSec(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX(_system) { } --- 265,270 ---- ! CBMBenchmarkBENCHPPLINUX_IterationsPerSec::CBMBenchmarkBENCHPPLINUX_IterationsPerSec(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX(_package) { } *************** *** 267,271 **** cmd="cd "; ! cmd+=localPackageAbsoluteDirectory(); cmd+=" && echo $(./"; cmd+=benchppBenchmark(); --- 280,284 ---- cmd="cd "; ! cmd+=package->localPackageAbsoluteDirectory(); cmd+=" && echo $(./"; cmd+=benchppBenchmark(); *************** *** 277,285 **** cmd+=" -f3 -d':')"; ! begint=system->Time(); ! if (system->exec(cmd, result)==0) { ! system->Chomp(result); it=atof(result.c_str()); ! endt=system->Time(); if (endt>begint) { sprintf(dum, "%0.0f", it/(endt-begint)); --- 290,298 ---- cmd+=" -f3 -d':')"; ! begint=System()->Time(); ! if (System()->exec(cmd, result)==0) { ! System()->Chomp(result); it=atof(result.c_str()); ! endt=System()->Time(); if (endt>begint) { sprintf(dum, "%0.0f", it/(endt-begint)); *************** *** 297,302 **** } ! CBMBenchmarkBENCHPPLINUX_BOOL_ASSIGN::CBMBenchmarkBENCHPPLINUX_BOOL_ASSIGN(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 310,315 ---- } ! CBMBenchmarkBENCHPPLINUX_BOOL_ASSIGN::CBMBenchmarkBENCHPPLINUX_BOOL_ASSIGN(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 322,327 **** } ! CBMBenchmarkBENCHPPLINUX_BOOL_IF::CBMBenchmarkBENCHPPLINUX_BOOL_IF(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 335,340 ---- } ! CBMBenchmarkBENCHPPLINUX_BOOL_IF::CBMBenchmarkBENCHPPLINUX_BOOL_IF(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 347,352 **** } ! CBMBenchmarkBENCHPPLINUX_2WAY_IFELSE::CBMBenchmarkBENCHPPLINUX_2WAY_IFELSE(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 360,365 ---- } ! CBMBenchmarkBENCHPPLINUX_2WAY_IFELSE::CBMBenchmarkBENCHPPLINUX_2WAY_IFELSE(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 371,376 **** } ! CBMBenchmarkBENCHPPLINUX_2WAY_SWITCH::CBMBenchmarkBENCHPPLINUX_2WAY_SWITCH(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 384,389 ---- } ! CBMBenchmarkBENCHPPLINUX_2WAY_SWITCH::CBMBenchmarkBENCHPPLINUX_2WAY_SWITCH(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 395,400 **** } ! CBMBenchmarkBENCHPPLINUX_10WAY_IFELSE::CBMBenchmarkBENCHPPLINUX_10WAY_IFELSE(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 408,413 ---- } ! CBMBenchmarkBENCHPPLINUX_10WAY_IFELSE::CBMBenchmarkBENCHPPLINUX_10WAY_IFELSE(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 419,424 **** } ! CBMBenchmarkBENCHPPLINUX_10WAY_SWITCH::CBMBenchmarkBENCHPPLINUX_10WAY_SWITCH(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 432,437 ---- } ! CBMBenchmarkBENCHPPLINUX_10WAY_SWITCH::CBMBenchmarkBENCHPPLINUX_10WAY_SWITCH(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 444,449 **** ! CBMBenchmarkBENCHPPLINUX_10WAY_SPARSE_SWITCH::CBMBenchmarkBENCHPPLINUX_10WAY_SPARSE_SWITCH(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 457,462 ---- ! CBMBenchmarkBENCHPPLINUX_10WAY_SPARSE_SWITCH::CBMBenchmarkBENCHPPLINUX_10WAY_SPARSE_SWITCH(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 468,473 **** } ! CBMBenchmarkBENCHPPLINUX_10WAY_VFC::CBMBenchmarkBENCHPPLINUX_10WAY_VFC(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 481,486 ---- } ! CBMBenchmarkBENCHPPLINUX_10WAY_VFC::CBMBenchmarkBENCHPPLINUX_10WAY_VFC(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 492,497 **** } ! CBMBenchmarkBENCHPPLINUX_PACKEDBITARRAY::CBMBenchmarkBENCHPPLINUX_PACKEDBITARRAY(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 505,510 ---- } ! CBMBenchmarkBENCHPPLINUX_PACKEDBITARRAY::CBMBenchmarkBENCHPPLINUX_PACKEDBITARRAY(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 516,521 **** } ! CBMBenchmarkBENCHPPLINUX_BITFIELDS::CBMBenchmarkBENCHPPLINUX_BITFIELDS(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 529,534 ---- } ! CBMBenchmarkBENCHPPLINUX_BITFIELDS::CBMBenchmarkBENCHPPLINUX_BITFIELDS(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 541,546 **** } ! CBMBenchmarkBENCHPPLINUX_BITFIELDS_PBA::CBMBenchmarkBENCHPPLINUX_BITFIELDS_PBA(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 554,559 ---- } ! CBMBenchmarkBENCHPPLINUX_BITFIELDS_PBA::CBMBenchmarkBENCHPPLINUX_BITFIELDS_PBA(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 567,572 **** } ! CBMBenchmarkBENCHPPLINUX_PACKUNPACKOBJ::CBMBenchmarkBENCHPPLINUX_PACKUNPACKOBJ(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 580,585 ---- } ! CBMBenchmarkBENCHPPLINUX_PACKUNPACKOBJ::CBMBenchmarkBENCHPPLINUX_PACKUNPACKOBJ(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 591,596 **** } ! CBMBenchmarkBENCHPPLINUX_CONSTPROP::CBMBenchmarkBENCHPPLINUX_CONSTPROP(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 604,609 ---- } ! CBMBenchmarkBENCHPPLINUX_CONSTPROP::CBMBenchmarkBENCHPPLINUX_CONSTPROP(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 615,620 **** } ! CBMBenchmarkBENCHPPLINUX_CONSTPROP_HO::CBMBenchmarkBENCHPPLINUX_CONSTPROP_HO(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 628,633 ---- } ! CBMBenchmarkBENCHPPLINUX_CONSTPROP_HO::CBMBenchmarkBENCHPPLINUX_CONSTPROP_HO(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 639,644 **** } ! CBMBenchmarkBENCHPPLINUX_LOCALCSE::CBMBenchmarkBENCHPPLINUX_LOCALCSE(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 652,657 ---- } ! CBMBenchmarkBENCHPPLINUX_LOCALCSE::CBMBenchmarkBENCHPPLINUX_LOCALCSE(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 663,668 **** } ! CBMBenchmarkBENCHPPLINUX_LOCALCSE_HO::CBMBenchmarkBENCHPPLINUX_LOCALCSE_HO(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 676,681 ---- } ! CBMBenchmarkBENCHPPLINUX_LOCALCSE_HO::CBMBenchmarkBENCHPPLINUX_LOCALCSE_HO(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 687,692 **** } ! CBMBenchmarkBENCHPPLINUX_GLOBALCSE::CBMBenchmarkBENCHPPLINUX_GLOBALCSE(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 700,705 ---- } ! CBMBenchmarkBENCHPPLINUX_GLOBALCSE::CBMBenchmarkBENCHPPLINUX_GLOBALCSE(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 711,716 **** } ! CBMBenchmarkBENCHPPLINUX_GLOBALCSE_HO::CBMBenchmarkBENCHPPLINUX_GLOBALCSE_HO(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 724,729 ---- } ! CBMBenchmarkBENCHPPLINUX_GLOBALCSE_HO::CBMBenchmarkBENCHPPLINUX_GLOBALCSE_HO(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 735,740 **** } ! CBMBenchmarkBENCHPPLINUX_UNNECCOPY::CBMBenchmarkBENCHPPLINUX_UNNECCOPY(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 748,753 ---- } ! CBMBenchmarkBENCHPPLINUX_UNNECCOPY::CBMBenchmarkBENCHPPLINUX_UNNECCOPY(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 759,764 **** } ! CBMBenchmarkBENCHPPLINUX_UNNECCOPY_HO::CBMBenchmarkBENCHPPLINUX_UNNECCOPY_HO(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 772,777 ---- } ! CBMBenchmarkBENCHPPLINUX_UNNECCOPY_HO::CBMBenchmarkBENCHPPLINUX_UNNECCOPY_HO(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 783,788 **** } ! CBMBenchmarkBENCHPPLINUX_CODEMOTION::CBMBenchmarkBENCHPPLINUX_CODEMOTION(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 796,801 ---- } ! CBMBenchmarkBENCHPPLINUX_CODEMOTION::CBMBenchmarkBENCHPPLINUX_CODEMOTION(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 807,812 **** } ! CBMBenchmarkBENCHPPLINUX_CODEMOTION_HO::CBMBenchmarkBENCHPPLINUX_CODEMOTION_HO(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 820,825 ---- } ! CBMBenchmarkBENCHPPLINUX_CODEMOTION_HO::CBMBenchmarkBENCHPPLINUX_CODEMOTION_HO(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 831,836 **** } ! CBMBenchmarkBENCHPPLINUX_INDUCVAR::CBMBenchmarkBENCHPPLINUX_INDUCVAR(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 844,849 ---- } ! CBMBenchmarkBENCHPPLINUX_INDUCVAR::CBMBenchmarkBENCHPPLINUX_INDUCVAR(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 855,860 **** } ! CBMBenchmarkBENCHPPLINUX_INDUCVAR_HO::CBMBenchmarkBENCHPPLINUX_INDUCVAR_HO(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 868,873 ---- } ! CBMBenchmarkBENCHPPLINUX_INDUCVAR_HO::CBMBenchmarkBENCHPPLINUX_INDUCVAR_HO(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 879,884 **** } ! CBMBenchmarkBENCHPPLINUX_REDUCSTRENGTH_HO::CBMBenchmarkBENCHPPLINUX_REDUCSTRENGTH_HO(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 892,897 ---- } ! CBMBenchmarkBENCHPPLINUX_REDUCSTRENGTH_HO::CBMBenchmarkBENCHPPLINUX_REDUCSTRENGTH_HO(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 903,908 **** } ! CBMBenchmarkBENCHPPLINUX_DEADCODE::CBMBenchmarkBENCHPPLINUX_DEADCODE(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 916,921 ---- } ! CBMBenchmarkBENCHPPLINUX_DEADCODE::CBMBenchmarkBENCHPPLINUX_DEADCODE(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 927,932 **** } ! CBMBenchmarkBENCHPPLINUX_DEADCODE_HO::CBMBenchmarkBENCHPPLINUX_DEADCODE_HO(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 940,945 ---- } ! CBMBenchmarkBENCHPPLINUX_DEADCODE_HO::CBMBenchmarkBENCHPPLINUX_DEADCODE_HO(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 952,957 **** ! CBMBenchmarkBENCHPPLINUX_LOOPJAMMING::CBMBenchmarkBENCHPPLINUX_LOOPJAMMING(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 965,970 ---- ! CBMBenchmarkBENCHPPLINUX_LOOPJAMMING::CBMBenchmarkBENCHPPLINUX_LOOPJAMMING(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 976,981 **** } ! CBMBenchmarkBENCHPPLINUX_LOOPJAMMING_HO::CBMBenchmarkBENCHPPLINUX_LOOPJAMMING_HO(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 989,994 ---- } ! CBMBenchmarkBENCHPPLINUX_LOOPJAMMING_HO::CBMBenchmarkBENCHPPLINUX_LOOPJAMMING_HO(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 1000,1005 **** } ! CBMBenchmarkBENCHPPLINUX_REDUNCODE::CBMBenchmarkBENCHPPLINUX_REDUNCODE(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 1013,1018 ---- } ! CBMBenchmarkBENCHPPLINUX_REDUNCODE::CBMBenchmarkBENCHPPLINUX_REDUNCODE(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 1024,1029 **** } ! CBMBenchmarkBENCHPPLINUX_REDUNCODE_HO::CBMBenchmarkBENCHPPLINUX_REDUNCODE_HO(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 1037,1042 ---- } ! CBMBenchmarkBENCHPPLINUX_REDUNCODE_HO::CBMBenchmarkBENCHPPLINUX_REDUNCODE_HO(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 1048,1053 **** } ! CBMBenchmarkBENCHPPLINUX_STRINGOPS::CBMBenchmarkBENCHPPLINUX_STRINGOPS(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 1061,1066 ---- } ! CBMBenchmarkBENCHPPLINUX_STRINGOPS::CBMBenchmarkBENCHPPLINUX_STRINGOPS(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } *************** *** 1072,1077 **** } ! CBMBenchmarkBENCHPPLINUX_STRINGOPS_HO::CBMBenchmarkBENCHPPLINUX_STRINGOPS_HO(CBMSystem *_system) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_system) { } --- 1085,1090 ---- } ! CBMBenchmarkBENCHPPLINUX_STRINGOPS_HO::CBMBenchmarkBENCHPPLINUX_STRINGOPS_HO(CBMPackage *_package) ! : CBMBenchmarkBENCHPPLINUX_IterationsPerSec(_package) { } |
From: Frederic T. <xf...@us...> - 2007-01-03 19:15:58
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26613 Modified Files: Benchmark-BENCHPP.cpp Benchmark-BENCHPP.h Log Message: CBMPackage and new related API used. Index: Benchmark-BENCHPP.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPP.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-BENCHPP.cpp 28 Dec 2006 17:41:02 -0000 1.1 --- Benchmark-BENCHPP.cpp 3 Jan 2007 19:15:51 -0000 1.2 *************** *** 8,32 **** #include <SupportedBenchmarks/Benchmark-BENCHPP.libwrapper.h> ! CBMBenchmarkBENCHPP::CBMBenchmarkBENCHPP(CBMSystem *_system) ! : CBMBenchmark(_system) { } ! std::string CBMBenchmarkBENCHPP::downloadURL(void) { return(""); } ! std::string CBMBenchmarkBENCHPP::expectedMD5(void) { return("61f961031fd3ca116787fffd442ef872"); } ! std::string CBMBenchmarkBENCHPP::packageName(void) { return("benchpp"); } ! std::string CBMBenchmarkBENCHPP::benchmarkComments(void) { std::string comment; --- 8,32 ---- #include <SupportedBenchmarks/Benchmark-BENCHPP.libwrapper.h> ! CBMPackageBENCHPP::CBMPackageBENCHPP(CBMSystem *_system) ! : CBMPackage(_system) { } ! std::string CBMPackageBENCHPP::downloadURL(void) { return(""); } ! std::string CBMPackageBENCHPP::expectedMD5(void) { return("61f961031fd3ca116787fffd442ef872"); } ! std::string CBMPackageBENCHPP::packageName(void) { return("benchpp"); } ! std::string CBMPackageBENCHPP::benchmarkComments(void) { std::string comment; *************** *** 38,52 **** } ! std::string CBMBenchmarkBENCHPP::packageVersion(void) { return("1.1"); } ! int CBMBenchmarkBENCHPP::packageSize(void) { return(177532); } ! std::string CBMBenchmarkBENCHPP::packageComments(void) { return("The suite is based on the Ada PIWG suite, and therefore is " \ --- 38,52 ---- } ! std::string CBMPackageBENCHPP::packageVersion(void) { return("1.1"); } ! int CBMPackageBENCHPP::packageSize(void) { return(177532); } ! std::string CBMPackageBENCHPP::packageComments(void) { return("The suite is based on the Ada PIWG suite, and therefore is " \ *************** *** 66,90 **** } ! std::string CBMBenchmarkBENCHPP::localPackageName(void) { return("bench_plus_plus_1.1.tar.Z"); } ! std::string CBMBenchmarkBENCHPP::language(void) { return("C++"); } ! char* CBMBenchmarkBENCHPP::extractDirectory(void) { return("bench++"); } ! int CBMBenchmarkBENCHPP::hasPatch(void) { return(1); } ! int CBMBenchmarkBENCHPP::patch(int _force) { std::string cmd; --- 66,90 ---- } ! std::string CBMPackageBENCHPP::localPackageName(void) { return("bench_plus_plus_1.1.tar.Z"); } ! std::string CBMPackageBENCHPP::language(void) { return("C++"); } ! char* CBMPackageBENCHPP::extractDirectory(void) { return("bench++"); } ! int CBMPackageBENCHPP::hasPatch(void) { return(1); } ! int CBMPackageBENCHPP::patch(int _force) { std::string cmd; *************** *** 112,116 **** } ! int CBMBenchmarkBENCHPP::extract(int _force) { std::string localFile = localPackageAbsoluteName(); --- 112,116 ---- } ! int CBMPackageBENCHPP::extract(int _force) { std::string localFile = localPackageAbsoluteName(); *************** *** 131,140 **** } ! int CBMBenchmarkBENCHPP::preConfigure(int _force) { return(1); } ! int CBMBenchmarkBENCHPP::configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { --- 131,140 ---- } ! int CBMPackageBENCHPP::preConfigure(int _force) { return(1); } ! int CBMPackageBENCHPP::configure(CBMCompiler *_currentCompiler, CBMCompilerOptions *_currentOptions) { *************** *** 160,164 **** } ! int CBMBenchmarkBENCHPP::make(void) { std::string cmd; --- 160,164 ---- } ! int CBMPackageBENCHPP::make(void) { std::string cmd; *************** *** 198,225 **** } ! std::string CBMBenchmarkBENCHPP::bench(void) ! { ! std::string cmd; ! std::string result; ! ! cmd="cd "; ! cmd+=localPackageAbsoluteDirectory(); ! cmd+=" && echo $(./"; ! cmd+=benchppBenchmark(); ! cmd+=" | "; ! cmd+=CBM_PROG_TAIL; ! cmd+=" -1 | "; ! cmd+=CBM_PROG_CUT; ! cmd+=" -f2 -d':')"; ! ! if (system->exec(cmd, result)==0) { ! return(result); ! } else { ! return("0"); ! } ! ! } ! ! int CBMBenchmarkBENCHPP::release(void) { std::string cmd; --- 198,202 ---- } ! int CBMPackageBENCHPP::release(void) { std::string cmd; *************** *** 235,264 **** } ! std::string CBMBenchmarkBENCHPP::license(void) { return("Public domain"); } ! std::string CBMBenchmarkBENCHPP::homePage(void) { return("http://web.archive.org/web/20050307095704/www.research.att.com/~orost/bench_plus_plus.html"); } ! std::string CBMBenchmarkBENCHPP::author(void) { return("Joseph M. Orost"); } ! int CBMBenchmarkBENCHPP::benchmarkSize(void) { return(packageSize()); } CBMBenchmarkBENCHPP::~CBMBenchmarkBENCHPP() { } ! CBMBenchmarkBENCHPP_DHRYSTONE::CBMBenchmarkBENCHPP_DHRYSTONE(CBMSystem *_system) ! : CBMBenchmarkBENCHPP(_system) { } --- 212,273 ---- } ! std::string CBMPackageBENCHPP::license(void) { return("Public domain"); } ! std::string CBMPackageBENCHPP::homePage(void) { return("http://web.archive.org/web/20050307095704/www.research.att.com/~orost/bench_plus_plus.html"); } ! std::string CBMPackageBENCHPP::author(void) { return("Joseph M. Orost"); } ! int CBMPackageBENCHPP::benchmarkSize(void) { return(packageSize()); } + CBMPackageBENCHPP::~CBMPackageBENCHPP() + { + } + + CBMBenchmarkBENCHPP::CBMBenchmarkBENCHPP(CBMPackage *_package) + : CBMBenchmark(_package) + { + } + + std::string CBMBenchmarkBENCHPP::bench(void) + { + std::string cmd; + std::string result; + + cmd="cd "; + cmd+=package->localPackageAbsoluteDirectory(); + cmd+=" && echo $(./"; + cmd+=benchppBenchmark(); + cmd+=" | "; + cmd+=CBM_PROG_TAIL; + cmd+=" -1 | "; + cmd+=CBM_PROG_CUT; + cmd+=" -f2 -d':')"; + + if (System()->exec(cmd, result)==0) { + return(result); + } else { + return("0"); + } + + } + CBMBenchmarkBENCHPP::~CBMBenchmarkBENCHPP() { } ! CBMBenchmarkBENCHPP_DHRYSTONE::CBMBenchmarkBENCHPP_DHRYSTONE(CBMPackage *_package) ! : CBMBenchmarkBENCHPP(_package) { } *************** *** 283,288 **** } ! CBMBenchmarkBENCHPP_WHETSTONE::CBMBenchmarkBENCHPP_WHETSTONE(CBMSystem *_system) ! : CBMBenchmarkBENCHPP(_system) { } --- 292,297 ---- } ! CBMBenchmarkBENCHPP_WHETSTONE::CBMBenchmarkBENCHPP_WHETSTONE(CBMPackage *_package) ! : CBMBenchmarkBENCHPP(_package) { } *************** *** 308,313 **** ! CBMBenchmarkBENCHPP_STEPANOV::CBMBenchmarkBENCHPP_STEPANOV(CBMSystem *_system) ! : CBMBenchmarkBENCHPP(_system) { } --- 317,322 ---- ! CBMBenchmarkBENCHPP_STEPANOV::CBMBenchmarkBENCHPP_STEPANOV(CBMPackage *_package) ! : CBMBenchmarkBENCHPP(_package) { } *************** *** 319,323 **** cmd="cd "; ! cmd+=localPackageAbsoluteDirectory(); cmd+=" && echo $(./"; cmd+=benchppBenchmark(); --- 328,332 ---- cmd="cd "; ! cmd+=package->localPackageAbsoluteDirectory(); cmd+=" && echo $(./"; cmd+=benchppBenchmark(); *************** *** 328,332 **** cmd+=" -f3 -d':')"; ! if (system->exec(cmd, result)==0) { return(result); } else { --- 337,341 ---- cmd+=" -f3 -d':')"; ! if (System()->exec(cmd, result)==0) { return(result); } else { *************** *** 339,344 **** } ! CBMBenchmarkBENCHPP_STEPANOV_AL12::CBMBenchmarkBENCHPP_STEPANOV_AL12(CBMSystem *_system) ! : CBMBenchmarkBENCHPP_STEPANOV(_system) { } --- 348,353 ---- } ! CBMBenchmarkBENCHPP_STEPANOV_AL12::CBMBenchmarkBENCHPP_STEPANOV_AL12(CBMPackage *_package) ! : CBMBenchmarkBENCHPP_STEPANOV(_package) { } Index: Benchmark-BENCHPP.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPP.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-BENCHPP.h 28 Dec 2006 17:41:02 -0000 1.1 --- Benchmark-BENCHPP.h 3 Jan 2007 19:15:51 -0000 1.2 *************** *** 11,18 **** #include <Benchmark/Benchmark.h> /** \brief Defines the benchpp package. */ ! class CBMBenchmarkBENCHPP : public CBMBenchmark { public: --- 11,19 ---- #include <Benchmark/Benchmark.h> + #include <Benchmark/Package.h> /** \brief Defines the benchpp package. */ ! class CBMPackageBENCHPP : public CBMPackage { public: *************** *** 32,40 **** protected: - - CBMBenchmarkBENCHPP(class CBMSystem *_system); - virtual std::string language(void); - virtual std::string benchppBenchmark(void) = 0; virtual std::string benchmarkBENCHPPComments(void) = 0; --- 33,37 ---- *************** *** 50,57 **** virtual int make(void); - virtual std::string bench(void); virtual int release(void); public: virtual std::string license(void); virtual std::string homePage(void); --- 47,56 ---- virtual int make(void); virtual int release(void); public: + CBMPackageBENCHPP(class CBMSystem *_system); + DLPackageWrapper_declare(); + virtual std::string license(void); virtual std::string homePage(void); *************** *** 59,66 **** virtual int benchmarkSize(void); ! virtual ~CBMBenchmarkBENCHPP(); }; /** \brief Defines the dhrystone benchmark within benchpp package. */ --- 58,76 ---- virtual int benchmarkSize(void); ! virtual ~CBMPackageBENCHPP(); }; + /** \brief Abstract benchmark definition for CBMPackageBENCHPP + */ + class CBMBenchmarkBENCHPP : public CBMBenchmark + { + protected: + CBMBenchmarkBENCHPP(CBMPackage *_package); + virtual std::string benchppBenchmark(void) = 0; + virtual std::string bench(void); + virtual ~CBMBenchmarkBENCHPP(); + }; + /** \brief Defines the dhrystone benchmark within benchpp package. */ *************** *** 75,79 **** public: ! CBMBenchmarkBENCHPP_DHRYSTONE(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPP_DHRYSTONE(); }; --- 85,89 ---- public: ! CBMBenchmarkBENCHPP_DHRYSTONE(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPP_DHRYSTONE(); }; *************** *** 91,95 **** public: ! CBMBenchmarkBENCHPP_WHETSTONE(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPP_WHETSTONE(); }; --- 101,105 ---- public: ! CBMBenchmarkBENCHPP_WHETSTONE(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPP_WHETSTONE(); }; *************** *** 102,106 **** virtual std::string bench(void); public: ! CBMBenchmarkBENCHPP_STEPANOV(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPP_STEPANOV(); }; --- 112,116 ---- virtual std::string bench(void); public: ! CBMBenchmarkBENCHPP_STEPANOV(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPP_STEPANOV(); }; *************** *** 116,124 **** virtual std::string benchppBenchmark(void); public: ! CBMBenchmarkBENCHPP_STEPANOV_AL12(class CBMSystem *_system); virtual ~CBMBenchmarkBENCHPP_STEPANOV_AL12(); }; ! lib_declare(); #endif --- 126,134 ---- virtual std::string benchppBenchmark(void); public: ! CBMBenchmarkBENCHPP_STEPANOV_AL12(CBMPackage *_package); virtual ~CBMBenchmarkBENCHPP_STEPANOV_AL12(); }; ! DLdeclare(); #endif |