Vous êtes sur la page 1sur 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

Vous aimerez peut-être aussi