NVIDIA DeepStream SDK API Reference

9.0 Release
9.0/sources/libs/ds3d/datafilter/lidar_preprocess/lidar_preprocess_filter_impl.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef DS3D_DATAFILTER_LIDAR_PREPROCESS_FILTER_IMPL_H
14 #define DS3D_DATAFILTER_LIDAR_PREPROCESS_FILTER_IMPL_H
15 
17 
18 #include "ds3d/common/helper/safe_queue.h"
19 #include "ds3d/common/helper/cuda_utils.h"
20 #include "ds3d/common/hpp/datafilter.hpp"
21 #include "ds3d/common/impl/impl_datafilter.h"
22 
23 #include "voxelization.hpp"
25 
26 namespace ds3d { namespace impl { namespace filter {
27 
28 class LidarPreprocessFilter : public BaseImplDataFilter {
29 public:
30  LidarPreprocessFilter() = default;
31  ~LidarPreprocessFilter() override;
32 
33 protected:
35  GuardDataMap datamap, OnGuardDataCBImpl outputDataCb,
36  OnGuardDataCBImpl inputConsumedCb) override;
37  ErrCode stopImpl() override;
38  ErrCode flushImpl() override;
39  ErrCode startImpl(const std::string& content, const std::string& path);
40 
41 private:
42  ErrCode reserveInputMem(uint& devId, uint32_t count, int& batchSize);
43  ErrCode doLidarPreProcess(GuardDataMap &dataMap, SharedBatchArray& batchArray);
44 
45  Config _config;
46  std::unordered_map<std::string, std::shared_ptr<BufferPool<UniqCudaTensorBuf>>> _inputBuferPoolMap;
47  volatile bool _inProcess = false;
48  Ptr<CudaStream> _cudaStream;
49  std::unique_ptr<bevfusion::pointpillars::Voxelization> _voxelization;
50 };
51 
52 }}} // namespace ds3d::impl::filter
53 
54 
55 #endif // DS3D_DATAFILTER_LIDAR_PREPROCESS_FILTER_IMPL_H
lidar_preprocess_filter.h
ds3d::impl::filter::LidarPreprocessFilter::processImpl
ErrCode processImpl(GuardDataMap datamap, OnGuardDataCBImpl outputDataCb, OnGuardDataCBImpl inputConsumedCb) override
ds3d::impl::filter::LidarPreprocessFilter::~LidarPreprocessFilter
~LidarPreprocessFilter() override
lidar_preprocess_config.h
nvdsinferserver::SharedBatchArray
std::shared_ptr< BaseBatchArray > SharedBatchArray
Definition: sources/libs/nvdsinferserver/infer_common.h:75
ds3d::impl::BaseImplDataProcessor< abiDataFilter >::OnGuardDataCBImpl
std::function< void(ErrCode, GuardDataMap)> OnGuardDataCBImpl
Definition: sources/includes/ds3d/common/impl/impl_dataprocess.h:29
ds3d::impl::filter::LidarPreprocessFilter::stopImpl
ErrCode stopImpl() override
ds3d::ErrCode
ErrCode
Definition: sources/includes/ds3d/common/common.h:43
voxelization.hpp
ds3d::impl::filter::LidarPreprocessFilter::LidarPreprocessFilter
LidarPreprocessFilter()=default
ds3d::impl::filter::LidarPreprocessFilter::flushImpl
ErrCode flushImpl() override
ds3d
Definition: sources/includes/ds3d/common/abi_dataprocess.h:21
ds3d::impl::filter::LidarPreprocessFilter::startImpl
ErrCode startImpl(const std::string &content, const std::string &path)