00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #include <stdio.h>
00050 #include "lapacke.h"
00051 #include "lapacke_utils.h"
00052 #include "test_utils.h"
00053
00054 static void init_scalars_zbdsqr( char *uplo, lapack_int *n, lapack_int *ncvt,
00055 lapack_int *nru, lapack_int *ncc,
00056 lapack_int *ldvt, lapack_int *ldu,
00057 lapack_int *ldc );
00058 static void init_d( lapack_int size, double *d );
00059 static void init_e( lapack_int size, double *e );
00060 static void init_vt( lapack_int size, lapack_complex_double *vt );
00061 static void init_u( lapack_int size, lapack_complex_double *u );
00062 static void init_c( lapack_int size, lapack_complex_double *c );
00063 static void init_work( lapack_int size, double *work );
00064 static int compare_zbdsqr( double *d, double *d_i, double *e, double *e_i,
00065 lapack_complex_double *vt,
00066 lapack_complex_double *vt_i,
00067 lapack_complex_double *u, lapack_complex_double *u_i,
00068 lapack_complex_double *c, lapack_complex_double *c_i,
00069 lapack_int info, lapack_int info_i, lapack_int ldc,
00070 lapack_int ldu, lapack_int ldvt, lapack_int n,
00071 lapack_int ncc, lapack_int ncvt, lapack_int nru );
00072
00073 int main(void)
00074 {
00075
00076 char uplo, uplo_i;
00077 lapack_int n, n_i;
00078 lapack_int ncvt, ncvt_i;
00079 lapack_int nru, nru_i;
00080 lapack_int ncc, ncc_i;
00081 lapack_int ldvt, ldvt_i;
00082 lapack_int ldvt_r;
00083 lapack_int ldu, ldu_i;
00084 lapack_int ldu_r;
00085 lapack_int ldc, ldc_i;
00086 lapack_int ldc_r;
00087 lapack_int info, info_i;
00088 lapack_int i;
00089 int failed;
00090
00091
00092 double *d = NULL, *d_i = NULL;
00093 double *e = NULL, *e_i = NULL;
00094 lapack_complex_double *vt = NULL, *vt_i = NULL;
00095 lapack_complex_double *u = NULL, *u_i = NULL;
00096 lapack_complex_double *c = NULL, *c_i = NULL;
00097 double *work = NULL, *work_i = NULL;
00098 double *d_save = NULL;
00099 double *e_save = NULL;
00100 lapack_complex_double *vt_save = NULL;
00101 lapack_complex_double *u_save = NULL;
00102 lapack_complex_double *c_save = NULL;
00103 lapack_complex_double *vt_r = NULL;
00104 lapack_complex_double *u_r = NULL;
00105 lapack_complex_double *c_r = NULL;
00106
00107
00108 init_scalars_zbdsqr( &uplo, &n, &ncvt, &nru, &ncc, &ldvt, &ldu, &ldc );
00109 ldvt_r = ncvt+2;
00110 ldu_r = n+2;
00111 ldc_r = ncc+2;
00112 uplo_i = uplo;
00113 n_i = n;
00114 ncvt_i = ncvt;
00115 nru_i = nru;
00116 ncc_i = ncc;
00117 ldvt_i = ldvt;
00118 ldu_i = ldu;
00119 ldc_i = ldc;
00120
00121
00122 d = (double *)LAPACKE_malloc( n * sizeof(double) );
00123 e = (double *)LAPACKE_malloc( n * sizeof(double) );
00124 vt = (lapack_complex_double *)
00125 LAPACKE_malloc( ldvt*ncvt * sizeof(lapack_complex_double) );
00126 u = (lapack_complex_double *)
00127 LAPACKE_malloc( ldu*n * sizeof(lapack_complex_double) );
00128 c = (lapack_complex_double *)
00129 LAPACKE_malloc( ldc*ncc * sizeof(lapack_complex_double) );
00130 work = (double *)LAPACKE_malloc( 4*n * sizeof(double) );
00131
00132
00133 d_i = (double *)LAPACKE_malloc( n * sizeof(double) );
00134 e_i = (double *)LAPACKE_malloc( n * sizeof(double) );
00135 vt_i = (lapack_complex_double *)
00136 LAPACKE_malloc( ldvt*ncvt * sizeof(lapack_complex_double) );
00137 u_i = (lapack_complex_double *)
00138 LAPACKE_malloc( ldu*n * sizeof(lapack_complex_double) );
00139 c_i = (lapack_complex_double *)
00140 LAPACKE_malloc( ldc*ncc * sizeof(lapack_complex_double) );
00141 work_i = (double *)LAPACKE_malloc( 4*n * sizeof(double) );
00142
00143
00144 d_save = (double *)LAPACKE_malloc( n * sizeof(double) );
00145 e_save = (double *)LAPACKE_malloc( n * sizeof(double) );
00146 vt_save = (lapack_complex_double *)
00147 LAPACKE_malloc( ldvt*ncvt * sizeof(lapack_complex_double) );
00148 u_save = (lapack_complex_double *)
00149 LAPACKE_malloc( ldu*n * sizeof(lapack_complex_double) );
00150 c_save = (lapack_complex_double *)
00151 LAPACKE_malloc( ldc*ncc * sizeof(lapack_complex_double) );
00152
00153
00154 vt_r = (lapack_complex_double *)
00155 LAPACKE_malloc( n*(ncvt+2) * sizeof(lapack_complex_double) );
00156 u_r = (lapack_complex_double *)
00157 LAPACKE_malloc( nru*(n+2) * sizeof(lapack_complex_double) );
00158 c_r = (lapack_complex_double *)
00159 LAPACKE_malloc( n*(ncc+2) * sizeof(lapack_complex_double) );
00160
00161
00162 init_d( n, d );
00163 init_e( n, e );
00164 init_vt( ldvt*ncvt, vt );
00165 init_u( ldu*n, u );
00166 init_c( ldc*ncc, c );
00167 init_work( 4*n, work );
00168
00169
00170 for( i = 0; i < n; i++ ) {
00171 d_save[i] = d[i];
00172 }
00173 for( i = 0; i < n; i++ ) {
00174 e_save[i] = e[i];
00175 }
00176 for( i = 0; i < ldvt*ncvt; i++ ) {
00177 vt_save[i] = vt[i];
00178 }
00179 for( i = 0; i < ldu*n; i++ ) {
00180 u_save[i] = u[i];
00181 }
00182 for( i = 0; i < ldc*ncc; i++ ) {
00183 c_save[i] = c[i];
00184 }
00185
00186
00187 zbdsqr_( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt, &ldvt, u, &ldu, c, &ldc,
00188 work, &info );
00189
00190
00191
00192 for( i = 0; i < n; i++ ) {
00193 d_i[i] = d_save[i];
00194 }
00195 for( i = 0; i < n; i++ ) {
00196 e_i[i] = e_save[i];
00197 }
00198 for( i = 0; i < ldvt*ncvt; i++ ) {
00199 vt_i[i] = vt_save[i];
00200 }
00201 for( i = 0; i < ldu*n; i++ ) {
00202 u_i[i] = u_save[i];
00203 }
00204 for( i = 0; i < ldc*ncc; i++ ) {
00205 c_i[i] = c_save[i];
00206 }
00207 for( i = 0; i < 4*n; i++ ) {
00208 work_i[i] = work[i];
00209 }
00210 info_i = LAPACKE_zbdsqr_work( LAPACK_COL_MAJOR, uplo_i, n_i, ncvt_i, nru_i,
00211 ncc_i, d_i, e_i, vt_i, ldvt_i, u_i, ldu_i,
00212 c_i, ldc_i, work_i );
00213
00214 failed = compare_zbdsqr( d, d_i, e, e_i, vt, vt_i, u, u_i, c, c_i, info,
00215 info_i, ldc, ldu, ldvt, n, ncc, ncvt, nru );
00216 if( failed == 0 ) {
00217 printf( "PASSED: column-major middle-level interface to zbdsqr\n" );
00218 } else {
00219 printf( "FAILED: column-major middle-level interface to zbdsqr\n" );
00220 }
00221
00222
00223
00224 for( i = 0; i < n; i++ ) {
00225 d_i[i] = d_save[i];
00226 }
00227 for( i = 0; i < n; i++ ) {
00228 e_i[i] = e_save[i];
00229 }
00230 for( i = 0; i < ldvt*ncvt; i++ ) {
00231 vt_i[i] = vt_save[i];
00232 }
00233 for( i = 0; i < ldu*n; i++ ) {
00234 u_i[i] = u_save[i];
00235 }
00236 for( i = 0; i < ldc*ncc; i++ ) {
00237 c_i[i] = c_save[i];
00238 }
00239 for( i = 0; i < 4*n; i++ ) {
00240 work_i[i] = work[i];
00241 }
00242 info_i = LAPACKE_zbdsqr( LAPACK_COL_MAJOR, uplo_i, n_i, ncvt_i, nru_i,
00243 ncc_i, d_i, e_i, vt_i, ldvt_i, u_i, ldu_i, c_i,
00244 ldc_i );
00245
00246 failed = compare_zbdsqr( d, d_i, e, e_i, vt, vt_i, u, u_i, c, c_i, info,
00247 info_i, ldc, ldu, ldvt, n, ncc, ncvt, nru );
00248 if( failed == 0 ) {
00249 printf( "PASSED: column-major high-level interface to zbdsqr\n" );
00250 } else {
00251 printf( "FAILED: column-major high-level interface to zbdsqr\n" );
00252 }
00253
00254
00255
00256 for( i = 0; i < n; i++ ) {
00257 d_i[i] = d_save[i];
00258 }
00259 for( i = 0; i < n; i++ ) {
00260 e_i[i] = e_save[i];
00261 }
00262 for( i = 0; i < ldvt*ncvt; i++ ) {
00263 vt_i[i] = vt_save[i];
00264 }
00265 for( i = 0; i < ldu*n; i++ ) {
00266 u_i[i] = u_save[i];
00267 }
00268 for( i = 0; i < ldc*ncc; i++ ) {
00269 c_i[i] = c_save[i];
00270 }
00271 for( i = 0; i < 4*n; i++ ) {
00272 work_i[i] = work[i];
00273 }
00274
00275 if( ncvt != 0 ) {
00276 LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncvt, vt_i, ldvt, vt_r,
00277 ncvt+2 );
00278 }
00279 if( nru != 0 ) {
00280 LAPACKE_zge_trans( LAPACK_COL_MAJOR, nru, n, u_i, ldu, u_r, n+2 );
00281 }
00282 if( ncc != 0 ) {
00283 LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncc, c_i, ldc, c_r, ncc+2 );
00284 }
00285 info_i = LAPACKE_zbdsqr_work( LAPACK_ROW_MAJOR, uplo_i, n_i, ncvt_i, nru_i,
00286 ncc_i, d_i, e_i, vt_r, ldvt_r, u_r, ldu_r,
00287 c_r, ldc_r, work_i );
00288
00289 if( ncvt != 0 ) {
00290 LAPACKE_zge_trans( LAPACK_ROW_MAJOR, n, ncvt, vt_r, ncvt+2, vt_i,
00291 ldvt );
00292 }
00293 if( nru != 0 ) {
00294 LAPACKE_zge_trans( LAPACK_ROW_MAJOR, nru, n, u_r, n+2, u_i, ldu );
00295 }
00296 if( ncc != 0 ) {
00297 LAPACKE_zge_trans( LAPACK_ROW_MAJOR, n, ncc, c_r, ncc+2, c_i, ldc );
00298 }
00299
00300 failed = compare_zbdsqr( d, d_i, e, e_i, vt, vt_i, u, u_i, c, c_i, info,
00301 info_i, ldc, ldu, ldvt, n, ncc, ncvt, nru );
00302 if( failed == 0 ) {
00303 printf( "PASSED: row-major middle-level interface to zbdsqr\n" );
00304 } else {
00305 printf( "FAILED: row-major middle-level interface to zbdsqr\n" );
00306 }
00307
00308
00309
00310 for( i = 0; i < n; i++ ) {
00311 d_i[i] = d_save[i];
00312 }
00313 for( i = 0; i < n; i++ ) {
00314 e_i[i] = e_save[i];
00315 }
00316 for( i = 0; i < ldvt*ncvt; i++ ) {
00317 vt_i[i] = vt_save[i];
00318 }
00319 for( i = 0; i < ldu*n; i++ ) {
00320 u_i[i] = u_save[i];
00321 }
00322 for( i = 0; i < ldc*ncc; i++ ) {
00323 c_i[i] = c_save[i];
00324 }
00325 for( i = 0; i < 4*n; i++ ) {
00326 work_i[i] = work[i];
00327 }
00328
00329
00330 if( ncvt != 0 ) {
00331 LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncvt, vt_i, ldvt, vt_r,
00332 ncvt+2 );
00333 }
00334 if( nru != 0 ) {
00335 LAPACKE_zge_trans( LAPACK_COL_MAJOR, nru, n, u_i, ldu, u_r, n+2 );
00336 }
00337 if( ncc != 0 ) {
00338 LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncc, c_i, ldc, c_r, ncc+2 );
00339 }
00340 info_i = LAPACKE_zbdsqr( LAPACK_ROW_MAJOR, uplo_i, n_i, ncvt_i, nru_i,
00341 ncc_i, d_i, e_i, vt_r, ldvt_r, u_r, ldu_r, c_r,
00342 ldc_r );
00343
00344 if( ncvt != 0 ) {
00345 LAPACKE_zge_trans( LAPACK_ROW_MAJOR, n, ncvt, vt_r, ncvt+2, vt_i,
00346 ldvt );
00347 }
00348 if( nru != 0 ) {
00349 LAPACKE_zge_trans( LAPACK_ROW_MAJOR, nru, n, u_r, n+2, u_i, ldu );
00350 }
00351 if( ncc != 0 ) {
00352 LAPACKE_zge_trans( LAPACK_ROW_MAJOR, n, ncc, c_r, ncc+2, c_i, ldc );
00353 }
00354
00355 failed = compare_zbdsqr( d, d_i, e, e_i, vt, vt_i, u, u_i, c, c_i, info,
00356 info_i, ldc, ldu, ldvt, n, ncc, ncvt, nru );
00357 if( failed == 0 ) {
00358 printf( "PASSED: row-major high-level interface to zbdsqr\n" );
00359 } else {
00360 printf( "FAILED: row-major high-level interface to zbdsqr\n" );
00361 }
00362
00363
00364 if( d != NULL ) {
00365 LAPACKE_free( d );
00366 }
00367 if( d_i != NULL ) {
00368 LAPACKE_free( d_i );
00369 }
00370 if( d_save != NULL ) {
00371 LAPACKE_free( d_save );
00372 }
00373 if( e != NULL ) {
00374 LAPACKE_free( e );
00375 }
00376 if( e_i != NULL ) {
00377 LAPACKE_free( e_i );
00378 }
00379 if( e_save != NULL ) {
00380 LAPACKE_free( e_save );
00381 }
00382 if( vt != NULL ) {
00383 LAPACKE_free( vt );
00384 }
00385 if( vt_i != NULL ) {
00386 LAPACKE_free( vt_i );
00387 }
00388 if( vt_r != NULL ) {
00389 LAPACKE_free( vt_r );
00390 }
00391 if( vt_save != NULL ) {
00392 LAPACKE_free( vt_save );
00393 }
00394 if( u != NULL ) {
00395 LAPACKE_free( u );
00396 }
00397 if( u_i != NULL ) {
00398 LAPACKE_free( u_i );
00399 }
00400 if( u_r != NULL ) {
00401 LAPACKE_free( u_r );
00402 }
00403 if( u_save != NULL ) {
00404 LAPACKE_free( u_save );
00405 }
00406 if( c != NULL ) {
00407 LAPACKE_free( c );
00408 }
00409 if( c_i != NULL ) {
00410 LAPACKE_free( c_i );
00411 }
00412 if( c_r != NULL ) {
00413 LAPACKE_free( c_r );
00414 }
00415 if( c_save != NULL ) {
00416 LAPACKE_free( c_save );
00417 }
00418 if( work != NULL ) {
00419 LAPACKE_free( work );
00420 }
00421 if( work_i != NULL ) {
00422 LAPACKE_free( work_i );
00423 }
00424
00425 return 0;
00426 }
00427
00428
00429 static void init_scalars_zbdsqr( char *uplo, lapack_int *n, lapack_int *ncvt,
00430 lapack_int *nru, lapack_int *ncc,
00431 lapack_int *ldvt, lapack_int *ldu,
00432 lapack_int *ldc )
00433 {
00434 *uplo = 'U';
00435 *n = 4;
00436 *ncvt = 4;
00437 *nru = 6;
00438 *ncc = 0;
00439 *ldvt = 8;
00440 *ldu = 8;
00441 *ldc = 8;
00442
00443 return;
00444 }
00445
00446
00447 static void init_d( lapack_int size, double *d ) {
00448 lapack_int i;
00449 for( i = 0; i < size; i++ ) {
00450 d[i] = 0;
00451 }
00452 d[0] = -3.08700502105195800e+000;
00453 d[1] = 2.06603927667906850e+000;
00454 d[2] = 1.87312889112571160e+000;
00455 d[3] = 2.00218286620699090e+000;
00456 }
00457 static void init_e( lapack_int size, double *e ) {
00458 lapack_int i;
00459 for( i = 0; i < size; i++ ) {
00460 e[i] = 0;
00461 }
00462 e[0] = 2.11257100745583950e+000;
00463 e[1] = 1.26281010665522400e+000;
00464 e[2] = -1.61263387280039260e+000;
00465 e[3] = 0.00000000000000000e+000;
00466 }
00467 static void init_vt( lapack_int size, lapack_complex_double *vt ) {
00468 lapack_int i;
00469 for( i = 0; i < size; i++ ) {
00470 vt[i] = lapack_make_complex_double( 0.0, 0.0 );
00471 }
00472 vt[0] = lapack_make_complex_double( 1.00000000000000000e+000,
00473 0.00000000000000000e+000 );
00474 vt[8] = lapack_make_complex_double( 0.00000000000000000e+000,
00475 0.00000000000000000e+000 );
00476 vt[16] = lapack_make_complex_double( 0.00000000000000000e+000,
00477 0.00000000000000000e+000 );
00478 vt[24] = lapack_make_complex_double( 0.00000000000000000e+000,
00479 0.00000000000000000e+000 );
00480 vt[1] = lapack_make_complex_double( 0.00000000000000000e+000,
00481 0.00000000000000000e+000 );
00482 vt[9] = lapack_make_complex_double( -2.31234531617601880e-001,
00483 -5.40426381454295000e-001 );
00484 vt[17] = lapack_make_complex_double( 1.78624075518133200e-001,
00485 -5.88728024331977130e-001 );
00486 vt[25] = lapack_make_complex_double( -4.04798435024739940e-001,
00487 -3.34814721344187110e-001 );
00488 vt[2] = lapack_make_complex_double( 0.00000000000000000e+000,
00489 0.00000000000000000e+000 );
00490 vt[10] = lapack_make_complex_double( 4.96225984754380510e-001,
00491 2.64807608556462020e-001 );
00492 vt[18] = lapack_make_complex_double( -3.55623105209443960e-001,
00493 -6.88816765203852820e-001 );
00494 vt[26] = lapack_make_complex_double( 2.75655244497366060e-001,
00495 -8.19424169862172370e-002 );
00496 vt[3] = lapack_make_complex_double( 0.00000000000000000e+000,
00497 0.00000000000000000e+000 );
00498 vt[11] = lapack_make_complex_double( 2.91779089728414760e-001,
00499 5.02962804706486800e-001 );
00500 vt[19] = lapack_make_complex_double( 4.85070854407798900e-002,
00501 1.34920297541892970e-001 );
00502 vt[27] = lapack_make_complex_double( -7.15581919558924920e-001,
00503 -3.59554546978138210e-001 );
00504 }
00505 static void init_u( lapack_int size, lapack_complex_double *u ) {
00506 lapack_int i;
00507 for( i = 0; i < size; i++ ) {
00508 u[i] = lapack_make_complex_double( 0.0, 0.0 );
00509 }
00510 u[0] = lapack_make_complex_double( -3.10981029656006490e-001,
00511 2.62390243772255500e-001 );
00512 u[8] = lapack_make_complex_double( -6.52100156652580590e-001,
00513 -5.53232930919111300e-001 );
00514 u[16] = lapack_make_complex_double( -4.26652277391470560e-002,
00515 -3.60551875913458290e-002 );
00516 u[24] = lapack_make_complex_double( 2.63434291736194760e-001,
00517 7.41134830329821800e-002 );
00518 u[1] = lapack_make_complex_double( 3.17459801107173260e-001,
00519 -6.41398373665513440e-001 );
00520 u[9] = lapack_make_complex_double( -3.48794491065693380e-001,
00521 -7.20567339846693860e-002 );
00522 u[17] = lapack_make_complex_double( -2.28738568471465590e-001,
00523 -6.90884157766049650e-003 );
00524 u[25] = lapack_make_complex_double( -1.10140229907637420e-001,
00525 3.26180370964031520e-002 );
00526 u[2] = lapack_make_complex_double( -2.00841914986170850e-001,
00527 1.49011743376836450e-001 );
00528 u[10] = lapack_make_complex_double( 3.10251489958585980e-001,
00529 -2.30309142448547440e-002 );
00530 u[18] = lapack_make_complex_double( -1.85460167625633830e-001,
00531 1.81728049653940960e-001 );
00532 u[26] = lapack_make_complex_double( 2.95608864759607740e-001,
00533 -5.64781944942283730e-001 );
00534 u[3] = lapack_make_complex_double( 1.19857271846585860e-001,
00535 -1.23096657572169240e-001 );
00536 u[11] = lapack_make_complex_double( 4.59162169100148230e-003,
00537 4.64117081960858240e-004 );
00538 u[19] = lapack_make_complex_double( 3.30466205984792210e-001,
00539 -4.82071149828388450e-001 );
00540 u[27] = lapack_make_complex_double( 6.74932088473138290e-002,
00541 -3.46397021614317290e-001 );
00542 u[4] = lapack_make_complex_double( -2.68869015223422270e-001,
00543 -1.65208672004753480e-001 );
00544 u[12] = lapack_make_complex_double( -1.79380225742158510e-001,
00545 5.86074392732159330e-002 );
00546 u[20] = lapack_make_complex_double( 5.23537299523901270e-001,
00547 2.57977784560615260e-001 );
00548 u[28] = lapack_make_complex_double( -3.92695031623721160e-001,
00549 -1.44970740631150650e-001 );
00550 u[5] = lapack_make_complex_double( -3.49853658363007300e-001,
00551 9.07028003163352360e-002 );
00552 u[13] = lapack_make_complex_double( -8.28849784427782010e-002,
00553 5.05886798225579360e-002 );
00554 u[21] = lapack_make_complex_double( -3.20239252692931740e-001,
00555 -3.03796892849298670e-001 );
00556 u[29] = lapack_make_complex_double( -3.17357323819129010e-001,
00557 -3.24135324237070420e-001 );
00558 }
00559 static void init_c( lapack_int size, lapack_complex_double *c ) {
00560 lapack_int i;
00561 for( i = 0; i < size; i++ ) {
00562 c[i] = lapack_make_complex_double( 0.0, 0.0 );
00563 }
00564 }
00565 static void init_work( lapack_int size, double *work ) {
00566 lapack_int i;
00567 for( i = 0; i < size; i++ ) {
00568 work[i] = 0;
00569 }
00570 }
00571
00572
00573
00574 static int compare_zbdsqr( double *d, double *d_i, double *e, double *e_i,
00575 lapack_complex_double *vt,
00576 lapack_complex_double *vt_i,
00577 lapack_complex_double *u, lapack_complex_double *u_i,
00578 lapack_complex_double *c, lapack_complex_double *c_i,
00579 lapack_int info, lapack_int info_i, lapack_int ldc,
00580 lapack_int ldu, lapack_int ldvt, lapack_int n,
00581 lapack_int ncc, lapack_int ncvt, lapack_int nru )
00582 {
00583 lapack_int i;
00584 int failed = 0;
00585 for( i = 0; i < n; i++ ) {
00586 failed += compare_doubles(d[i],d_i[i]);
00587 }
00588 for( i = 0; i < n; i++ ) {
00589 failed += compare_doubles(e[i],e_i[i]);
00590 }
00591 if( ncvt != 0 ) {
00592 for( i = 0; i < ldvt*ncvt; i++ ) {
00593 failed += compare_complex_doubles(vt[i],vt_i[i]);
00594 }
00595 }
00596 if( nru != 0 ) {
00597 for( i = 0; i < ldu*n; i++ ) {
00598 failed += compare_complex_doubles(u[i],u_i[i]);
00599 }
00600 }
00601 if( ncc != 0 ) {
00602 for( i = 0; i < ldc*ncc; i++ ) {
00603 failed += compare_complex_doubles(c[i],c_i[i]);
00604 }
00605 }
00606 failed += (info == info_i) ? 0 : 1;
00607 if( info != 0 || info_i != 0 ) {
00608 printf( "info=%d, info_i=%d\n",(int)info,(int)info_i );
00609 }
00610
00611 return failed;
00612 }