Commit b1f3080b authored by COULAUD Olivier's avatar COULAUD Olivier

Update NewTask after merge-request

parent f1b37089
......@@ -7,18 +7,20 @@
#include <omp.h>
#include "Utils/FGlobal.hpp"
#include "Utils/FAlgorithmTimers.hpp"
#include "Utils/FAssert.hpp"
#include "Utils/FLog.hpp"
#include "Utils/FEnv.hpp"
#include "Utils/FAlgorithmTimers.hpp"
#include "Utils/FGlobal.hpp"
#include "Utils/FLog.hpp"
#include "Utils/FTic.hpp"
#include "Utils/FAlgorithmTimers.hpp"
#include "Containers/FOctree.hpp"
#include "Containers/FVector.hpp"
#include "Components/FBasicCell.hpp"
#include "FCoreCommon.hpp"
#include "FP2PExclusion.hpp"
......@@ -356,6 +358,12 @@ protected:
}
typename OctreeClass::Iterator avoidGotoLeftIterator(octreeIterator);
// FIXME: hack around a clang bug
// it apparently can't manage a firstprivate const member
// such as 'tree', but can manage a local copy...
// getting the height first, or making 'tree' shared both
// workaround it.
OctreeClass * const treeAlias = tree;
// for each levels
for(int idxLevel = FAbstractAlgorithm::upperWorkingLevel ; idxLevel < FAbstractAlgorithm::lowerWorkingLevel ; ++idxLevel ){
......@@ -363,11 +371,11 @@ protected:
const int separationCriteria = (idxLevel != FAbstractAlgorithm::lowerWorkingLevel-1 ? 1 : leafLevelSeparationCriteria);
// for each cells
do{
#pragma omp task default(none) firstprivate(octreeIterator,separationCriteria,idxLevel) untied
#pragma omp task default(none) firstprivate(octreeIterator,separationCriteria,idxLevel,treeAlias,kernels) untied
{
const CellClass* neighbors[342];
int neighborPositions[342];
const int counter = tree->getInteractionNeighbors(
const int counter = treeAlias->getInteractionNeighbors(
neighbors, neighborPositions,
octreeIterator.getCurrentGlobalCoordinate(),
idxLevel, separationCriteria);
......@@ -381,13 +389,11 @@ protected:
= octreeIterator.getCurrentCell();
std::array<const multipole_t*, 342> neighbor_multipoles;
std::transform(neighbors, neighbors+counter, neighbor_multipoles.begin(),
[](const CellClass* c) {
return (c == nullptr ? nullptr
: &(c->getMultipoleData()));
});
FBasicCell::getMultipoleDataFromCell<const CellClass, const multipole_t>);
std::array<const symbolic_data_t*, 342> neighbor_symbolics;
std::transform(neighbors, neighbors+counter, neighbor_symbolics.begin(),
[](const CellClass* c) {return c;});
FBasicCell::identity<const CellClass>);
kernels[omp_get_thread_num()]->M2L(
target_local_exp,
......
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