Commit f51eda5f authored by Quentin Khan's avatar Quentin Khan

Re-indent FFmmAlgorithmSectionTask

parent 8f6ac93b
......@@ -4,13 +4,13 @@
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
#ifndef FFMMALGORITHMSECTIONTASK_HPP
......@@ -51,7 +51,7 @@
*/
template<class OctreeClass, class CellClass, class ContainerClass, class KernelClass, class LeafClass, class P2PExclusionClass = FP2PMiddleExclusion>
class FFmmAlgorithmSectionTask : public FAbstractAlgorithm, public FAlgorithmTimers {
OctreeClass* const tree; ///< The octree to work on
KernelClass** kernels; ///< The kernels
......@@ -62,7 +62,7 @@ class FFmmAlgorithmSectionTask : public FAbstractAlgorithm, public FAlgorithmTim
const int leafLevelSeparationCriteria;
public:
/** \brief Class constructor
*
*
* \note An assert checks whether one of the arguments is null.
* \param inTree the octree to work on.
* \param inKernels the kernels used for computation.
......@@ -120,33 +120,33 @@ public:
protected:
/**
* To execute the fmm algorithm
* Call this function to run the complete algorithm
*/
* To execute the fmm algorithm
* Call this function to run the complete algorithm
*/
void executeCore(const unsigned operationsToProceed) override {
Timers[P2MTimer].tic();
#pragma omp parallel num_threads(MaxThreads)
{
#pragma omp sections
#pragma omp sections
{
#pragma omp section
#pragma omp section
{
if(operationsToProceed & FFmmP2M) bottomPass();
if(operationsToProceed & FFmmM2M) upwardPass();
if(operationsToProceed & FFmmM2L) transferPass();
if(operationsToProceed & FFmmL2L) downardPass();
}
#pragma omp section
{
if( operationsToProceed & FFmmP2P ) directPass();
}
}
#pragma omp single
#pragma omp single
{
if(operationsToProceed & FFmmL2P) L2PPass();
}
......@@ -231,23 +231,23 @@ protected:
/////////////////////////////////////////////////////////////////////////////
/** M2L */
/** M2L */
void transferPass(){
#ifdef SCALFMM_USE_EZTRACE
eztrace_start();
#endif
if(KernelClass::NeedFinishedM2LEvent()){
this->transferPassWithFinalize() ;
}
else{
this->transferPassWithoutFinalize() ;
/** M2L */
void transferPass(){
#ifdef SCALFMM_USE_EZTRACE
eztrace_start();
#endif
if(KernelClass::NeedFinishedM2LEvent()){
this->transferPassWithFinalize() ;
}
else{
this->transferPassWithoutFinalize() ;
}
#ifdef SCALFMM_USE_EZTRACE
eztrace_stop();
#endif
}
#ifdef SCALFMM_USE_EZTRACE
eztrace_stop();
#endif
}
void transferPassWithFinalize(){
void transferPassWithFinalize(){
FLOG( FLog::Controller.write("\tStart Downward Pass (M2L)\n").write(FLog::Flush); );
FLOG(FTic counterTime);
......@@ -298,7 +298,7 @@ protected:
FLOG( FLog::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << " s)\n" );
}
void transferPassWithoutFinalize(){
void transferPassWithoutFinalize(){
FLOG( FLog::Controller.write("\tStart Downward Pass (M2L)\n").write(FLog::Flush); );
FLOG(FTic counterTime);
......@@ -424,7 +424,7 @@ protected:
int neighborPositions[26];
const int counter = tree->getLeafsNeighbors(neighbors, neighborPositions, toWork.getCurrentGlobalCoordinate(),heightMinusOne);
kernels[omp_get_thread_num()]->P2P(toWork.getCurrentGlobalCoordinate(), toWork.getCurrentListTargets(),
toWork.getCurrentListSrc(), neighbors, neighborPositions, counter);
toWork.getCurrentListSrc(), neighbors, neighborPositions, counter);
}
}
......@@ -462,5 +462,3 @@ protected:
#endif //FFMMALGORITHMTASK_HPP
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