20 #include "../include/starpu_exageostat.h" 22 static void CORE_dcmg_starpu(
void *buffers[],
void *cl_arg){
29 theta = (
double *) malloc(3*
sizeof(
double));
30 A = (
double *)STARPU_MATRIX_GET_PTR(buffers[0]);
32 starpu_codelet_unpack_args(cl_arg, &m, &n, &m0, &n0, &l1, &l2, &theta[0], &theta[1], &theta[2], &distance_metric);
35 core_dcmg(A, m, n, m0, n0, l1, l2, theta, distance_metric);
39 static struct starpu_codelet cl_dcmg =
42 .cpu_funcs = {CORE_dcmg_starpu},
95 MORSE_context_t *morse;
96 MORSE_option_t options;
97 morse = morse_context_self();
100 if (sequence->status != MORSE_SUCCESS)
102 RUNTIME_options_init(&options, morse, sequence, request);
106 int distance_metric = strcmp(dm,
"gc")==0? 1 : 0 ;
108 MORSE_desc_t A = *descA;
109 struct starpu_codelet *cl=&cl_dcmg;
112 for(m = 0; m < A.mt; m++)
114 tempmm = m == A.mt -1 ? A.m- m* A.mb : A.mb;
116 for (n = 0; n < A.nt; n++) {
117 tempnn = n == A.nt -1 ? A.n - n * A.nb : A.nb;
122 STARPU_VALUE, &tempmm,
sizeof(
int),
123 STARPU_VALUE, &tempnn,
sizeof(
int),
124 STARPU_VALUE, &m0,
sizeof(
int),
125 STARPU_VALUE, &n0,
sizeof(
int),
126 STARPU_W,
RTBLKADDR(descA,
sizeof(
double)*ldam*tempnn, m, n),
127 STARPU_VALUE, &l1,
sizeof(
location*),
128 STARPU_VALUE, &l2,
sizeof(
location*),
129 STARPU_VALUE, &theta[0],
sizeof(
double),
130 STARPU_VALUE, &theta[1],
sizeof(
double),
131 STARPU_VALUE, &theta[2],
sizeof(
double),
132 STARPU_VALUE, &distance_metric,
sizeof(
int),
140 RUNTIME_options_ws_free(&options);
141 RUNTIME_options_finalize(&options, morse);
143 return MORSE_SUCCESS;
#define RTBLKADDR(desc, type, m, n)
#define starpu_mpi_codelet(_codelet_)
void core_dcmg(double *A, int m, int n, int m0, int n0, location *l1, location *l2, double *localtheta, int distance_metric)
int MORSE_MLE_dcmg_Tile_Async(MORSE_enum uplo, MORSE_desc_t *descA, MORSE_sequence_t *sequence, MORSE_request_t *request, location *l1, location *l2, double *theta, char *dm)