Révision 251 BLAS/xTRSV/xTRSV.c

xTRSV.c (revision 251)
25 25
#include "fortran_common.h"
26 26
#include "fortran_thunking.h"
27 27
#elif FBLAS
28
#include <cblas.h>
29
#include <cblas_f77.h>
28
#include <f77blas.h>
30 29
#elif GSL
31 30
#include <gsl_cblas.h>
32 31
#elif ACML
33 32
#include <acml.h>
34 33
#else
35 34
#include <cblas.h>
36
#include <blaswrap.h>
35
// #include <blaswrap.h>
37 36
#endif
38 37

  
39
#ifdef DOUBLE
38
#ifdef FP64
40 39
#define LENGTH double
41 40
#else
42 41
#define LENGTH float
......
264 263

  
265 264
  for (i=0;i<RUNS;i++)
266 265
    {
267
#ifdef DOUBLE
266
#ifdef FP64
268 267

  
269 268
      printVectorGPU(dim,devPtrX,"X","Roots");
270 269

  
......
346 345

  
347 346
  for (i=0;i<RUNS;i++)
348 347
    {
349
#ifdef DOUBLE
348
#ifdef FP64
350 349
      
351 350
      printVector(dim,X,"X","Roots");
352 351
      
......
412 411
  
413 412
  for (i=0;i<RUNS;i++)
414 413
    {
415
#ifdef DOUBLE
414
#ifdef FP64
416 415
      
417 416
      printVector(dim,X,"X","Initial roots");
418 417
      
418
      /* /\* Multiply A by X as Y <- A.X *\/ */
419
      /* dgemv_(&trans,&dim,&dim,&alpha,A,&dim,X,&incx,&beta,Y,&incx); */
420
      
421
      /* printVector(dim,Y,"Y<-A.X","Estimated results"); */
422
      
423
      /* /\* Solve linear system *\/ */
424
      /* dtrsv_(&uplo,&trans,&diag,&dim,A,&dim,Y,&incx); */
425
      
426
      /* printVector(dim,Y,"X","Solutions from A.X=Y"); */
427
      
428
      /* /\* Compare the roots X and Y *\/ */
429
      /* daxpy_(&dim,&beta2,Y,&incx,X,&incx); */
430
      
431
      /* printVector(dim,X,"X","Differences initial and estimated"); */
432
      
433
      /* /\* Store the checker of errors *\/ */
434
      /* dnrm2_(&dim,X,&incx,&checksA[i]); */
435
            
436
      /* /\* Swap vector X and Y *\/ */
437
      /* dswap_(&dim,X,&incx,Y,&incx); */
438

  
419 439
      /* Multiply A by X as Y <- A.X */
420 440
      dgemv_(&trans,&dim,&dim,&alpha,A,&dim,X,&incx,&beta,Y,&incx);
421 441
      
......
432 452
      printVector(dim,X,"X","Differences initial and estimated");
433 453
      
434 454
      /* Store the checker of errors */
435
      dnrm2_(&dim,X,&incx,&checksA[i]);
455
      checksA[i]=(double)dnrm2_(&dim,X,&incx);
436 456
            
437 457
      /* Swap vector X and Y */
438 458
      dswap_(&dim,X,&incx,Y,&incx);
......
457 477
      printVector(dim,X,"X","Errors");
458 478

  
459 479
      /* Store the checker of errors */
460
      snrm2_(&dim,X,&incx,&checksA[i]);
480
      checksA[i]=(LENGTH)snrm2_(&dim,X,&incx);
461 481

  
462 482
      /* Swap vector X and Y */
463 483
      sswap_(&dim,X,&incx,Y,&incx);
......
475 495
  
476 496
  for (i=0;i<RUNS;i++)
477 497
    {
478
#ifdef DOUBLE
498
#ifdef FP64
479 499
      
480 500
      printVector(dim,X,"X","Roots");
481 501
      
......
542 562
  for (i=0;i<RUNS;i++)
543 563
    {  
544 564

  
545
#ifdef DOUBLE
565
#ifdef FP64
546 566

  
547 567
      printVector(dim,X,"X","Roots");
548 568

  
......
609 629
  for (i=0;i<RUNS;i++)
610 630
    {  
611 631

  
612
#ifdef DOUBLE
632
#ifdef FP64
613 633

  
614 634
      printVector(dim,X,"X","Roots");
615 635

  

Formats disponibles : Unified diff