0% found this document useful (0 votes)
79 views

HW1 - Report

The document summarizes the implementation of a parallel Julia set using a 1D array to represent a 2D grid. Each thread handles a single pixel cell by imagining a 1000x1000 grid where each block has one thread. The array index for the picture array is calculated as the block ID in rows plus the block ID in columns multiplied by the width, allowing each pixel to be stored and accessed with a unique block ID pair. Figure 1 shows the resulting image of the Julia set.

Uploaded by

Serhat Can
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

HW1 - Report

The document summarizes the implementation of a parallel Julia set using a 1D array to represent a 2D grid. Each thread handles a single pixel cell by imagining a 1000x1000 grid where each block has one thread. The array index for the picture array is calculated as the block ID in rows plus the block ID in columns multiplied by the width, allowing each pixel to be stored and accessed with a unique block ID pair. Figure 1 shows the resulting image of the Julia set.

Uploaded by

Serhat Can
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

PARALLEL COMPUTING 2

Homework # 1
Report

Manickam Somasundaram
Serhat Can

For this homework we were required to implement the Julia Set for given range. This set is being
printed on a 2D frame, with its real and imaginary values. Nevertheless, in the provided framework, the
function for posturizing is using a 1D array for generating the picture. This means we have to figure out
how to represent a 2D structure in a 1D fashion. Also each thread should handle a single pixel cell.
We solved this problem with imagining a 1000 by 1000 grid of blocks, with each block having a
single thread only, thus the whole frame would be executed with its each element simultaneously. Since
our construction of the parallelism for the Julia Set is as the explained way, our array index for the
picture array is as following:
= +
, where myJ variable stores the block ID of grid elements in rows, and myI variable is storing
the block ID of grid elements in columns. dimX variable is simply the x-direction size of the picture,
which is 1000. With the above formulation, each pixel cell of the picture is stored and thus accessed
with a unique block ID pair.
In figure 1, reader can find the solution to Julia Set:

Fig 1. Image of the Julia Set

You might also like