首页 > > 详细

DTS202TC编程辅导、辅导C/C++程序语言

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

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!