paraver_analysis/solver-tareador.c
double relax_gauss (double *u, unsigned sizex, unsigned sizey)
{
    double unew, diff, sum=0.0;
    int nbx, bx, nby, by;

    nbx = NB;
    bx = sizex/nbx;
    nby = NB;
    by = sizey/nby;
    for (int ii=0; ii<nbx; ii++)
        for (int jj=0; jj<nby; jj++) {
            char msg[256];
            sprintf(msg, "gauss-seidel[%d,%d]", ii, jj);
            tareador_start_task(msg);
            tareador_disable_object(&sum);
            for (int i=1+ii*bx; i<=min((ii+1)*bx, sizex-2); i++) 
                for (int j=1+jj*by; j<=min((jj+1)*by, sizey-2); j++) {
	            unew= 0.25 * (    u[ i*sizey	+ (j-1) ]+  // left
				      u[ i*sizey	+ (j+1) ]+  // right
				      u[ (i-1)*sizey	+ j     ]+  // top
				      u[ (i+1)*sizey	+ j     ]); // bottom
	            diff = unew - u[i*sizey+ j];
	            sum += diff * diff; 
	            u[i*sizey+j]=unew;
                }
            tareador_disable_object(&sum);
            tareador_end_task();
        }

    return sum;
}
/*
 * Blocked Gauss-Seidel solver: one iteration step
 */
Blocked Gauss-Seidel solver: one iteration step
Blocked Gauss - Seidel solver : one iteration step
double relax_gauss (double *u, unsigned sizex, unsigned sizey)
{
    double unew, diff, sum=0.0;
    int nbx, bx, nby, by;
    nbx = NB;
    bx = sizex/nbx;
    nby = NB;
    by = sizey/nby;
    for (int ii=0; ii<nbx; ii++)
        for (int jj=0; jj<nby; jj++) {
            char msg[256];
            sprintf(msg, "gauss-seidel[%d,%d]", ii, jj);
            tareador_start_task(msg);
            tareador_disable_object(&sum);
            for (int i=1+ii*bx; i<=min((ii+1)*bx, sizex-2); i++) 
                for (int j=1+jj*by; j<=min((jj+1)*by, sizey-2); j++) {
	            unew= 0.25 * (    u[ i*sizey	+ (j-1) ]+  
				      u[ i*sizey	+ (j+1) ]+  
				      u[ (i-1)*sizey	+ j     ]+  
				      u[ (i+1)*sizey	+ j     ]); 
	            diff = unew - u[i*sizey+ j];
	            sum += diff * diff; 
	            u[i*sizey+j]=unew;
                }
            tareador_disable_object(&sum);
            tareador_end_task();
        }
    return sum;
}
double relax_gauss ( double * u , unsigned sizex , unsigned sizey ) { double unew , diff , sum = 0.0 ; int nbx , bx , nby , by ; nbx = NB ; bx = sizex / nbx ; nby = NB ; by = sizey / nby ; for ( int ii = 0 ; ii < nbx ; ii ++ ) for ( int jj = 0 ; jj < nby ; jj ++ ) { char msg [ 256 ] ; sprintf ( msg , " " , ii , jj ) ; tareador_start_task ( msg ) ; tareador_disable_object ( & sum ) ; for ( int i = 1 + ii * bx ; i <= min ( ( ii + 1 ) * bx , sizex - 2 ) ; i ++ ) for ( int j = 1 + jj * by ; j <= min ( ( jj + 1 ) * by , sizey - 2 ) ; j ++ ) { unew = 0.25 * ( u [ i * sizey + ( j - 1 ) ] + u [ i * sizey + ( j + 1 ) ] + u [ ( i - 1 ) * sizey + j ] + u [ ( i + 1 ) * sizey + j ] ) ; diff = unew - u [ i * sizey + j ] ; sum += diff * diff ; u [ i * sizey + j ] = unew ; } tareador_disable_object ( & sum ) ; tareador_end_task ( ) ; } return sum ; }
Blocked Gauss-Seidel solver: one iteration step
Blocked Gauss - Seidel solver : one iteration step
// left // right // top // bottom