|
| ParallelDecorator (std::unique_ptr< AbstractIntegrator< S > > integrator, ParallelConfig config={}) |
| Construct parallel decorator.
|
|
template<typename StateRange > |
void | integrate_batch (StateRange &&states, typename IntegratorDecorator< S >::time_type dt, typename IntegratorDecorator< S >::time_type end_time) |
| Integrate multiple states in parallel.
|
|
template<typename Generator , typename Processor > |
auto | integrate_monte_carlo (size_t num_simulations, Generator &&generator, Processor &&processor, typename IntegratorDecorator< S >::time_type dt, typename IntegratorDecorator< S >::time_type end_time) |
| Monte Carlo integration with parallel execution.
|
|
template<typename StateRange > |
void | integrate_batch_chunked (StateRange &&states, typename IntegratorDecorator< S >::time_type dt, typename IntegratorDecorator< S >::time_type end_time) |
| Chunked parallel processing with load balancing.
|
|
ParallelConfig & | config () |
| Access and modify parallel configuration.
|
|
const ParallelConfig & | config () const |
|
void | update_config (ParallelConfig new_config) |
| Update parallel configuration with validation.
|
|
size_t | get_optimal_thread_count () const |
| Get optimal number of threads for current configuration.
|
|
| IntegratorDecorator (std::unique_ptr< base_type > integrator) |
| Construct decorator wrapping another integrator.
|
|
virtual | ~IntegratorDecorator ()=default |
| Virtual destructor for proper cleanup.
|
|
void | step (state_type &state, time_type dt) override |
|
void | integrate (state_type &state, time_type dt, time_type end_time) override |
|
time_type | current_time () const override |
|
void | set_time (time_type t) override |
|
void | set_system (system_function sys) override |
|
base_type & | wrapped () |
| Access to wrapped integrator for advanced use.
|
|
const base_type & | wrapped () const |
|
bool | has_wrapped_integrator () const |
| Check if wrapped integrator exists.
|
|
| AbstractIntegrator (system_function sys) |
|
time_type | current_time () const |
|
void | set_time (time_type t) |
|
void | set_system (system_function sys) |
|
template<
system_state S>
class diffeq::core::composable::ParallelDecorator< S >
Parallel execution decorator - adds batch processing to any integrator.
This decorator provides parallel execution capabilities with the following features:
- Batch processing of multiple states
- Monte Carlo simulation support
- Automatic load balancing and chunking
- Thread-safe execution with proper resource management
Key Design Principles:
- Single Responsibility: ONLY handles parallel execution
- No Dependencies: Works with any integrator type
- Scalable: Automatic hardware utilization
- Safe: Thread-safe with proper error handling
Note: This decorator requires integrator factory support for thread-local copies.
Definition at line 75 of file parallel_decorator.hpp.