20 #include "../include/starpu_exageostat.h"    21 #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))    22 #define MAX(X, Y) (((X) > (Y)) ? (X) : (Y))    24 static void CORE_dcmg_starpu(
void *buffers[],
void *cl_arg){
    31         theta   = (
double *) malloc(3* 
sizeof(
double));
    32         A   = (
double *)STARPU_MATRIX_GET_PTR(buffers[0]);
    34         starpu_codelet_unpack_args(cl_arg, &m, &n, &m0, &n0, &l1, &l2, &theta[0], &theta[1], &theta[2], &distance_metric);
    37         core_dcmg(A, m, n, m0, n0, l1, l2, theta, distance_metric);
    41 static struct starpu_codelet cl_dcmg =
    44                 .cpu_funcs  = {CORE_dcmg_starpu},
   101         MORSE_context_t *morse;
   102         MORSE_option_t options;
   103         morse = morse_context_self();
   106   if (sequence->status != MORSE_SUCCESS)
   108         RUNTIME_options_init(&options, morse, sequence, request);
   112     int distance_metric = strcmp(dm,
"gc") == 0? 1 : 0 ; 
   114         MORSE_desc_t 
A = *descA;
   115         struct starpu_codelet *cl = &cl_dcmg;
   119         for(m = 0; m < A.mt;)
   123         for (k=0 ; k<diag_thick && m < A.mt;k++)
   125                     tempmm = m == A.mt -1 ? A.m- m* A.mb : A.mb;
   128                 for (n = v; n < A.nt && n < v+diag_thick; n++) {
   132                                 tempnn = n == A.nt -1 ? A.n - n * A.nb : A.nb;
   136                                             STARPU_VALUE, &tempmm, 
sizeof(
int),
   137                                             STARPU_VALUE, &tempnn, 
sizeof(
int),
   138                                             STARPU_VALUE, &m0, 
sizeof(
int),
   139                                             STARPU_VALUE, &n0, 
sizeof(
int),
   140                                             STARPU_W, 
RTBLKADDR(descA, 
sizeof(
double)*ldam*tempnn, m, n),
   141                                             STARPU_VALUE, &l1, 
sizeof(
location*),
   142                                             STARPU_VALUE, &l2, 
sizeof(
location*),
   143                                             STARPU_VALUE, &theta[0], 
sizeof(
double),
   144                                             STARPU_VALUE, &theta[1], 
sizeof(
double),
   145                                             STARPU_VALUE, &theta[2], 
sizeof(
double),
   146                                             STARPU_VALUE, &distance_metric, 
sizeof(
int),                         
   156         RUNTIME_options_ws_free(&options);
   157         RUNTIME_options_finalize(&options, morse);
   159     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_diag_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, int diag_thick)