Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove kperiodic experiments and add cxx11
  • Loading branch information
toky committed Jun 16, 2016
1 parent a428ad7 commit 752ecc0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 30 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -91,11 +91,11 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-long-long")
#SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wlarger-than=1024 -Wsync-nand ")

# -g in debug mode
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O3")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O3 -std=c++11")
# -fno-inline -fno-default-inline

# -O3 in normal mode
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 ") #-Ofast -fno-signed-zeros -mtune=native -fno-signaling-nans -fno-trapping-math -fno-math-errno
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -std=c++11") #-Ofast -fno-signed-zeros -mtune=native -fno-signaling-nans -fno-trapping-math -fno-math-errno

# BugFix fc10:boost
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-deprecated-declarations -Wno-unused-but-set-variable")
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Expand Up @@ -20,20 +20,20 @@ clean:
benchmark : sdf.log csdf.log csdf_sized.log

travis_test: ${SDF3_BENCHMARK}
for f in benchmark/*.xml ; do echo === $$f ; ${KITER} -f $$f -a PeriodicThroughput -a 1PeriodicThroughput -a KPeriodicThroughput -a KBisPeriodicThroughput -a KTerPeriodicThroughput ; done
for f in benchmark_sized/*.xml ; do echo === $$f ; ${KITER} -f $$f -a PeriodicThroughput -a 1PeriodicThroughput -a KPeriodicThroughput -a KBisPeriodicThroughput -a KTerPeriodicThroughput ; done
for f in benchmark/*.xml ; do echo === $$f ; ${KITER} -f $$f -a PeriodicThroughput -a 1PeriodicThroughput -a KPeriodicThroughput ; done
for f in benchmark_sized/*.xml ; do echo === $$f ; ${KITER} -f $$f -a PeriodicThroughput -a 1PeriodicThroughput -a KPeriodicThroughput ; done

csdf.log: ./release/bin/kiter Makefile
rm -f $@
@echo "==============================================================================================="
@echo "==============================================================================================="
for f in benchmark/*.xml ; do echo === $$f >> $@;echo === $$f ; ${KITER} -f $$f -a PeriodicThroughput -a 1PeriodicThroughput -a KPeriodicThroughput -a KBisPeriodicThroughput -a KTerPeriodicThroughput >> $@ ; ${SDF3ANALYSIS_CSDF} --graph $$f --algo throughput >> $@ || true ; done
for f in benchmark/*.xml ; do echo === $$f >> $@;echo === $$f ; ${KITER} -f $$f -a PeriodicThroughput -a 1PeriodicThroughput -a KPeriodicThroughput >> $@ ; if [ -d ${SDF3_BINARY_ROOT} ];then ${SDF3ANALYSIS_CSDF} --graph $$f --algo throughput >> $@ || true; fi ; done

csdf_sized.log: ./release/bin/kiter Makefile
rm -f $@
@echo "==============================================================================================="
@echo "==============================================================================================="
for f in benchmark_sized/*.xml ; do echo === $$f >> $@;echo === $$f ; ${KITER} -f $$f -a PeriodicThroughput -a 1PeriodicThroughput -a KPeriodicThroughput -a KBisPeriodicThroughput -a KTerPeriodicThroughput >> $@ ; ${SDF3ANALYSIS_CSDF} --graph $$f --algo throughput >> $@ || true ; done
for f in benchmark_sized/*.xml ; do echo === $$f >> $@;echo === $$f ; ${KITER} -f $$f -a PeriodicThroughput -a 1PeriodicThroughput -a KPeriodicThroughput >> $@ ; if [ -x ${SDF3_BINARY_ROOT} ];then ${SDF3ANALYSIS_CSDF} --graph $$f --algo throughput >> $@ || true; fi ; done

sdfg_throughput.zip :
wget http://www.es.ele.tue.nl/sdf3/download/files/benchmarks/sdfg_throughput.zip
Expand All @@ -48,11 +48,11 @@ ${SDF3_BENCHMARK} : sdfg_throughput.zip
cd ${SDF3_BENCHMARK} && unzip graphs/graphs4/graphs.zip; for f in graph*.xml ; do mv $$f four_$$f ; done
cd ${SDF3_BENCHMARK} && rm graphs scripts sdfg_throughput.zip -rf

sdf.log: ./release/bin/kiter Makefile ${SDF3_BENCHMARK}
sdf.log: ./release/bin/kiter Makefile
rm -f $@
@echo "==============================================================================================="
@echo "==============================================================================================="
for f in ${SDF3_BENCHMARK}/*.xml ; do echo === $$f >> $@;echo === $$f ; ${KITER} -f $$f -a PeriodicThroughput -a 1PeriodicThroughput -a KPeriodicThroughput -a KBisPeriodicThroughput -a KTerPeriodicThroughput -a deGrooteThroughput >> $@ ; ${SDF3ANALYSIS_SDF} --graph $$f --algo throughput >> $@ || true ; done
for f in ${SDF3_BENCHMARK}/*.xml ; do echo === $$f >> $@;echo === $$f ; ${KITER} -f $$f -a PeriodicThroughput -a 1PeriodicThroughput -a KPeriodicThroughput -a deGrooteThroughput >> $@ ; if [ -d ${SDF3_BINARY_ROOT} ];then ${SDF3ANALYSIS_SDF} --graph $$f --algo throughput >> $@ || true ; fi ; done

release_build : release/Makefile
@echo "###########"" ENTER IN realease_build : release/Makefile #####################"
Expand Down
29 changes: 13 additions & 16 deletions src/kiter/main.cpp
Expand Up @@ -32,9 +32,9 @@ inline double tock() {
return diff;
}
//!< List of algorithms
#define ALGORITHMS_COUNT 12
algo_t algorithmslist[ALGORITHMS_COUNT] =
{
//#define ALGORITHMS_COUNT 10

std::vector<algo_t> algorithmslist = {

{ "1PeriodicThroughput" , "Optimal 1-Periodic Throughput evaluation of CSDF by K-Periodic scheduling method.",
algorithms::compute_1Kperiodic_throughput} ,
Expand All @@ -46,12 +46,8 @@ algo_t algorithmslist[ALGORITHMS_COUNT] =
algorithms::compute_NPeriodic_throughput} ,
{ "NCleanPeriodicThroughput" , "Optimal Throughput evaluation of SDF by using Munier1993 method combined with deGroote2012 reduction.",
algorithms::compute_NCleanPeriodic_throughput} ,
{ "KPeriodicThroughput" , "Optimal Throughput evaluation of CSDF by K-Periodic scheduling method 1.",
algorithms::compute_Kperiodic_throughput} ,
{ "KBisPeriodicThroughput" , "Optimal Throughput evaluation of CSDF by K-Periodic scheduling method 2.",
{ "KPeriodicThroughput" , "Optimal Throughput evaluation of CSDF by K-Periodic scheduling method 2.",
algorithms::compute_KperiodicBis_throughput} ,
{ "KTerPeriodicThroughput" , "Optimal Throughput evaluation of CSDF by K-Periodic scheduling method 3.",
algorithms::compute_KperiodicTer_throughput} ,
{ "PrintKPeriodicThroughput" , "Optimal Throughput evaluation of CSDF by K-Periodic scheduling method X with starting times.",
algorithms::print_kperiodic_scheduling} ,
{ "PrintInfos" , "Just print some graph informations.",
Expand All @@ -63,6 +59,8 @@ algo_t algorithmslist[ALGORITHMS_COUNT] =

};




inline void activate_verbose(const std::string p) {

Expand Down Expand Up @@ -132,26 +130,25 @@ int main (int argc, char **argv)

// Step 4 = Apply selected algorithm
bool nothing = true;
for (int i = 0 ; i < ALGORITHMS_COUNT ; i++) {
for ( std::vector<algo_t>::iterator lit = algorithmslist.begin() ; lit != algorithmslist.end() ; lit++ ) {
for ( std::vector<std::string>::iterator it = algos.begin() ; it != algos.end() ; it++ ) {
if (*it == algorithmslist[i].name) {
std::cout << "Run " << algorithmslist[i].name << std::endl;
if (*it == lit->name) {
std::cout << "Run " << lit->name << std::endl;
tock();
algorithmslist[i].fun(csdf,parameters);
lit->fun(csdf,parameters);
double duration = tock();
std::cout << algorithmslist[i].name << " duration=" << duration << std::endl;
std::cout << lit->name << " duration=" << duration << std::endl;
nothing = false;
}
}
}

if (nothing) {
std::cout << " Unsupported algorithm (-a NAME), list of supported algorithms is " << std::endl;
for (int j = 0 ; j < ALGORITHMS_COUNT ; j++) {
std::cout << " - " << algorithmslist[j].name << " : " << algorithmslist[j].desc << std::endl;
for ( std::vector<algo_t>::iterator lit = algorithmslist.begin() ; lit != algorithmslist.end() ; lit++ ) {
std::cout << " - " << lit->name << " : " << lit->desc << std::endl;
}
exit(1);

}

exit(0);
Expand Down
6 changes: 3 additions & 3 deletions src/libkiter/algorithms/kperiodic.cpp
Expand Up @@ -947,7 +947,7 @@ std::map<Vertex,EXEC_COUNT> algorithms::get_Kvector(models::Dataflow * const da
return kvector;
}

void algorithms::compute_Kperiodic_throughput (models::Dataflow* const dataflow, parameters_list_t) {
void algorithms::compute_KperiodicSlow_throughput (models::Dataflow* const dataflow, parameters_list_t) {

EXEC_COUNT iteration_count = 0;
VERBOSE_ASSERT(dataflow,TXT_NEVER_HAPPEND);
Expand Down Expand Up @@ -1006,7 +1006,7 @@ void algorithms::compute_Kperiodic_throughput (models::Dataflow* const datafl
* Compute K-periodic schedule by using an update module
*
*/
void algorithms::compute_KperiodicBis_throughput (models::Dataflow* const dataflow, parameters_list_t parameters ) {
void algorithms::compute_Kperiodic_throughput (models::Dataflow* const dataflow, parameters_list_t parameters ) {


VERBOSE_ASSERT(computeRepetitionVector(dataflow),"inconsistent graph");
Expand Down Expand Up @@ -1182,7 +1182,7 @@ void algorithms::compute_KperiodicBis_throughput (models::Dataflow* const dat
* Compute K-periodic schedule by using an update module
*
*/
void algorithms::compute_KperiodicTer_throughput (models::Dataflow* const dataflow, parameters_list_t) {
void algorithms::compute_KperiodicSlow2_throughput (models::Dataflow* const dataflow, parameters_list_t) {

EXEC_COUNT iteration_count = 0;
VERBOSE_ASSERT(dataflow,TXT_NEVER_HAPPEND);
Expand Down
3 changes: 0 additions & 3 deletions src/libkiter/algorithms/kperiodic.h
Expand Up @@ -29,9 +29,6 @@ models::EventGraph* generateKPeriodicEventGraph (models::Dataflow

std::map<Vertex,EXEC_COUNT> get_Kvector(models::Dataflow * const);
void compute_Kperiodic_throughput (models::Dataflow * const , parameters_list_t);
void compute_KperiodicBis_throughput (models::Dataflow * const , parameters_list_t);

void compute_KperiodicTer_throughput (models::Dataflow* const dataflow, parameters_list_t) ;

void compute_1Kperiodic_throughput (models::Dataflow* const dataflow, parameters_list_t);
void compute_2Kperiodic_throughput (models::Dataflow* const dataflow, parameters_list_t);
Expand Down

0 comments on commit 752ecc0

Please sign in to comment.