Commit 2ba61d45 authored by Mathieu Faverge's avatar Mathieu Faverge

Update the parsec interface

parent 39e82131
......@@ -85,7 +85,6 @@ set(RUNTIME_COMMON
control/runtime_descriptor.c
control/runtime_options.c
control/runtime_profiling.c
codelets/codelet_dataflush.c
${RUNTIME_COMMON_GENERATED}
)
......
......@@ -25,7 +25,7 @@ int RUNTIME_sequence_create( MORSE_context_t *morse,
parsec_context_t *parsec = (parsec_context_t *)morse->schedopt;
parsec_taskpool_t *parsec_dtd_tp = parsec_dtd_taskpool_new();
parsec_enqueue(parsec, (parsec_taskpool_t *) parsec_dtd_tp);
parsec_enqueue( parsec, (parsec_taskpool_t *)parsec_dtd_tp );
sequence->schedopt = parsec_dtd_tp;
parsec_context_start(parsec);
......@@ -47,10 +47,9 @@ int RUNTIME_sequence_destroy( MORSE_context_t *morse,
// TODO: switch to a partial wait
//parsec_dtd_taskpool_wait(parsec, parsec_dtd_tp);
parsec_context_wait(parsec);
parsec_taskpool_free(parsec_dtd_tp);
parsec_context_wait( parsec );
parsec_taskpool_free( parsec_dtd_tp );
sequence->schedopt = NULL;
return MORSE_SUCCESS;
}
......@@ -65,8 +64,7 @@ int RUNTIME_sequence_wait( MORSE_context_t *morse,
parsec_taskpool_t *parsec_dtd_tp = (parsec_taskpool_t *) sequence->schedopt;
assert( parsec_dtd_tp );
parsec_dtd_taskpool_wait(parsec, parsec_dtd_tp);
parsec_dtd_taskpool_wait( parsec, parsec_dtd_tp );
return MORSE_SUCCESS;
}
......
......@@ -308,25 +308,26 @@ int RUNTIME_desc_release( const MORSE_desc_t *desc )
}
/*******************************************************************************
* Get data on cpu - Synchronous call
* Flush cached data
**/
int RUNTIME_desc_getoncpu( const MORSE_desc_t *desc )
void RUNTIME_flush()
{
(void)desc;
return MORSE_SUCCESS;
}
/*******************************************************************************
* Get data on cpu - Asynchronous call
**/
int RUNTIME_desc_getoncpu_async( const MORSE_desc_t *desc,
MORSE_sequence_t *sequence )
void RUNTIME_desc_flush( const MORSE_desc_t *desc,
const MORSE_sequence_t *sequence )
{
parsec_taskpool_t* PARSEC_dtd_taskpool = (parsec_taskpool_t *)(sequence->schedopt);
parsec_dtd_data_flush_all( PARSEC_dtd_taskpool, (parsec_data_collection_t*)(desc->schedopt) );
}
return MORSE_SUCCESS;
void RUNTIME_data_flush( const MORSE_sequence_t *sequence,
const MORSE_desc_t *A, int Am, int An )
{
parsec_taskpool_t* PARSEC_dtd_taskpool = (parsec_taskpool_t *)(sequence->schedopt);
parsec_dtd_data_flush( PARSEC_dtd_taskpool, RTBLKADDR( A, MORSE_Complex64_t, Am, An ) );
}
/*******************************************************************************
......
......@@ -74,6 +74,5 @@ void RUNTIME_sequence_flush( MORSE_context_t *morse,
sequence->request = request;
sequence->status = status;
request->status = status;
starpu_task_wait_for_all();
return;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment