Question: 1. Write a c program to solve the SAME system of linear equations of C4.5.c by LU(lower-upper) decomposition with partial pivoting. 2. Write another c
1. Write a c program to solve the SAME system of linear equations of "C4.5.c" by LU(lower-upper) decomposition with partial pivoting. 2. Write another c program which does the same as the above only this time using pthreads (parallel programming). For N=8 use N concurrent pthreads.
------------------------------------------------Base Code: C4.5.c------------------------------------------------
/** C4.5.c: Gauss Elimination with Partial Pivoting **/ #include#include #include #include #define N 8 double A[N][N+1]; pthread_barrier_t barrier; int print_matrix() { int i, j; printf("------------------------------------ "); for(i=0; i temp){ temp = fabs(A[j][i]); prow = j; } } printf("pivot_row=%d pivot=%6.2f ", prow, A[prow][i]); if (prow != i){ // swap rows for (j=i; j =0; i--){ sum = 0.0; for (j=i+1; j ------------------------------------------------Base Code: C4.5.c------------------------------------------------
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
