20 #include "../include/starpu_exageostat.h" 22 static void CORE_dgemv_starpu(
void *buffers[],
void *cl_arg){
29 A = (
double *)STARPU_MATRIX_GET_PTR(buffers[0]);
30 Z = (
double *)STARPU_MATRIX_GET_PTR(buffers[1]);
31 Zout = (
double *)STARPU_MATRIX_GET_PTR(buffers[2]);
32 starpu_codelet_unpack_args(cl_arg, &m, &n, &ldam, &m0, &n0);
34 cblas_dgemv(CblasColMajor , CblasNoTrans , m, n, 1 , A, m, Z, 1, 0, Zout, 1);
38 static struct starpu_codelet cl_dgemv =
41 .cpu_funcs = {CORE_dgemv_starpu},
43 .modes = {STARPU_R,STARPU_R,STARPU_RW},
83 int MORSE_MLE_dgemv_Tile_Async(MORSE_desc_t *descA, MORSE_desc_t *descZ, MORSE_desc_t *descZout, MORSE_sequence_t *sequence, MORSE_request_t *request) {
85 MORSE_context_t *morse;
86 MORSE_option_t options;
87 morse = morse_context_self();
89 if (sequence->status != MORSE_SUCCESS)
91 RUNTIME_options_init(&options, morse, sequence, request);
93 int m, n, ldam, m0, n0;
95 MORSE_desc_t A = *descA;
97 struct starpu_codelet *cl=&cl_dgemv;
98 for (n = 0; n < A.nt; n++) {
99 tempnn = n == A.nt -1 ? A.n - n * A.nb : A.nb;
100 for(m = 0; m < A.mt; m++)
102 tempmm = m == A.mt - 1 ? A.m - m* A.mb : A.mb;
107 STARPU_VALUE, &tempmm,
sizeof(
int),
108 STARPU_VALUE, &tempnn,
sizeof(
int),
109 STARPU_VALUE, &ldam,
sizeof(
int),
110 STARPU_VALUE, &m0,
sizeof(
int),
111 STARPU_VALUE, &n0,
sizeof(
int),
112 STARPU_R,
RTBLKADDR(descA,
sizeof(
double)*A.mt, A.mt, n),
113 STARPU_R,
RTBLKADDR(descZ,
sizeof(
double)*tempnn, 0, n),
114 STARPU_RW,
RTBLKADDR(descZout,
sizeof(
double)*tempnn, 0, n),
115 #
if defined(CHAMELEON_CODELETS_HAVE_NAME)
116 STARPU_NAME,
"dgemv",
126 RUNTIME_options_ws_free(&options);
127 RUNTIME_options_finalize(&options, morse);
129 MORSE_Sequence_Wait(sequence);
130 return MORSE_SUCCESS;
#define RTBLKADDR(desc, type, m, n)
int MORSE_MLE_dgemv_Tile_Async(MORSE_desc_t *descA, MORSE_desc_t *descZ, MORSE_desc_t *descZout, MORSE_sequence_t *sequence, MORSE_request_t *request)
#define starpu_mpi_codelet(_codelet_)