Expression Templates Library (ETL)
Static Public Member Functions | List of all members
etl::thread_engine Struct Reference

The default thread engine when auto-parallelization is not enabled. More...

#include <thread_engine.hpp>

Static Public Member Functions

static void acquire ()
 Acquire the thread engine. More...
 
template<typename Functor , typename... Args>
static void schedule ([[maybe_unused]] Functor &&fun, [[maybe_unused]] Args &&... args)
 Schedule a new task. More...
 
static void wait ()
 Wait for all the scheduled threads to finish their task.
 

Detailed Description

The default thread engine when auto-parallelization is not enabled.

This should only be used by ETL internals such as the evaluator and the engine_dispatch functions.

Member Function Documentation

◆ acquire()

static void etl::thread_engine::acquire ( )
inlinestatic

Acquire the thread engine.

This function must be called before tasks are being scheduled. It is mostly to ensure that selection is done correctly and that the thread engine is used correclty.

◆ schedule()

template<typename Functor , typename... Args>
static void etl::thread_engine::schedule ( [[maybe_unused] ] Functor &&  fun,
[[maybe_unused] ] Args &&...  args 
)
inlinestatic

Schedule a new task.

Parameters
funThe functor to execute

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