Question: Subject: Parallel and Distributed Computing Suppose we use a master process and 24 slave processes and partition in groups of 5 rows. Each slave process
Subject: Parallel and Distributed Computing
Suppose we use a master process and 24 slave processes and partition in groups of 5 rows. Each slave process processes one 320 x 5 area, returning the new coordinates to the master for displaying. If the transformation is shifting, as described in (a) previously, a master-slave approach could start with the master sending the first row number of the 5 rows to be processes by each process. Upon receiving its row number, each process steps through each pixel coordinate in its group of rows, transforming the coordinates and sending then old and new coordinates back to the master. For the simplicity, this could be done with individual messages rather than a single message. The master updates the bitmap. The size of image is 320 x 240. Let the original bitmap be held the in the array map[][]. A temporary bitmap is declared temp_map[][]. Usually, the coordinate systems of the display has its origin at the top left corner. It is simple matter to transform an image with its origin at the lower-left corner to the display coordinate systems. You must use MPI instruction and the language you choose. Write a MPI-C program or pseudo-code to implement the concept described above.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
