updated floyd-parallel.cc and Makefile

git-svn-id: svn://anubis/gvsu@198 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-10-13 22:23:56 +00:00
parent 9b33e87a49
commit ca07ad0be2
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
TARGETS := gen_adj_matrix
TARGETS += floyd-sequential
TARGETS += floyd-parallel
CXXFLAGS := -fopenmp
@ -9,7 +10,7 @@ OBJS := $(foreach target,$(TARGETS),$(target).o)
all: $(TARGETS)
$(TARGETS): $(OBJS)
$(CXX) -o $@ $@.o
$(CXX) -o $@ $@.o $(CXXFLAGS)
clean:
-rm -f *~ *.o $(TARGETS)

View File

@ -43,6 +43,7 @@ int main(int argc, char * argv[])
/* Run Floyd's Algorithm on D */
for (int k = 1; k <= num_verts; k++)
{
#pragma omp parallel for
for (int i = 0; i < num_verts; i++)
{
for (int j = 0; j < num_verts; j++)