22#ifndef DOXYGEN_SHOULD_SKIP_THIS
28#include "sopalin/sopalin_data.h"
34#if defined( PASTIX_STARPU_PROFILING )
38starpu_profile_t solve_blok_dcpy_profile = {
40 .name =
"solve_blok_dcpy"
46void solve_blok_dcpy_profile_register(
void ) __attribute__( ( constructor ) );
48solve_blok_dcpy_profile_register(
void )
50 profiling_register_cl( &solve_blok_dcpy_profile );
54#ifndef DOXYGEN_SHOULD_SKIP_THIS
55struct cl_solve_blok_dcpy_args_s {
61static struct starpu_perfmodel starpu_solve_blok_dcpy_model = {
62 .type = STARPU_HISTORY_BASED,
63 .symbol =
"solve_blok_dcpy",
66#if !defined(PASTIX_STARPU_SIMULATION)
68fct_solve_blok_dcpy_cpu(
void *descr[],
void *cl_arg )
73 struct cl_solve_blok_dcpy_args_s *args = (
struct cl_solve_blok_dcpy_args_s *)cl_arg;
76#if defined(PASTIX_DEBUG_STARPU)
77 fprintf( stderr,
"[pastix][%s] Add copy cblk into recv = %d ok\n", __func__, args->cblk->gcblknum );
80 A = (
double *)STARPU_MATRIX_GET_PTR( descr[0] );
86 B = (
double *)STARPU_MATRIX_GET_PTR( descr[1] );
88 assert( m <= ((
pastix_int_t)STARPU_MATRIX_GET_NX( descr[0] )) );
90 A += (args->cblk->lcolidx - args->fcblk->lcolidx);
92 rc = LAPACKE_dlacpy_work( LAPACK_COL_MAJOR,
'A', m, n, A, lda, B, ldb );
99CODELETS_CPU( solve_blok_dcpy, 2 );
141 struct cl_solve_blok_dcpy_args_s *cl_arg = NULL;
145#if defined(PASTIX_DEBUG_STARPU)
149#if defined(PASTIX_DEBUG_STARPU)
150 fprintf( stderr,
"[%2d][%s] cblk = %d, ownerid = %d, handler = %p, size = %ld\n",
151 solvmtx->clustnum, __func__, cblk->
gcblknum, cblk->
ownerid, rhb->starpu_desc->handletab[cblknum],
158 cl_arg = malloc(
sizeof(
struct cl_solve_blok_dcpy_args_s) );
159#if defined(PASTIX_STARPU_PROFILING)
160 cl_arg->profile_data.measures = solve_blok_dcpy_profile.measures;
161 cl_arg->profile_data.flops = NAN;
164 cl_arg->fcblk = fcblk;
166#if defined(PASTIX_DEBUG_STARPU)
168 asprintf( &task_name,
"%s( %ld )",
169 cl_solve_blok_dcpy_cpu.name,
170 (
long)(cblk - sopalin_data->solvmtx->cblktab) );
173 assert( cblk->
cblktype & CBLK_RECV );
174 assert( !(fcblk->
cblktype & (CBLK_RECV|CBLK_FANIN)) );
176 pastix_starpu_insert_task(
177 &cl_solve_blok_dcpy_cpu,
178 STARPU_CL_ARGS, cl_arg,
sizeof(
struct cl_solve_blok_dcpy_args_s ),
179#
if defined(PASTIX_STARPU_PROFILING)
180 STARPU_CALLBACK_WITH_ARG_NFREE, solve_blok_dcpy_callback, cl_arg,
182 STARPU_R, rhsb->starpu_desc->handletab[fcblknum],
183 STARPU_W, rhsb->starpu_desc->handletab[cblknum],
184#
if defined(PASTIX_DEBUG_STARPU)
185 STARPU_NAME, task_name,
187#
if defined(PASTIX_STARPU_HETEROPRIO)
188 STARPU_PRIORITY, BucketSolveGEMM,
190 STARPU_PRIORITY, prio,
BEGIN_C_DECLS typedef int pastix_int_t
void starpu_stask_blok_dcpy_bwd_recv(sopalin_data_t *sopalin_data, pastix_rhs_t rhsb, SolverCblk *cblk, const SolverCblk *fcblk, int prio)
Insert the task to add a fanin cblk on the receiver side (The fanin is seen on this side as the RECV ...
Base structure to all codelet arguments that include the profiling data.
Main PaStiX RHS structure.
static pastix_int_t cblk_colnbr(const SolverCblk *cblk)
Compute the number of columns in a column block.
SolverCblk *restrict cblktab
Solver column block structure.
Solver column block structure.