added PRINT_RESULT #define off by default

git-svn-id: svn://anubis/gvsu@199 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-10-13 22:27:08 +00:00
parent ca07ad0be2
commit 2c6a3b5df0
3 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@ TARGETS += floyd-sequential
TARGETS += floyd-parallel TARGETS += floyd-parallel
CXXFLAGS := -fopenmp CXXFLAGS := -fopenmp
#CXXFLAGS += -DPRINT_RESULT
OBJS := $(foreach target,$(TARGETS),$(target).o) OBJS := $(foreach target,$(TARGETS),$(target).o)

View File

@ -64,6 +64,8 @@ int main(int argc, char * argv[])
} }
gettimeofday(&after, NULL); /* Stop timing */ gettimeofday(&after, NULL); /* Stop timing */
#ifdef PRINT_RESULT
cout << "Result:" << endl; cout << "Result:" << endl;
/* Print out the final matrix */ /* Print out the final matrix */
for (int i = 0; i < num_verts; i++) for (int i = 0; i < num_verts; i++)
@ -77,6 +79,7 @@ int main(int argc, char * argv[])
} }
printf("\n"); printf("\n");
} }
#endif
double time_before = before.tv_sec + before.tv_usec / 1000000.0; double time_before = before.tv_sec + before.tv_usec / 1000000.0;
double time_after = after.tv_sec + after.tv_usec / 1000000.0; double time_after = after.tv_sec + after.tv_usec / 1000000.0;

View File

@ -63,6 +63,8 @@ int main(int argc, char * argv[])
} }
gettimeofday(&after, NULL); /* Stop timing */ gettimeofday(&after, NULL); /* Stop timing */
#ifdef PRINT_RESULT
cout << "Result:" << endl; cout << "Result:" << endl;
/* Print out the final matrix */ /* Print out the final matrix */
for (int i = 0; i < num_verts; i++) for (int i = 0; i < num_verts; i++)
@ -76,6 +78,7 @@ int main(int argc, char * argv[])
} }
printf("\n"); printf("\n");
} }
#endif
double time_before = before.tv_sec + before.tv_usec / 1000000.0; double time_before = before.tv_sec + before.tv_usec / 1000000.0;
double time_after = after.tv_sec + after.tv_usec / 1000000.0; double time_after = after.tv_sec + after.tv_usec / 1000000.0;