Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
flow_graph_abstractions.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005-2019 Intel Corporation
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16 
17 
18 
19 */
20 
21 #ifndef __TBB_flow_graph_abstractions_H
22 #define __TBB_flow_graph_abstractions_H
23 
24 namespace tbb {
25 namespace flow {
26 namespace interface10 {
27 
29 class graph_proxy {
30 public:
32  virtual void reserve_wait() = 0;
33 
35  virtual void release_wait() = 0;
36 
37  virtual ~graph_proxy() {}
38 };
39 
40 template <typename Input>
41 class receiver_gateway : public graph_proxy {
42 public:
44  typedef Input input_type;
45 
47  virtual bool try_put(const input_type&) = 0;
48 };
49 
50 } //interfaceX
51 
54 
55 } //flow
56 } //tbb
57 #endif
virtual void release_wait()=0
Inform a graph that a previous call to reserve_wait is no longer in effect.
Pure virtual template classes that define interfaces for async communication.
The graph class.
Input input_type
Type of inputing data into FG.
virtual bool try_put(const input_type &)=0
Submit signal from an asynchronous activity to FG.
virtual void reserve_wait()=0
Inform a graph that messages may come from outside, to prevent premature graph completion.

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.