42 float eps = LAPACKE_slamch_work(
'e');
53 work = (
float *)malloc(k *
sizeof(
float));
67 *Rnorm = LAPACKE_clange_work(LAPACK_COL_MAJOR,
'm', 1, k, W, 1, work);
69 if ( (*Rnorm / (M*N)) > eps) {
84 " - N : number of columns\n");
89 int arg_n = atoi(argv[0]);
97 int info_solution = 0;
101 int m, l,
storev, incx, incy;
104 float eps = LAPACKE_slamch_work(
'e');
114 LAPACKE_clarnv_work(1,
ISEED, 1, &alpha0);
115 LAPACKE_clarnv_work(1,
ISEED, 1, &beta0 );
118 if ( (!A) || (!X) || (!Y0) || (!work) ) {
119 printf(
"Out of Memory \n ");
129 printf(
"------ TESTS FOR PLASMA CPEMV ROUTINE ------- \n");
131 printf(
" The matrix A is randomly generated for each test.\n");
132 printf(
" The relative machine precision (eps) is %e \n",eps);
133 printf(
" Computational tests pass if scaled residual is less than eps.\n");
137 for (i=0; i<6; i++) {
141 case 0: l = 0; m = arg_n; n = m;
break;
142 case 1: l = 0; m = arg_n; n = arg_n/2;
break;
143 case 2: l = arg_n; m = l; n = l;
break;
144 case 3: l = arg_n/2; m = l; n = arg_n;
break;
145 case 4: l = arg_n/2; m = arg_n-l; n = l;
break;
146 case 5: l = arg_n/3; m = arg_n-l; n = arg_n/2;
break;
151 for (t=0; t<3; t++) {
153 for (t=0; t<2; t++) {
161 LAPACKE_clacpy_work( LAPACK_COL_MAJOR,
'A', m, n,
170 for (j=(n-l); j<n; j++) {
171 for (i=0; i<(j-(n-l)); i++) {
182 for (j=0; j<(l-1); j++) {
183 for (i=(m-l+1+j); i<m; i++) {
189 for (j=0; j<3; j++) {
192 alpha = ( j==1 ) ? 0.0 : alpha0;
193 beta = ( j==2 ) ? 0.0 : beta0;
196 for (k=0; k<4; k++) {
198 case 0: incx = 1; incy = 1;
break;
199 case 1: incx = 1; incy = lda;
break;
200 case 2: incx = lda; incy = 1;
break;
201 case 3: incx = lda; incy = lda;
break;
223 if ( info_solution != 0 ) {
225 printf(
"Failed: t=%s, s=%s, M=%3d, N=%3d, L=%3d, alpha=%e, incx=%3d, beta=%e, incy=%3d, rnorm=%e\n",
226 transstr[t], cstorev, m, n, l, crealf(alpha), incx, crealf(beta), incy, rnorm );
235 printf(
"%d / %d tests failed\n", nfails, nbtests);
237 printf(
"***************************************************\n");
239 printf(
" ---- TESTING CPEMV ...... PASSED !\n");
242 printf(
" ---- TESTING CPEMV ... FAILED !\n");
244 printf(
"***************************************************\n");