added PRINT_RESULT #define off by default
git-svn-id: svn://anubis/gvsu@199 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
ca07ad0be2
commit
2c6a3b5df0
@ -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)
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user