Commit e05bfee4 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Simplify sequential version to be able to make it work while using multiple threads

parent cc356a53
......@@ -24,31 +24,13 @@ void
pastix_static_zgetrf( sopalin_data_t *sopalin_data )
{
SolverMatrix *datacode = sopalin_data->solvmtx;
SolverCblk *cblk;
pastix_int_t i, ii;
pastix_int_t tasknbr, *tasktab;
Task *t;
SolverCblk *cblk;
pastix_int_t i;
tasknbr = datacode->ttsknbr[0];
tasktab = datacode->ttsktab[0];
for (ii=0; ii<tasknbr; ii++){
i = tasktab[ii];
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
/* Compute task */
switch( t->taskid )
{
case COMP_1D:
/* Compute */
core_zgetrfsp1d( datacode, cblk, sopalin_data->diagthreshold );
break;
default:
errorPrint("Taskid unknown for task %ld\n", (long)i);
EXIT(MOD_SOPALIN,INTERNAL_ERR);
}
cblk = datacode->cblktab;
for (i=0; i<datacode->cblknbr; i++, cblk++){
/* Compute */
core_zgetrfsp1d( datacode, cblk, sopalin_data->diagthreshold );
}
#if defined(PASTIX_DEBUG_FACTO)
......
......@@ -24,31 +24,13 @@ void
pastix_static_zhetrf( sopalin_data_t *sopalin_data )
{
SolverMatrix *datacode = sopalin_data->solvmtx;
SolverCblk *cblk;
pastix_int_t i, ii;
pastix_int_t tasknbr, *tasktab;
Task *t;
SolverCblk *cblk;
pastix_int_t i;
tasknbr = datacode->ttsknbr[0];
tasktab = datacode->ttsktab[0];
for (ii=0; ii<tasknbr; ii++){
i = tasktab[ii];
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
/* Compute task */
switch( t->taskid )
{
case COMP_1D:
/* Compute */
core_zhetrfsp1d( datacode, cblk, sopalin_data->diagthreshold );
break;
default:
errorPrint("Taskid unknown for task %ld\n", (long)i);
EXIT(MOD_SOPALIN,INTERNAL_ERR);
}
cblk = datacode->cblktab;
for (i=0; i<datacode->cblknbr; i++, cblk++){
/* Compute */
core_zhetrfsp1d( datacode, cblk, sopalin_data->diagthreshold );
}
#if defined(PASTIX_DEBUG_FACTO)
......
......@@ -24,31 +24,13 @@ void
pastix_static_zpotrf( sopalin_data_t *sopalin_data )
{
SolverMatrix *datacode = sopalin_data->solvmtx;
SolverCblk *cblk;
pastix_int_t i, ii;
pastix_int_t tasknbr, *tasktab;
Task *t;
SolverCblk *cblk;
pastix_int_t i;
tasknbr = datacode->ttsknbr[0];
tasktab = datacode->ttsktab[0];
for (ii=0; ii<tasknbr; ii++){
i = tasktab[ii];
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
/* Compute task */
switch( t->taskid )
{
case COMP_1D:
/* Compute */
core_zpotrfsp1d( datacode, cblk, sopalin_data->diagthreshold);
break;
default:
errorPrint("Taskid unknown for task %ld\n", (long)i);
EXIT(MOD_SOPALIN,INTERNAL_ERR);
}
cblk = datacode->cblktab;
for (i=0; i<datacode->cblknbr; i++, cblk++){
/* Compute */
core_zpotrfsp1d( datacode, cblk, sopalin_data->diagthreshold);
}
#if defined(PASTIX_DEBUG_FACTO)
......
......@@ -24,31 +24,13 @@ void
pastix_static_zsytrf( sopalin_data_t *sopalin_data )
{
SolverMatrix *datacode = sopalin_data->solvmtx;
SolverCblk *cblk;
pastix_int_t i, ii;
pastix_int_t tasknbr, *tasktab;
Task *t;
SolverCblk *cblk;
pastix_int_t i;
tasknbr = datacode->ttsknbr[0];
tasktab = datacode->ttsktab[0];
for (ii=0; ii<tasknbr; ii++){
i = tasktab[ii];
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
/* Compute task */
switch( t->taskid )
{
case COMP_1D:
/* Compute */
core_zsytrfsp1d( datacode, cblk, sopalin_data->diagthreshold );
break;
default:
errorPrint("Taskid unknown for task %ld\n", (long)i);
EXIT(MOD_SOPALIN,INTERNAL_ERR);
}
cblk = datacode->cblktab;
for (i=0; i<datacode->cblknbr; i++, cblk++){
/* Compute */
core_zsytrfsp1d( datacode, cblk, sopalin_data->diagthreshold );
}
#if defined(PASTIX_DEBUG_FACTO)
......
......@@ -34,12 +34,7 @@ pastix_static_ztrsm( int side, int uplo, int trans, int diag,
SolverCblk *cblk, *fcbk;
SolverBlok *blok;
pastix_complex64_t *coeftab;
pastix_int_t i, j, ii, tempm, tempn;
pastix_int_t ttsknbr, *ttsktab;
Task *t;
ttsknbr = datacode->ttsknbr[0];
ttsktab = datacode->ttsktab[0];
pastix_int_t i, j, tempm, tempn;
/*
* Left / Upper / NoTrans
......@@ -48,13 +43,8 @@ pastix_static_ztrsm( int side, int uplo, int trans, int diag,
if (uplo == PastixUpper) {
/* We store U^t, so we swap uplo and trans */
if (trans == PastixNoTrans) {
for (ii=ttsknbr-1; ii>=0; ii--){
i = ttsktab[ii];
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
if ( t->taskid != COMP_1D )
continue;
cblk = datacode->cblktab + datacode->cblknbr - 1;
for (i=0; i<datacode->cblknbr; i++, cblk--){
tempn = cblk->lcolnum - cblk->fcolnum + 1;
......@@ -89,13 +79,8 @@ pastix_static_ztrsm( int side, int uplo, int trans, int diag,
* Left / Lower / NoTrans
*/
if (trans == PastixNoTrans) {
for (ii=0; ii<ttsknbr; ii++){
i = ttsktab[ii];
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
if ( t->taskid != COMP_1D )
continue;
cblk = datacode->cblktab;
for (i=0; i<datacode->cblknbr; i++, cblk++){
tempn = cblk->lcolnum - cblk->fcolnum + 1;
coeftab = (pastix_complex64_t*)(cblk->lcoeftab);
......@@ -132,13 +117,8 @@ pastix_static_ztrsm( int side, int uplo, int trans, int diag,
* Left / Lower / [Conj]Trans
*/
else {
for (ii=ttsknbr-1; ii>=0; ii--){
i = ttsktab[ii];
t = datacode->tasktab + i;
cblk = datacode->cblktab + t->cblknum;
if ( t->taskid != COMP_1D )
continue;
cblk = datacode->cblktab + datacode->cblknbr - 1;
for (i=0; i<datacode->cblknbr; i++, cblk--){
tempn = cblk->lcolnum - cblk->fcolnum + 1;
......
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