ExaGeoStat
ExaGeoStat is a parallel high performance unified framework for geostatistics on manycore systems.
codelet_dzcpy.c
Go to the documentation of this file.
1 
20 #include "../include/starpu_exageostat.h"
21 
22 static void CORE_zcpy_starpu(void *buffers[], void *cl_arg){
23  int m;
24  double * A;
25  int m0;
26  double * r;
27 
28  A = (double *)STARPU_MATRIX_GET_PTR(buffers[0]);
29  starpu_codelet_unpack_args(cl_arg, &m, &m0, &r);
30 
31  core_dzcpy(A, m, m0, r);
32 }
33 
34 static struct starpu_codelet cl_zcpy =
35 {
36  .where = STARPU_CPU,
37  .cpu_funcs = {CORE_zcpy_starpu},
38  .nbuffers = 1,
39  .modes = {STARPU_W},
40  .name = "dzcpy"
41 };
42 
43 /***************************************************************************/
76 int MORSE_MLE_zcpy_Tile_Async(MORSE_desc_t *descA, double * r,MORSE_sequence_t *sequence, MORSE_request_t *request) {
77  MORSE_context_t *morse;
78  MORSE_option_t options;
79  morse = morse_context_self();
80  if (sequence->status != MORSE_SUCCESS)
81  return -2;
82  RUNTIME_options_init(&options, morse, sequence, request);
83 
84  int m, m0;
85  int tempmm;
86  MORSE_desc_t A = *descA;
87  struct starpu_codelet *cl=&cl_zcpy;
88 
89  for (m = 0; m < A.mt; m++) {
90  tempmm = m == A.mt-1 ? A.m - m * A.mb : A.mb;
91  m0 = m * A.mb;
92 
93  starpu_insert_task(starpu_mpi_codelet(cl),
94  STARPU_VALUE, &tempmm, sizeof(int),
95  STARPU_VALUE, &m0, sizeof(int),
96  STARPU_VALUE, &r, sizeof(double),
97  STARPU_W, RTBLKADDR(descA, sizeof(double)*tempmm, m, 0),
98  #if defined(CHAMELEON_CODELETS_HAVE_NAME)
99  STARPU_NAME, "dzcpy",
100  #endif
101  0);
102 
103  }
104 
105  //MORSE_TASK_flush_desc( &options, MorseUpperLower, descA);
106  RUNTIME_options_ws_free(&options);
107  //MORSE_TASK_dataflush_all();
108  return MORSE_SUCCESS;
109 }
110 
111 
#define RTBLKADDR(desc, type, m, n)
#define starpu_mpi_codelet(_codelet_)
void core_dzcpy(double *Z, int m, int m0, double *r)
Definition: core_dzcpy.c:49
#define A(m, n)
Definition: pdpotrf_diag.c:34
int MORSE_MLE_zcpy_Tile_Async(MORSE_desc_t *descA, double *r, MORSE_sequence_t *sequence, MORSE_request_t *request)
Definition: codelet_dzcpy.c:76