diff --git a/cs677/hw7/src/Makefile b/cs677/hw7/src/Makefile index acfb729..bd5a190 100644 --- a/cs677/hw7/src/Makefile +++ b/cs677/hw7/src/Makefile @@ -4,6 +4,7 @@ TARGETS += floyd-sequential TARGETS += floyd-parallel CXXFLAGS := -fopenmp +#CXXFLAGS += -DPRINT_RESULT OBJS := $(foreach target,$(TARGETS),$(target).o) diff --git a/cs677/hw7/src/floyd-parallel.cc b/cs677/hw7/src/floyd-parallel.cc index de777eb..1b169ca 100644 --- a/cs677/hw7/src/floyd-parallel.cc +++ b/cs677/hw7/src/floyd-parallel.cc @@ -64,6 +64,8 @@ int main(int argc, char * argv[]) } gettimeofday(&after, NULL); /* Stop timing */ + +#ifdef PRINT_RESULT cout << "Result:" << endl; /* Print out the final matrix */ for (int i = 0; i < num_verts; i++) @@ -77,6 +79,7 @@ int main(int argc, char * argv[]) } printf("\n"); } +#endif double time_before = before.tv_sec + before.tv_usec / 1000000.0; double time_after = after.tv_sec + after.tv_usec / 1000000.0; diff --git a/cs677/hw7/src/floyd-sequential.cc b/cs677/hw7/src/floyd-sequential.cc index f1effab..4bc862f 100644 --- a/cs677/hw7/src/floyd-sequential.cc +++ b/cs677/hw7/src/floyd-sequential.cc @@ -63,6 +63,8 @@ int main(int argc, char * argv[]) } gettimeofday(&after, NULL); /* Stop timing */ + +#ifdef PRINT_RESULT cout << "Result:" << endl; /* Print out the final matrix */ for (int i = 0; i < num_verts; i++) @@ -76,6 +78,7 @@ int main(int argc, char * argv[]) } printf("\n"); } +#endif double time_before = before.tv_sec + before.tv_usec / 1000000.0; double time_after = after.tv_sec + after.tv_usec / 1000000.0;