Compute Graph Framework SDK Reference  5.16
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-2023 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_FLOAT32;
59 cupvaStream_t cupvastream;
60 cudaStream_t stream;
61};
62
64{
65public:
66 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
67 static constexpr auto describeInputPorts()
68 {
69 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
70 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
72 DW_DESCRIBE_PORT(dwImageHandle_t, "IMAGE"_sv, PortBinding::REQUIRED));
73 };
74 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
75 static constexpr auto describeOutputPorts()
76 {
77 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
78 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
80 DW_DESCRIBE_PORT(dwPyramidImage, "LEVEL_IMAGES"_sv, PortBinding::REQUIRED));
81 };
82
84};
85
87{
88public:
89 // TODO(csketch): FP -- This is used when the logger is called and not just at assignment.
90 // coverity[autosar_cpp14_a0_1_1_violation] FP: nvbugs/2980283
91 // coverity[autosar_cpp14_m0_1_4_violation] FP: nvbugs/2980283
92 static constexpr char8_t LOG_TAG[]{"dwPyramidNode"};
93
94 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
95 static constexpr auto describePasses()
96 {
98 describePass(StringView{"SETUP"}, DW_PROCESSOR_TYPE_CPU),
99 describePass(StringView{"BUILD_PYRAMID"}, DW_PROCESSOR_TYPE_GPU),
100 describePass(StringView{"TEARDOWN"}, DW_PROCESSOR_TYPE_CPU));
101 };
102
103 static std::unique_ptr<dwPyramidNode> create(ParameterProvider& provider);
104
105 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
106 static constexpr auto describeParameters()
107 {
108 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
109 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
111 describeConstructorArgument<dwPyramidNodeParams>(
113 uint32_t,
115 "cameraIndex"_sv,
116 &dwPyramidNodeParams::width),
118 uint32_t,
120 "cameraIndex"_sv,
123 uint32_t,
124 "pyramidLevelCount"_sv,
127 cudaStream_t,
128 "streamIndex"_sv,
130 describeConstructorArgument<dwContextHandle_t>(
132 dwContextHandle_t)));
133 }
134
136 const dwContextHandle_t ctx);
137};
138} // namespace framework
139} // namespace dw
140
141#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_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... >
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:40