Skip to content
Snippets Groups Projects
Commit f027bd67 authored by Fabio Roberto Vitello's avatar Fabio Roberto Vitello
Browse files

Update aprod.c

parent bbcde320
No related branches found
No related tags found
No related merge requests found
......@@ -297,7 +297,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms,
for(int nt=0; nt < ntasks; nt++ )
{
#pragma omp target device (fpga) copy_deps
#pragma omp task label(vVect_nAstroPSolved) //out(vVect[jstartAstro : jstartAstro + nAstroPSolved-1])
{
lset = mapForThread[nt][0] * nparam;
......@@ -308,31 +307,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms,
for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) //QUI e altrove in for(long ix..) richiama una funzione
{
/*
//======== INIZIO
lset=ix*nparam;
long miValAstro = 0;
if (matrixIndex[multMI * ix] != miValAstro)
{
miValAstro = matrixIndex[multMI * ix];
jstartAstro = miValAstro - offLocalAstro;
}
for (long jx = jstartAstro; jx < jstartAstro + nAstroPSolved; jx++)
{
taskLocalSum = systemMatrix[lset] * knownTerms[ix];
//vVect[jx] = 0.000001;
if(jx == 1 && false)
{
printf("nAstroPSolved nt:%d ix:%ld vVect[jx]:%f\n\n",nt,ix,vVect[jx] );
}
vVect[jx] += taskLocalSum;
lset++;
} //for jx
//lset += nparam - nAstroPSolved; //**QUI attenzio0ne che nel caso di "funzioni avviate in parallelo succede casino! è modificata!! in lste messa all'inizio!
//========== FINE
*/
aprodM2AstroP(ix, nt, comlsqr, vVect, systemMatrix, matrixIndex, knownTerms);
} //for ix
}
......@@ -361,31 +335,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms,
{
for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++)
{
//============= INIZIO
/*
lset = nparam * ix + nAstroPSolved;
mix = matrixIndex[multMI * ix + (multMI - 1)] + offj;
for (int ly = 0; ly < nAttAxes; ly++)
{
vVix = mix + ly * nDegFreedomAtt;
if(vVix == 1)
{
printf("nAttP nt %d %ld\n\n",nt,ix);
}
for (int lx = 0; lx < nAttParAxis; lx++)
{
localSum = systemMatrix[lset] * knownTerms[ix];
// #pragma omp atomic
// vVect[vVix] = 0.000001;
vVect[vVix] += localSum;
lset++;
vVix++;
} //for lx
} //for ly
//========== FINE
*/
aprodM2AttP(ix, nt, comlsqr, vVect, systemMatrix, matrixIndex, knownTerms);
} //for ix
}
......@@ -413,26 +362,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms,
long lset;
for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++)
{
//========== INIZIO
/*
lset = nparam * ix + offLset;
iix = ix * nInstrPSolved;
for (int ly = 0; ly < nInstrPSolved; ly++)
{
vVix = offj + instrCol[iix + ly];
if(vVix == 1)
{
printf("nOfInstrConstr nt %d %ld\n\n",nt,ix);
}
localSum = systemMatrix[lset] * knownTerms[ix];
//#pragma omp atomic
//vVect[vVix] = 0.000001;
vVect[vVix] += localSum;
lset++;
} //for ly
//========== FINE
*/
aprodM2InstrP(ix, nt, comlsqr, vVect, systemMatrix, instrCol, knownTerms);
} //for ix
}
......@@ -454,24 +383,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms,
long vVix;
for (long ix = 0; ix < mapNoss[myid]; ix++)
{
// ==================== INIZIO
/*
lset = nparam * ix + offLset;
for (long ly = 0; ly < nGlobP; ly++)
{
vVix = offj + ly;
if(vVix == 1)
{
printf("nGlobP nt %ld\n\n",ix);
}
localSum = systemMatrix[lset] * knownTerms[ix];
vVect[vVix] += localSum;
lset++;
} //for ly
// ============ FINE
*/
aprodM2GlobP(ix, ntasks, comlsqr, vVect, systemMatrix, knownTerms);
} //for ix
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment