Shortcuts

Class Executor

Nested Relationships

Class Documentation

class ripple::Executor

The Executor class maintains a pool of threads, which maintain a queue of nodes which can be executed by the workers.

Each node defines work to be executed and connecetivity information which defines its dependencies between other nodes.

Public Functions

auto set_steal_policy(StealPolicy policy) noexcept -> void

Sets the stealing policy for the executor.

See

StealPolicy

Parameters
  • policy: The policy to use for stealing nodes.

auto execute(Graph &graph) noexcept -> void

Executes a graph.

This emplaced all nodes using this thread while other threads start stealing.

Parameters
  • graph: The graph to execute.

auto execute_n(Graph &graph, size_t n) noexcept -> void

Executes the graph n times.

Parameters
  • graph: The graph to execute.

  • n: The number of times to execute the graph.

template<typename Pred, typename ...Args>
auto execute_until(Graph &graph, Pred &&pred, Args&&... args) noexcept -> void

Executes the graph until the predicate returns false.

Parameters
  • graph: The graph to execute.

  • pred: The predicate which returns if the execution must end.

  • args: The arguments for the predicate.

Template Parameters
  • Pred: The type of the predicate.

  • Args: The type of the predicate arguments.

auto barrier() noexcept -> void

Creates a fence, waiting for all threads to finish execution, synchronizing the gpu work.

auto fence() noexcept -> void

Creates a fence, waiting for all threads to finish execution, synchronizing the gpu work.

auto num_executed_nodes() const noexcept -> uint32_t

Gets the number of nodes which have executed.

auto has_unfinished_work() noexcept -> bool

Determines if there is unfinished work to be executed.

Return

true if there is unfinished work.

auto set_active_threads(int cpu_threads, int gpu_threads) noexcept -> void

Sets the number of active gpu threads.

Parameters
  • cpu_threads: The number of threads with cpu priority.

  • gpu_threads: The number of threads with gpu priority.

Friends

friend auto executor() -> Executor&

Friend function to access the global graph executor.

Gets a reference to the graph executor.

Return

A reference to the executor.

Return

A reference to the global executor.

Docs

Access comprehensive developer documentation for Ripple

View Docs

Tutorials

Get tutorials to help with understand all features

View Tutorials

Examples

Find examples to help get started

View Examples