17 #include "runtime/starpu/chameleon_starpu.h" 20 #include "runtime/starpu/runtime_codelets.h" 21 ZCODELETS_HEADER(uncompress_hcore)
28 extern void _printmat(
double *
A, int64_t m, int64_t n, int64_t ld);
42 MORSE_enum transA,
int transB,
45 const MORSE_desc_t *AUBV,
46 const MORSE_desc_t *Ark,
47 int Am,
int An,
int lda,
49 const MORSE_desc_t *CD,
50 int Cm,
int Cn,
int ldc
54 struct starpu_codelet *codelet = &cl_zuncompress_hcore;
56 void (*callback)(
void*) = NULL;
57 int sizeA = lda*nAUBV;
60 int execution_rank = CD->get_rankof( CD, Cm, Cn );
66 char* env = getenv(
"CHAMELEON_COMM_FACTOR_THRESHOLD");
69 threshold = (unsigned)atoi(env);
72 if ( sizeA > threshold*sizeC ){
73 execution_rank = AUBV->get_rankof( AUBV, Am, An );
76 MORSE_BEGIN_ACCESS_DECLARATION;
77 MORSE_ACCESS_R(AUBV, Am, An);
78 MORSE_ACCESS_R(Ark, Am, An);
79 MORSE_ACCESS_RW(CD, Cm, Cn);
81 MORSE_RANK_CHANGED(execution_rank);
82 MORSE_END_ACCESS_DECLARATION;
87 starpu_mpi_codelet(codelet),
88 STARPU_VALUE, &transA,
sizeof(MORSE_enum),
89 STARPU_VALUE, &transB,
sizeof(MORSE_enum),
90 STARPU_VALUE, &m,
sizeof(
int),
91 STARPU_VALUE, &n,
sizeof(
int),
92 STARPU_VALUE, &alpha,
sizeof(
double),
93 STARPU_R, RTBLKADDR(AUBV,
double, Am, An),
94 STARPU_R, RTBLKADDR(Ark,
double, Am, An),
95 STARPU_VALUE, &lda,
sizeof(
int),
96 STARPU_VALUE, &beta,
sizeof(
double),
97 STARPU_RW, RTBLKADDR(CD,
double, Cm, Cn),
98 STARPU_VALUE, &ldc,
sizeof(
int),
99 STARPU_VALUE, &Am,
sizeof(
int),
100 STARPU_VALUE, &An,
sizeof(
int),
101 STARPU_VALUE, &Cm,
sizeof(
int),
102 STARPU_VALUE, &Cn,
sizeof(
int),
103 STARPU_VALUE, &nAUBV,
sizeof(
int),
104 STARPU_PRIORITY, options->priority,
105 STARPU_CALLBACK, callback,
106 #
if defined(CHAMELEON_USE_MPI)
107 STARPU_EXECUTE_ON_NODE, execution_rank,
109 #
if defined(CHAMELEON_CODELETS_HAVE_NAME)
110 STARPU_NAME,
"hcore_zuncompress",
115 #if !defined(CHAMELEON_SIMULATION) 116 static void cl_zuncompress_hcore_cpu_func(
void *descr[],
void *cl_arg)
133 AUBV = (
double *)STARPU_MATRIX_GET_PTR(descr[0]);
134 Ark = (
double *)STARPU_MATRIX_GET_PTR(descr[1]);
136 CD = (
double *)STARPU_MATRIX_GET_PTR(descr[2]);
137 int Am, An, Bm, Bn, Cm, Cn;
138 starpu_codelet_unpack_args(cl_arg, &transA, &transB, &m, &n, &alpha, &lda, &beta, &ldc, &Am, &An, &Cm, &Cn, &nAUBV);
143 printf(
"%d-UNCOMPRESS\t|CUV(%d,%d) AUV(%d,%d)%g mn:%d %d ldac:%d %d\n",MORSE_My_Mpi_Rank(),Cm, Cn, Am, An, Ark[0], m, n, lda, ldc);
148 size_t nelm_AU = (size_t)lda * (
size_t)nAU;
149 double *BV = &(AUBV[nelm_AU]);
164 CODELETS_CPU(zuncompress_hcore, 3, cl_zuncompress_hcore_cpu_func)
void _printmat(double *A, int64_t m, int64_t n, int64_t ld)
void HICMA_TASK_zuncompress(const MORSE_option_t *options, MORSE_enum transA, int transB, int m, int n, double alpha, const MORSE_desc_t *AUBV, const MORSE_desc_t *Ark, int Am, int An, int lda, double beta, const MORSE_desc_t *CD, int Cm, int Cn, int ldc)
int gemmfrk_cl_print_index
void HCORE_zuncompress(MORSE_enum transA, MORSE_enum transB, int M, int N, double alpha, double *AU, double *Ark, int LDA, double *BV, double *Brk, int LDB, double beta, double *CD, int LDC)