22 #include "common/common.h"
70 pastix_int_t stride = cblkA->
stride;
71 float normdiff, normfull, normlowr, res, eps;
75 assert( stride == cblkB->
stride );
77 eps = LAPACKE_slamch_work(
'e' );
83 assert( (coefA != NULL) && (coefB != NULL) );
85 normfull = LAPACKE_slange_work( LAPACK_COL_MAJOR,
'f', stride, ncols,
86 coefA, stride, NULL );
87 normlowr = LAPACKE_slange_work( LAPACK_COL_MAJOR,
'f', stride, ncols,
88 coefB, stride, NULL );
93 normdiff = LAPACKE_slange_work( LAPACK_COL_MAJOR,
'M', stride, ncols,
94 coefB, stride, NULL );
95 res = (normfull == 0.) ? 0. : (normdiff / (normfull * eps));
98 fprintf(stderr,
"KO on L: ||full(A)||_f=%e, ||comp(A)||_f=%e, ||comp(A)-full(A)||_0=%e, ||comp(A)-full(A)||_0 / (||full(A)||_2 * eps)=%e\n",
99 normfull, normlowr, normdiff, res );
108 assert( (coefA != NULL) && (coefB != NULL) );
110 normfull = LAPACKE_slange_work( LAPACK_COL_MAJOR,
'f', stride, ncols,
111 coefA, stride, NULL );
112 normlowr = LAPACKE_slange_work( LAPACK_COL_MAJOR,
'f', stride, ncols,
113 coefB, stride, NULL );
118 normdiff = LAPACKE_slange_work( LAPACK_COL_MAJOR,
'M', stride, ncols,
119 coefB, stride, NULL );
120 res = (normfull == 0.) ? 0. : (normdiff / (normfull * eps));
123 fprintf(stderr,
"KO on U: ||full(A)||_f=%e, ||comp(A)||_f=%e, ||comp(A)-full(A)||_0=%e, ||comp(A)-full(A)||_0 / (||full(A)||_2 * eps)=%e\n",
124 normfull, normlowr, normdiff, res );