Compute Graph Framework SDK Reference  5.22
dwPyramidNode.hpp
Go to the documentation of this file.
1
2//
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) 2018-2024 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 DWFRAMEWORK_DWNODES_IMAGEPROCESSING_DWPYRAMIDNODE_DWPYRAMIDNODE_HPP_
32#define DWFRAMEWORK_DWNODES_IMAGEPROCESSING_DWPYRAMIDNODE_DWPYRAMIDNODE_HPP_
33
34#ifdef DW_SDK_BUILD_PVA
35#include <dw/imageprocessing/pyramid/PyramidPVA_processpipeline.h>
36#endif
37#include <dw/core/system/PVA.h>
38#include <dw/imageprocessing/pyramid/Pyramid.h>
39#include <dwcgf/node/Node.hpp>
43#include <dwcgf/port/Port.hpp>
45#include <dwframework/dwnodes/common/channelpackets/Image.hpp>
46#include <dwframework/dwnodes/common/channelpackets/Pyramid.hpp>
47
48namespace dw
49{
50namespace framework
51{
52
54{
55 uint32_t width;
56 uint32_t height;
57 uint32_t levelCount;
58 dwTrivialDataType dataType = dwTrivialDataType::DW_TYPE_FLOAT16;
59 cupvaStream_t cupvastream;
60 cudaStream_t stream;
61 dwTime_t nvSciChannelWaitTimeUs;
62 uint32_t rrSehErrorCode;
63};
64
66{
67public:
68 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
69 static constexpr auto describeInputPorts()
70 {
71 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
72 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
74 DW_DESCRIBE_PORT(dwImageHandle_t, "IMAGE"_sv, PortBinding::REQUIRED));
75 };
76 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
77 static constexpr auto describeOutputPorts()
78 {
79 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
80 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
82 DW_DESCRIBE_PORT(dwPyramidImage, "LEVEL_IMAGES"_sv, PortBinding::REQUIRED));
83 };
84
86};
87
89{
90public:
91 // TODO(csketch): FP -- This is used when the logger is called and not just at assignment.
92 // coverity[autosar_cpp14_a0_1_1_violation] FP: nvbugs/2980283
93 // coverity[autosar_cpp14_m0_1_4_violation] FP: nvbugs/2980283
94 static constexpr char8_t LOG_TAG[]{"dwPyramidNode"};
95
96 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
97 static constexpr auto describePasses()
98 {
100 describePass(StringView{"SETUP"}, DW_PROCESSOR_TYPE_CPU),
101 describePass(StringView{"BUILD_PYRAMID"}, DW_PROCESSOR_TYPE_GPU),
102 describePass(StringView{"TEARDOWN"}, DW_PROCESSOR_TYPE_CPU));
103 };
104
105 static std::unique_ptr<dwPyramidNode> create(ParameterProvider& provider);
106
107 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
108 static constexpr auto describeParameters()
109 {
110 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
111 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
113 describeConstructorArgument<dwPyramidNodeParams>(
115 uint32_t,
117 "cameraIndex"_sv,
118 &dwPyramidNodeParams::width),
120 uint32_t,
122 "cameraIndex"_sv,
125 uint32_t,
126 "pyramidLevelCount"_sv,
129 dwTime_t,
130 "nvSciChannelWaitTimeUs"_sv,
131 0,
134 cudaStream_t,
135 "streamIndex"_sv,
137 describeConstructorArgument<dwContextHandle_t>(
139 dwContextHandle_t)));
140 }
141
143 const dwContextHandle_t ctx);
144};
145} // namespace framework
146} // namespace dw
147
148#endif // DWFRAMEWORK_DWNODES_IMAGEPROCESSING_DWPYRAMIDNODE_DWPYRAMIDNODE_HPP_
#define DW_DESCRIBE_INDEX_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...)
#define DW_DESCRIBE_INDEX_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PARAMETER_WITH_DEFAULT(TYPE_NAME, args...)
#define DW_DESCRIBE_UNNAMED_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PORT(TYPE_NAME, NAME, args...)
ExceptionSafeProcessNode(std::unique_ptr< Node > impl)
The interface to access parameter values identified by name and/or (semantic) type.
static constexpr auto describeInputPorts()
static constexpr auto describeOutputPorts()
static constexpr auto describeParameters()
static std::unique_ptr< dwPyramidNode > create(ParameterProvider &provider)
static constexpr char8_t LOG_TAG[]
dwPyramidNode(const dwPyramidNodeParams &config, const dwContextHandle_t ctx)
static constexpr auto describePasses()
cupvaStream_t cupvastream
Data Type of pyramid.
constexpr std::tuple describeConstructorArguments()
constexpr PassDescriptorT< 0 > describePass(dw::core::StringView &&name, dwProcessorType processorType)
constexpr auto describePassCollection(const Args &&... args) -> std::tuple< Args... >
constexpr auto describePortCollection(Args &&... args) -> dw::core::Tuple< Args... >
dwTime_t nvSciChannelWaitTimeUs
Wait time for nvSciChannel.
uint32_t rrSehErrorCode
Wait time for nvSciChannel.
dwPyramidNodeParams { uint32_t width dwPyramidNodeParams
uint32_t levelCount
Height of level 0.
cudaStream_t stream
uint32_t height
Width of level 0.
dwTrivialDataType dataType
Number of levels in the pyramid.
Definition: Buffer.hpp:41