Assignment 2
Assignment 2
Assignment Tasks
The parallel computing toolbox allows engineers and scientists across a wide variety of
industries to use multiple CPU cores and GPUs to significantly speed-up computationally
intensive problems and to work with large datasets.This toolbox lets us parallelized matlab
applications and Simulink simulations without changing our models or programming in low-
level languages like cuda or MPI by using high-level constructs. We can speed up MATLAB
applications by converting for loops to parallel for loops .These automatically distribute and run
several iterations simultaneously programs and models can run interactively or in batch many
functions and apps in MATLAB and add-on toolboxes run in parallel by simply turning on a
parallel option.
SIMD is a single interaction multiple data which is mean single single instruction is applied on
multiple data.It takes an operations specified in one instruction and applies it to more than one
set of data elements at the same time . A distributed array is one variable which is split across
multiple workers yet treated as a single entity.This is mainly of interest when working on a
cluster which then allows us to combine the memory of multiple machines to hold the data of
one variable.The changes required to convert our existing code to use distributed arrays or
minimal provided that the required functionality is implemented for distributed arrays .There are
different ways of creating distributed arrays such as the first one is to use matrix creation
functions like zeroes or and n to directly create distributed arrays you do this by just appending
distributed after the usual call as an alternative.
3.Run the given code files(under instruction section) and comment on observed results.
CODE:
1
2
OUTPUT:
REMARKS: I run this code 2 time, you can see both time, the processing time of serial
processing is more than the parallel processing. Because in the serial processing all work load is
on single processor that why its take more time but in parallel processing work in divided in
different processor that why its take less time. Although parallel processing is more efficient.