CS计算机代考程序代写 AI algorithm XJTLU Entrepreneur College (Taicang) Cover Sheet

XJTLU Entrepreneur College (Taicang) Cover Sheet

Module code and Title DTS202TC Foundation of Parallel Computing
School Title School of AI and Advanced Computing
Assignment Title Group Assessment 1
Submission Deadline Oct 10th, 2021 @ 23:59
Final Word Count N/A
If you agree to let the university use your work anonymously for teaching
and learning purposes, please type “yes” here.

I certify that I have read and understood the University’s Policy for dealing with Plagiarism,
Collusion and the Fabrication of Data (available on Learning Mall Online). With reference to this
policy I certify that:

• My work does not contain any instances of plagiarism and/or collusion.
My work does not contain any fabricated data.

By uploading my assignment onto Learning Mall Online, I formally declare
that all of the above information is true to the best of my knowledge and
belief.

Scoring – For Tutor Use
Student ID

Stage of
Marking

Marker
Code

Learning Outcomes Achieved (F/P/M/D)
(please modify as appropriate)

Final
Score

A B C
1st Marker – red
pen

Moderation

– green pen

IM

Initials

The original mark has been accepted by the moderator
(please circle as appropriate):

Y / N

Data entry and score calculation have been checked by
another tutor (please circle):

Y

2nd Marker if
needed – green
pen

For Academic Office Use Possible Academic Infringement (please tick as appropriate)
Date
Received

Days
late

Late
Penalty

☐ Category A
Total Academic Infringement Penalty
(A,B, C, D, E, Please modify where
necessary) _____________________

☐ Category B
☐ Category C
☐ Category D
☐ Category E

School of Artificial Intelligence and Advanced Computing
Xi’an Jiaotong-Liverpool University

DTS202TC Foundation of Parallel Computing

Group Assignment 1

Due: Sunday Oct 10th, 2021 @ 11:59pm
Weight: 20%
Maximum score: 100 marks (60 group marks + 40 individual marks)

Overview

The purpose of this assignment is to gain experience in C programming and parallel computing
design. You are expected to write a C program to blur a grey-scale image in serial (no parallelism),
and provide the design planning to speed up the serial implementation with parallel programming.

Tasks

Image blurring is one of the most common image processing algorithms. A simplest way to blur an
image is to set each pixel to the mean of its neighbour pixels. One of the problems of this algorithm
is that the effect may not be visible for large images, to solve this, we can repeat the process multiple
times.

54 53

51 54

51

50

38 38 46

(54+53+51+51+50+38
+38+46) / 8 = 48

54 53

51 48

51

50

38 38 46

1 Serial Version (30 marks)

Plain PGM format is a simple grayscale graphic image
format, each pixel is represented by its grey value
number, with 0 being black and Maxval (defined in the
PGM file) being white. The bellow image.pgm is given
as an example, more detail pgm specifications can be
found at http://davis.lbl.gov/Manuals/
NETPBM/doc/pgm.html

image.pgm

P2
24 7
15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 3 3 3 3 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 15 15 15 0

2

http://davis.lbl.gov/Manuals/NETPBM/doc/pgm.html
http://davis.lbl.gov/Manuals/NETPBM/doc/pgm.html

0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 15 0
0 3 3 3 0 0 0 7 7 7 0 0 0 11 11 11 0 0 0 15 15 15 15 0
0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0
0 3 0 0 0 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Write a C program to read the given im.pgm grayscale image, in order to be able to visualise the
blurring effect, repeat the blurring process 20 times, then output the blurry image to im-blur.pgm.

Your program should be compiled and executed by:

make
./blurimage

2 Parallel Design (30 marks)

Now that you have a complete understanding of the task, do the following:

� analyse the performance of your serial program by printing out the execution time of the core
algorithm. (5 marks), and

� provide a design of a solution to speed up using parallel programming (25 marks).

You do not need to do the actual coding, but only provide the detailed design with maximum 200
words.

3 Peer Review (40 marks)

Please review your peers based on the actual contributions. This will be done on LMO anonymously,
each of the group members should login their LMO account and submit the marks individually.
Marks should be submitted as soon as the group work submission is done. Peer review rubrics are
attached in the appendix table.

4 Submission

One of the group members must submit the following files:

� Cover letter with the student ID of all group members (template can be found on LMO).

� blurimage.c Your serial implementation.

� A Makefile that will compile your code, make sure the output executable names are correct.

� A pdf file contains all the source code and the parallel design.

Once you have all the files, please put them in a single directory (named groupid-assign1) and
compress it to .zip file.

Please note that quality of code, quality of report and correctness of submission will also be marked.

3

Table 1: Peer Review Rubrics

Marks 8 6 4 2

Contributions Routinely provides
useful ideas when
participating in the
group discussion.
A leader who
contributes a lot of
effort.

Usually provides
useful ideas when
participating in the
group discussion.
A strong group
member who tries
hard!

Sometimes
provides useful
ideas when
participating in the
group discussion. A
satisfactory group
member who does
what is required.

Rarely provides
useful ideas when
participating in the
group discussion.
May refuse to
participate.

Problem-
solving

Actively looks
for and suggests
solutions to
problems.

Refines solutions
suggested by
others.

Does not suggest or
refine solutions, but
is willing to try out
solutions suggested
by others.

Does not try to
solve problems or
help others solve
problems. Lets
others do the work.

Attitude Is never publicly
critical of the
project or the work
of others. Always
has a positive
attitude about the
task(s).

Is rarely publicly
critical of the
project or the work
of others. Often has
a positive attitude
about the task(s).

Is occasionally
publicly critical
of the project or
the work of other
members of the
group. Usually has
a positive attitude
about the task(s).

Is often publicly
critical of the
project or the work
of other members
of the group. Is
often negative
about the task(s).

Focus on the
task

Consistently stays
focused on the task
and what needs
to be done. Very
selfdirected.

Focuses on the task
and what needs to
be done most of the
time. Other group
members can count
on this person.

Focuses on the task
and what needs to
be done some of
the time. Other
group members
must sometimes
nag, prod, and
remind to keep this
person on task.

Rarely focuses on
the task and what
needs to be done.
Lets others do the
work.

Working with
others

Almost always
listens to, shares
with, and supports
the efforts of
others. Tries
to keep people
working well
together.

Usually listens to,
shares, with, and
supports the efforts
of others. Does not
cause “waves” in the
group.

Often listens to,
shares with, and
supports the efforts
of others, but
sometimes is not a
good team member.

Rarely listens to,
shares with, and
supports the efforts
of others. Often
is not a good team
player.

4

Serial Version (30 marks)
Parallel Design (30 marks)
Peer Review (40 marks)
Submission