Commit 06958c84 authored by Quentin Khan's avatar Quentin Khan

FFmmAlgorithmThreadProc: fix uninitialised arrays detected by valgrind

parent b46cb754
......@@ -935,8 +935,8 @@ protected:
#pragma omp task default(none) shared(numberOfCells,idxLevel) firstprivate(idxCell) //+ shared(chunckSize)
{
KernelClass * const myThreadkernels = kernels[omp_get_thread_num()];
const CellClass* neighbors[342];
int neighborPositions[342];
const CellClass* neighbors[342] {};
int neighborPositions[342] {};
const int nbCellToCompute = FMath::Min(chunckSize, numberOfCells-idxCell);
for(int idxCellToCompute = idxCell ; idxCellToCompute < idxCell+nbCellToCompute ; ++idxCellToCompute) {
......@@ -1068,10 +1068,10 @@ protected:
#pragma omp parallel num_threads(MaxThreads)
{
KernelClass * const myThreadkernels = kernels[omp_get_thread_num()];
MortonIndex neighborsIndex[/*189+26+1*/216];
int neighborsPosition[/*189+26+1*/216];
const CellClass* neighbors[342];
int neighborPositions[342];
MortonIndex neighborsIndex[/*189+26+1*/216] {};
int neighborsPosition[/*189+26+1*/216] {};
const CellClass* neighbors[342] {};
int neighborPositions[342] {};
#pragma omp for schedule(dynamic, userChunkSize) nowait
for(int idxCell = 0 ; idxCell < numberOfCells ; ++idxCell){
......@@ -1496,9 +1496,9 @@ protected:
#pragma omp master // nowait
if(p2pEnabled){
/* This a nbProcess x nbProcess matrix of integer
* let U and V be id of processes :
* globalReceiveMap[U*nbProcess + V] == size of information needed by V and own by U
*/
* let U and V be id of processes :
* globalReceiveMap[U*nbProcess + V] == size of information needed by V and own by U
*/
FSize*const globalReceiveMap = new FSize[nbProcess * nbProcess];
memset(globalReceiveMap, 0, sizeof(FSize) * nbProcess * nbProcess);
......
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