Compute Graph Framework SDK Reference
5.4.5418 Release
For Test and Development only

Connection.hpp
Go to the documentation of this file.
1 //
3 // Notice
4 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 //
9 // NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10 // information or for any infringement of patents or other rights of third parties that may
11 // result from its use. No license is granted by implication or otherwise under any patent
12 // or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13 // expressly authorized by NVIDIA. Details are subject to change without notice.
14 // This code supersedes and replaces all information previously supplied.
15 // NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16 // components in life support devices or systems without express written approval of
17 // NVIDIA CORPORATION & AFFILIATES.
18 //
19 // SPDX-FileCopyrightText: Copyright (c) 2019-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20 // SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21 //
22 // NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23 // property and proprietary rights in and to this material, related
24 // documentation and any modifications thereto. Any use, reproduction,
25 // disclosure or distribution of this material and related documentation
26 // without an express license agreement from NVIDIA CORPORATION or
27 // its affiliates is strictly prohibited.
28 //
30 
31 #ifndef DW_FRAMEWORK_CONNECTION_HPP_
32 #define DW_FRAMEWORK_CONNECTION_HPP_
33 
34 #include <dw/core/base/Types.h>
35 
36 namespace dw
37 {
38 namespace framework
39 {
40 
41 const uint64_t CONNECTION_DISCONNECTED = static_cast<uint64_t>(-1);
42 
43 using Connection = struct Connection
44 {
45  uint64_t srcNodeId;
46  uint64_t dstNodeId;
47  uint8_t srcPortId;
48  uint8_t dstPortId;
49  uint64_t channelId;
50  static Connection createInputOnly(uint64_t dstNodeId,
51  uint8_t dstPortId,
52  uint64_t channelId)
53  {
54  Connection c{};
55  c.srcNodeId = CONNECTION_DISCONNECTED;
56  c.srcPortId = 0;
57  c.dstNodeId = dstNodeId;
58  c.dstPortId = dstPortId;
59  c.channelId = channelId;
60  return c;
61  }
62 
63  static Connection createOutputOnly(uint64_t srcNodeId,
64  uint8_t srcPortId,
65  uint64_t channelId)
66  {
67  Connection c{};
68  c.dstNodeId = CONNECTION_DISCONNECTED;
69  c.dstPortId = 0;
70  c.srcNodeId = srcNodeId;
71  c.srcPortId = srcPortId;
72  c.channelId = channelId;
73  return c;
74  }
75 };
76 }
77 }
78 #endif // DW_FRAMEWORK_CONNECTION_HPP_
uint8_t srcPortId
Definition: Connection.hpp:47
struct Connection { uint64_t srcNodeId Connection
Definition: Connection.hpp:45
const uint64_t CONNECTION_DISCONNECTED
Definition: Connection.hpp:41
uint64_t dstNodeId
Definition: Connection.hpp:46
Definition: Exception.hpp:46
uint64_t channelId
Definition: Connection.hpp:49
static Connection createOutputOnly(uint64_t srcNodeId, uint8_t srcPortId, uint64_t channelId)
Definition: Connection.hpp:63
static Connection createInputOnly(uint64_t dstNodeId, uint8_t dstPortId, uint64_t channelId)
Definition: Connection.hpp:50
uint8_t dstPortId
Definition: Connection.hpp:48