Commit 924ee8e1 authored by D'azevedo, Ed's avatar D'azevedo, Ed
Browse files

snapshot

parent b417c4c2
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -29,10 +29,10 @@ void apply_Htarget_vbatch(
 const int ialign = 32;
 const double giga = 1000.0*1000.0*1000.0;

 double gflops1 = (FpType) 0.0;
 double gflops2 = (FpType) 0.0;
 double time_1st_vbatch = (FpType) 0.0;
 double time_2nd_vbatch = (FpType) 0.0;
 double gflops1 = (double) 0.0;
 double gflops2 = (double) 0.0;
 double time_1st_vbatch = (double) 0.0;
 double time_2nd_vbatch = (double) 0.0;

 size_t nbytes_BX = 0;

+21 −0
Original line number Diff line number Diff line
@@ -10,6 +10,26 @@

#include "magma_types.h"
#include "magma_v2.h"
#include "magma_operators.h"


#if defined(USE_COMPLEX_Z)

#define MAGMA_FpType  magmaDoubleComplex

#elif defined(USE_COMPLEX_C)

#define MAGMA_FpType  magmaFloatComplex

#elif defined(USE_FLOAT)

#define MAGMA_FpType  float

#else

#define MAGMA_FpType double

#endif


/*
@@ -562,6 +582,7 @@ void magma_Xsetvector( magma_int_t n,
    #define magmablas_Xgemm_vbatched_max_nocheck magmablas_zgemm_vbatched_max_nocheck
    #define magmablas_Xgemm_vbatched_max magmablas_zgemm_vbatched_max

  
  #elif defined(USE_COMPLEX_C)

    #define magma_Xsetmatrix magma_csetmatrix
+20 −20
Original line number Diff line number Diff line
@@ -48,8 +48,8 @@ void dmrg_Xgetvector( const int n,
{
#ifdef USE_MAGMA
 magma_Xgetvector(n, 
                  dx_src, incx, 
                  hy_dst, incy, 
                  (MAGMA_FpType *) dx_src, incx, 
                  (MAGMA_FpType *) hy_dst, incy, 
                  queue );
#else
 Xcopy_( &n, 
@@ -65,8 +65,8 @@ void dmrg_Xsetvector( const int n,
{
#ifdef USE_MAGMA
 magma_Xsetvector(  n,
                    hx_src, incx,
                    dy_dst, incy,
                    (MAGMA_FpType *) hx_src, incx,
                    (MAGMA_FpType *) dy_dst, incy,
                    queue );
#else
 Xcopy_( &n, 
@@ -82,8 +82,8 @@ void dmrg_Xgetmatrix( const int m, const int n,
{
#ifdef USE_MAGMA
  magma_Xgetmatrix( m,n,
                    dA_src, ldda,
                    hB_dst, ldb,
                    (MAGMA_FpType *) dA_src, ldda,
                    (MAGMA_FpType *) hB_dst, ldb,
                    queue );
#else
 const char *uplo = "A";
@@ -100,8 +100,8 @@ void dmrg_Xsetmatrix( const int m, const int n,
{
#ifdef USE_MAGMA
 magma_Xsetmatrix( m,n,
                   hA_src, lda,
                   dB_dst, lddb,
                   (MAGMA_FpType *) hA_src, lda,
                   (MAGMA_FpType *) dB_dst, lddb,
                   queue );
#else
 const char *uplo = "A";
@@ -382,8 +382,8 @@ size_t nbytes_total = 0;
   magma_trans_t transA = isTransA ? MagmaTrans : MagmaNoTrans;
   magma_trans_t transB = isTransB ? MagmaTrans : MagmaNoTrans;
   
   FpType alpha = alpha_vbatch[0];
   FpType beta = beta_vbatch[0];
   MAGMA_FpType alpha = *( (MAGMA_FpType *) &(alpha_vbatch[0]) );
   MAGMA_FpType beta =  *( (MAGMA_FpType *) &(beta_vbatch[0]) );


     
@@ -412,11 +412,11 @@ size_t nbytes_total = 0;

    magmablas_Xgemm_vbatched_max_nocheck( transA, transB,
           m_vbatch, n_vbatch, k_vbatch,
           alpha,
           (FpType const * const *) a_vbatch, lda_vbatch, 
           (FpType const * const *) b_vbatch, ldb_vbatch,
           beta,
           c_vbatch, ldc_vbatch,
           (MAGMA_FpType) alpha,
           (MAGMA_FpType const * const *) a_vbatch, lda_vbatch, 
           (MAGMA_FpType const * const *) b_vbatch, ldb_vbatch,
           (MAGMA_FpType) beta,
           (MAGMA_FpType **) c_vbatch, ldc_vbatch,
           batch_size, 
           max_m, max_n, max_k,
           queue );
@@ -427,11 +427,11 @@ size_t nbytes_total = 0;

   magmablas_Xgemm_vbatched( transA, transB,
           m_vbatch, n_vbatch, k_vbatch,
           alpha,
           (FpType const * const *) a_vbatch, lda_vbatch, 
           (FpType const * const *) b_vbatch, ldb_vbatch,
           beta,
           c_vbatch, ldc_vbatch,
           (MAGMA_FpType) alpha,
           (MAGMA_FpType const * const *) a_vbatch, lda_vbatch, 
           (MAGMA_FpType const * const *) b_vbatch, ldb_vbatch,
           (MAGMA_FpType) beta,
           (MAGMA_FpType **) c_vbatch, ldc_vbatch,
           batch_size, queue );

#endif
+2 −2
Original line number Diff line number Diff line
@@ -300,7 +300,7 @@ void setup_vbatch( int noperator,
        for(j=0; j < n; j++) {
        for(i=0; i < m; i++) {
           double aij = Asrc[i + j*ld1];
           double abs_aij = (aij > 0) ? aij : -aij;
           double abs_aij = ABS(aij);
           lnnz_A += (abs_aij <  tiny ) ? 0 : 1;
           };
           };
@@ -402,7 +402,7 @@ void setup_vbatch( int noperator,
          for(j=0; j < n; j++) {
          for(i=0; i < m; i++) {
             double bij = Bsrc[i + j*ld1 ];
             double abs_bij = (bij > 0) ? bij : -bij;
             double abs_bij = ABS( bij );
             lnnz_B += (abs_bij < tiny) ? 0 : 1 ;
             };
             };