B01 = B + nby2; B10 = B + nby2*N; B11 = B + nby2*N + nby2; left_half_lower_solve(B00, B10, LU, nby2, N); right_half_lower_solve(B01, B11, LU, nby2, N); } else if (n == min_block_size) { lower_solve_serial(B, LU, n, N); } else { printf("Error : [upper_solve] : n <= 0"); } } void left_half_lower_solve(double *B00, double *B10, double *LU, int n, int N) { double *L00, *L10, *L11; L00 = LU; L10 = LU + n*N; L11 = LU + n*N + n; lower_solve(B00, L00, n, N); schur(B10, B00, L10, n, N); lower_solve(B10, L11, n, N); } void right_half_lower_solve(double *B01, double *B11, double *L, int n, int N) { double *L00, *L10, *L11; L00 = L; L10 = L + n*N; L11 = L + n*N + n; lower_solve(B01, L00, n, N); schur(B11, B01, L10, n, N); lower_solve(B11, L11, n, N); } int main(int argc, char** argv) { int n = 16; int nby2 = n / 2; int i, j, k; int errorFlag; double sum; double *M1, *M2, *L, *U; double *M00, *M01, *M10, *M11; if(argc==2) { n = atoi(argv[1]); nby2 = n / 2; }
B01 = B + nby2; B10 = B + nby2*N; B11 = B + nby2*N + nby2; left_half_lower_solve(B00, B10, LU, nby2, N); right_half_lower_solve(B01, B11, LU, nby2, N); } else if (n == min_block_size) { lower_solve_serial(B, LU, n, N); } else { printf("Error : [upper_solve] : n <= 0"); } } void left_half_lower_solve(double *B00, double *B10, double *LU, int n, int N) { double *L00, *L10, *L11; L00 = LU; L10 = LU + n*N; L11 = LU + n*N + n; lower_solve(B00, L00, n, N); schur(B10, B00, L10, n, N); lower_solve(B10, L11, n, N); } void right_half_lower_solve(double *B01, double *B11, double *L, int n, int N) { double *L00, *L10, *L11; L00 = L; L10 = L + n*N; L11 = L + n*N + n; lower_solve(B01, L00, n, N); schur(B11, B01, L10, n, N); lower_solve(B11, L11, n, N); } int main(int argc, char** argv) { int n = 16; int nby2 = n / 2; int i, j, k; int errorFlag; double sum; double *M1, *M2, *L, *U; double *M00, *M01, *M10, *M11; if(argc==2) { n = atoi(argv[1]); nby2 = n / 2; }