20 #include "../include/starpu_exageostat.h" 21 static void CORE_ddotp_starpu(
void *buffers[],
void *cl_arg){
26 dotproduct = (
double *)STARPU_MATRIX_GET_PTR(buffers[0]);
27 A = (
double *)STARPU_MATRIX_GET_PTR(buffers[1]);
28 starpu_codelet_unpack_args(cl_arg, &m, &m0);
29 double local_dot=cblas_ddot(m, A, 1, A, 1);
30 *dotproduct += local_dot;
33 static struct starpu_codelet cl_ddotp =
36 .cpu_funcs = {CORE_ddotp_starpu},
38 .modes = {STARPU_RW,STARPU_R},
75 int MORSE_MLE_ddotp_Async(MORSE_desc_t *descA, MORSE_desc_t *descproduct, 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)
82 RUNTIME_options_init(&options, morse, sequence, request);
86 MORSE_desc_t A = *descA;
88 struct starpu_codelet *cl=&cl_ddotp;
90 for (m = 0; m < A.mt; m++) {
91 tempmm = m == A.mt-1 ? A.m - m * A.mb : A.mb;
97 STARPU_VALUE, &tempmm,
sizeof(
int),
98 STARPU_VALUE, &m0,
sizeof(
int),
99 STARPU_RW,
RTBLKADDR(descproduct,
sizeof(
double), 0, 0),
100 STARPU_R,
RTBLKADDR(descA,
sizeof(
double)*tempmm, m, 0),
106 RUNTIME_options_ws_free(&options);
107 RUNTIME_options_finalize(&options, morse);
109 MORSE_Sequence_Wait(sequence);
110 return MORSE_SUCCESS;
#define RTBLKADDR(desc, type, m, n)
int MORSE_MLE_ddotp_Async(MORSE_desc_t *descA, MORSE_desc_t *descproduct, MORSE_sequence_t *sequence, MORSE_request_t *request)
#define starpu_mpi_codelet(_codelet_)