HiCMA
Hierarchical Computations on Manycore Architectures
hcore_zhagdm.c
Go to the documentation of this file.
1 
16 //#include "hcore/include/hcore.h"
17 #include "morse.h"
18 #include "hcore_z.h"
19 #include <assert.h>
20 #include <stdio.h>
21 #include <sys/time.h>//FIXME for gettimeofday
22 
23 #include "hicma.h"
24 #include "hicma_common.h"
25 
26 #include "starsh.h"
27 #include "starsh-spatial.h"
28 #include "starsh-randtlr.h"
29 #ifdef LAPACKE_UTILS
30 #include <lapacke_utils.h>
31 #endif
32 #include "coreblas/coreblas.h"
33 #include "coreblas/lapacke.h"
34 
35 extern void _printmat(double * A, int m, int n, int ld);
36 
38  int nrows_Dense,
39  int ncols_Dense,
40  double *Dense,
41  int ld_Dense,
42  int tile_row_index,
43  int tile_col_index
44  )
45 {
46  struct timeval tvalBefore, tvalAfter;
47  gettimeofday (&tvalBefore, NULL);
48  if(HICMA_get_print_index() == 1){
49  fprintf(stderr, "%d+HAGDM\t|(%d,%d) m:%d n:%d ld:%d\n",MORSE_My_Mpi_Rank(),
50  tile_row_index, tile_col_index,
51  nrows_Dense, ncols_Dense, ld_Dense);
52  }
53  STARSH_cluster *RC = HICMA_get_starsh_format()->row_cluster, *CC = RC;
54  void *RD = RC->data, *CD = RD;
55  HICMA_get_starsh_format()->problem->kernel(nrows_Dense, ncols_Dense,
56  RC->pivot+RC->start[tile_row_index],
57  CC->pivot+CC->start[tile_col_index],
58  RD, CD, Dense, ld_Dense);
59  if(HICMA_get_print_mat() == 1){
60  printf("%d\tHAGDM-DENSE-output\n", __LINE__);
61  _printmat(Dense, nrows_Dense, ncols_Dense, ld_Dense);
62  }
64  gettimeofday (&tvalAfter, NULL);
65  fprintf(stderr, "%d-HAGDM\t|(%d,%d) m:%d n:%d ld:%d\t\t\t\t\tHAGDM: %.4f\n",
66  MORSE_My_Mpi_Rank(),
67  tile_row_index, tile_col_index,
68  nrows_Dense, ncols_Dense, ld_Dense,
69  (tvalAfter.tv_sec - tvalBefore.tv_sec)
70  +(tvalAfter.tv_usec - tvalBefore.tv_usec)/1000000.0
71  );
72  }
73 }
74 
75 
76 
#define A(m, n)
Definition: pzgemm.c:56
void _printmat(double *A, int m, int n, int ld)
int HICMA_get_print_mat()
Definition: hicma_init.c:56
int HICMA_get_print_index_end()
Definition: hicma_init.c:53
void HCORE_zhagdm(int nrows_Dense, int ncols_Dense, double *Dense, int ld_Dense, int tile_row_index, int tile_col_index)
Definition: hcore_zhagdm.c:37
int HICMA_get_print_index()
Definition: hicma_init.c:50
STARSH_blrf * HICMA_get_starsh_format()
Definition: hicma_init.c:37