C++代写|CS214 Project #1


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

If you use non-cilk version, you can use this link:


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).


本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: itcsdx@outlook.com  微信:itcsdx