Back to Taskflow

Taskflow: A General

docs/module_8hpp_source.html

4.1.01.9 KB
Original Source

| | Taskflow: A General-purpose Task-parallel Programming System |

Loading...

Searching...

No Matches

module.hpp

1#pragma once

2

3#include "../taskflow.hpp"

4

9

10namespace tf {

11

12// ----------------------------------------------------------------------------

13

14template <GraphLike T>

15auto Algorithm::make_module_task(T& target) {

16return [&graph=retrieve_graph(target)](tf::Runtime& rt){

17if(graph.empty()) {

18return;

19 }

20 rt._executor._schedule_graph(rt._worker, graph, rt._node->_topology, rt._node);

21 };

22}

23

24// ----------------------------------------------------------------------------

25

73template <GraphLike T>

74auto make_module_task(T& target) {

75return Algorithm::make_module_task(target);

76}

77

78} // end of namespact tf -----------------------------------------------------

79

80

81

tf

taskflow namespace

Definition small_vector.hpp:20

tf::make_module_task

auto make_module_task(T &target)

creates a module task using the given graph

Definition module.hpp:74

tf::retrieve_graph

Graph & retrieve_graph(T &target)

retrieves a reference to the underlying tf::Graph from an object

Definition graph.hpp:1067