这是一个美国的并行算法C++案例,需要生成报告
1 Overview
You can find the template files by this invitation link
If you use cilk-based version, you need to use
singularity shell -B:/usr/local /usr/local/c7-silk-tbb.sif
to use singularity (note the additional -B:/usr/local argument above). This is to enable the access to the
graphs.
If you use non-cilk version, you can use this link:
https://classroom.github.com/a/x50jwboC
Descriptions of the files:
get time.h. This file includes functions for time testing. You don’t need to modify the file.
parse command line.h. This file includes functions to parse command line arguments. You don’t need
to modify the file.
bfs.cpp. This file is an example testing file for you. The actual testing code will be very similar, but
differs in how to generate input data. As you will see, the only function you need to implement is the
bfs function. When you test your own code, you can modify any files as you need, but please don’t
leave anything useful in this cpp file.
bfs.h. You need to implement your BFS function in this file. Of course you can add auxiliary functions
or variables, but please make sure to put all your code in this file.
makefile. This is also an example makefile to help you test your code. It is basically the same as
what we will use in final test. You can edit the file as you like. Also, do not put anything useful in
this file since that’s not used in the final test.
(if you use non-cilk-based version) scheduler.h and parallel.h. They provide the scheduler. You
don’t need to edit them.
In this project, you need to submit:
A mid-report on Wed, 02/21 (note that it’s 5 days later than the previous plan). In the mid report,
you need to report your current progress. The requirement of your mid report is to at least implement
a purely sparse or dense mode.
A final report on Fri 03/11. In the final report, you need to report how you implemented the entire
algorithm, what test data you designed and some testing result.
Your implementation of function bfs in bfs.h (just commit and push your changes to github).
The goal of your algorithm is to compute the BFS distance of all vertices to s, storing them in the array
dist[]. In this algorithm, you need to decide how to store (represent) the graph in memory on your own,
and thus you also need to write code to check the correctness of your own algorithm (e.g., compare the
distance with the output of a sequential BFS algorithm).