Algorithms For Parallel Machines
Algorithms For Parallel Machines
Algorithms For Parallel Machines
3) Histogram Computation
Histogram[i] = 0;
Color = image[i][j];
Histogram[color]++;
Mutex_begin();
Color = image[i][j];
Histogram[color]++;
Mutex_end();
}
Still above program takes longer than the previous one to execute
due to use of mutex.
Color = image[i][j];
Hist[color][k]++;
4) Parallel reduction :
5) Quadrature Problems :
For a function of type y=f(x) , we want to find the area under the
curve.
EG : Trapezoidal Rule.
Problems :
Complexity Increases.
The algorithm is :
6.Matrix Multiplication
Sequential algorithm for matrix multiplication