We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0affb6d commit 8817b35Copy full SHA for 8817b35
1 file changed
source/elements/oneTBB/source/flow_graph/examples/overwrite_node_cls.cpp
@@ -14,15 +14,13 @@ int main() {
14
15
oneapi::tbb::flow::overwrite_node< int > overwrite_storage(g);
16
17
- oneapi::tbb::flow::source_node<int> data_generator(g,
18
- [&]( int& v ) -> bool {
+ oneapi::tbb::flow::input_node< int > data_generator(g,
+ [&]( oneapi::tbb::flow_control& fc ) -> int {
19
if ( count < data_limit ) {
20
- ++count;
21
- v = count;
22
- return true;
23
- } else {
24
- return false;
+ return ++count;
25
}
+ fc.stop();
+ return {};
26
});
27
28
oneapi::tbb::flow::function_node< int > process(g, oneapi::tbb::flow::unlimited,
0 commit comments