Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/oneapi/tbb/flow_graph_abstractions.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     Copyright (c) 2005-2021 Intel Corporation
0003 
0004     Licensed under the Apache License, Version 2.0 (the "License");
0005     you may not use this file except in compliance with the License.
0006     You may obtain a copy of the License at
0007 
0008         http://www.apache.org/licenses/LICENSE-2.0
0009 
0010     Unless required by applicable law or agreed to in writing, software
0011     distributed under the License is distributed on an "AS IS" BASIS,
0012     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013     See the License for the specific language governing permissions and
0014     limitations under the License.
0015 */
0016 
0017 #ifndef __TBB_flow_graph_abstractions_H
0018 #define __TBB_flow_graph_abstractions_H
0019 
0020 namespace tbb {
0021 namespace detail {
0022 namespace d1 {
0023 
0024 //! Pure virtual template classes that define interfaces for async communication
0025 class graph_proxy {
0026 public:
0027     //! Inform a graph that messages may come from outside, to prevent premature graph completion
0028     virtual void reserve_wait() = 0;
0029 
0030     //! Inform a graph that a previous call to reserve_wait is no longer in effect
0031     virtual void release_wait() = 0;
0032 
0033     virtual ~graph_proxy() {}
0034 };
0035 
0036 template <typename Input>
0037 class receiver_gateway : public graph_proxy {
0038 public:
0039     //! Type of inputing data into FG.
0040     typedef Input input_type;
0041 
0042     //! Submit signal from an asynchronous activity to FG.
0043     virtual bool try_put(const input_type&) = 0;
0044 };
0045 
0046 } // d1
0047 
0048 
0049 } // detail
0050 } // tbb
0051 #endif