ppap4lmp  0.7.2
InvOMP Class Reference

InvOMP is an Invoker's subclass using OpenMP to execute a computationally expensive part of analysis. More...

#include <inv_omp.h>

Inheritance diagram for InvOMP:
Collaboration diagram for InvOMP:

Public Member Functions

 Invoker ()=default
 Constructor of Invoker class (default).
 
- Public Member Functions inherited from Invoker
 Invoker ()=default
 Constructor of Invoker class (default).
 
void execute (const Vec< ShPtr< Processor >> &procs)
 Execute analysis programmed in given Processor objects. More...
 

Protected Member Functions

virtual void execute_impl (const Vec< ShPtr< Processor >> &procs) override
 This method overrides Invoker::execute_impl. More...
 

Detailed Description

InvOMP is an Invoker's subclass using OpenMP to execute a computationally expensive part of analysis.

This class executes a computationally expensive calculation, such as an updating process defined by Generator::update_chain or analytical computations conducted in Processor::run_impl, under multithread environment using OpenMP. All threads are used if OMP_NUM_THREADS environment variable is not set.

Note
Please be careful when you modify any member of any object in a multithreading context!!

About usage in Python, please see pybind::py_inv_omp.

Definition at line 32 of file inv_omp.h.

Member Function Documentation

◆ execute_impl()

void InvOMP::execute_impl ( const Vec< ShPtr< Processor >> &  procs)
overrideprotectedvirtual

This method overrides Invoker::execute_impl.

Parameters
procsList of Processor objects to be executed.

This method calls Processor::run in parallel. Note that exceptions (runtime errors) thrown inside the parallel scope must be caught in the same scope. Since error messages thrown in the parallel scope are assigned to a thread-global variable, older error messages are overwritten by newer one thrown in another thread.

Implements Invoker.

Definition at line 16 of file inv_omp.cpp.

Here is the call graph for this function:

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