Compute Graph Framework SDK Reference  5.10
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-2022 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>
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 static constexpr auto describeInputPorts()
67 {
69 DW_DESCRIBE_PORT(dwImageHandle_t, "IMAGE"_sv, PortBinding::REQUIRED));
70 };
71 static constexpr auto describeOutputPorts()
72 {
74 DW_DESCRIBE_PORT(dwPyramidImage, "LEVEL_IMAGES"_sv, PortBinding::REQUIRED));
75 };
76
78};
79
81{
82public:
83 static constexpr char LOG_TAG[] = "dwPyramidNode";
84
85 static constexpr auto describePasses()
86 {
88 describePass("SETUP"_sv, DW_PROCESSOR_TYPE_CPU),
89 describePass("BUILD_PYRAMID"_sv, DW_PROCESSOR_TYPE_GPU),
90 describePass("TEARDOWN"_sv, DW_PROCESSOR_TYPE_CPU));
91 };
92
93 static std::unique_ptr<dwPyramidNode> create(ParameterProvider& provider);
94
95 static constexpr auto describeParameters()
96 {
97 return describeConstructorArguments<dwPyramidNodeParams, dwContextHandle_t>(
100 uint32_t,
102 "cameraIndex"_sv,
103 &dwPyramidNodeParams::width),
105 uint32_t,
107 "cameraIndex"_sv,
110 uint32_t,
111 "pyramidLevelCount"_sv,
114 cudaStream_t,
115 "streamIndex"_sv,
119 dwContextHandle_t)));
120 }
121
123 const dwContextHandle_t ctx);
124};
125} // namespace framework
126} // namespace dw
127
128#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, 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 char LOG_TAG[]
dwPyramidNode(const dwPyramidNodeParams &config, const dwContextHandle_t ctx)
static constexpr auto describePasses()
cupvaStream_t cupvastream
Data Type of pyramid.
constexpr auto describePortCollection(Args &&... args)
constexpr std::tuple< dw::core::StringView, dwProcessorType > describePass(dw::core::StringView const &&name, dwProcessorType processorType)
constexpr auto describeConstructorArgument(const Args &&... args)
dwPyramidNodeParams { uint32_t width dwPyramidNodeParams
constexpr auto describePassCollection(const Args &&... args)
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