Blaze 3.9
Loading...
Searching...
No Matches
blaze::ParallelSection< T > Class Template Reference

Section for the debugging of the shared-memory parallelization. More...

#include <ParallelSection.h>

Public Member Functions

Constructors
 ParallelSection (bool activate)
 Constructor for the ParallelSection class.
 ParallelSection (const ParallelSection &)=default
Destructor
 ~ParallelSection ()
 Destructor of the ParallelSection class.
Assignment operators
ParallelSection & operator= (const ParallelSection &)=default
Conversion operator
 operator bool () const
 Conversion operator to bool.

Static Private Attributes

Member variables
static bool active_
 Activity flag for the parallel section.

Detailed Description

template<typename T>
class blaze::ParallelSection< T >

Section for the debugging of the shared-memory parallelization.

The ParallelSection class is an auxiliary helper class for the BLAZE_PARALLEL_SECTION macro. It provides the functionality to detected whether a parallel section has been started and with that serves as a utility for debugging the shared-memory parallelization.

Constructor & Destructor Documentation

◆ ParallelSection()

template<typename T>
blaze::ParallelSection< T >::ParallelSection ( bool activate)
inline

Constructor for the ParallelSection class.

Parameters
activateActivation flag for the parallel section.
Exceptions
std::runtime_errorNested parallel sections detected.

Member Function Documentation

◆ operator bool()

template<typename T>
blaze::ParallelSection< T >::operator bool ( ) const
inline

Conversion operator to bool.

The conversion operator returns true in case a parallel section is active and false otherwise.

Member Data Documentation

◆ active_

template<typename T>
bool blaze::ParallelSection< T >::active_
staticprivate

Activity flag for the parallel section.

In case a parallel section is active (i.e. the currently executed code is inside a parallel section), the flag is set to true, otherwise it is false.


The documentation for this class was generated from the following file: