NVIDIA DeepStream SDK API Reference

9.1 Release
9.1/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-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef DS3D_DATAFILTER_LIDAR_PREPROCESS_FILTER_IMPL_H
19 #define DS3D_DATAFILTER_LIDAR_PREPROCESS_FILTER_IMPL_H
20 
22 
23 #include "ds3d/common/helper/safe_queue.h"
24 #include "ds3d/common/helper/cuda_utils.h"
25 #include "ds3d/common/hpp/datafilter.hpp"
26 #include "ds3d/common/impl/impl_datafilter.h"
27 
28 #include "voxelization.hpp"
30 
31 namespace ds3d { namespace impl { namespace filter {
32 
33 class LidarPreprocessFilter : public BaseImplDataFilter {
34 public:
35  LidarPreprocessFilter() = default;
36  ~LidarPreprocessFilter() override;
37 
38 protected:
40  GuardDataMap datamap, OnGuardDataCBImpl outputDataCb,
41  OnGuardDataCBImpl inputConsumedCb) override;
42  ErrCode stopImpl() override;
43  ErrCode flushImpl() override;
44  ErrCode startImpl(const std::string& content, const std::string& path);
45 
46 private:
47  ErrCode reserveInputMem(uint& devId, uint32_t count, int& batchSize);
48  ErrCode doLidarPreProcess(GuardDataMap &dataMap, SharedBatchArray& batchArray);
49 
50  Config _config;
51  std::unordered_map<std::string, std::shared_ptr<BufferPool<UniqCudaTensorBuf>>> _inputBuferPoolMap;
52  volatile bool _inProcess = false;
53  Ptr<CudaStream> _cudaStream;
54  std::unique_ptr<bevfusion::pointpillars::Voxelization> _voxelization;
55 };
56 
57 }}} // namespace ds3d::impl::filter
58 
59 
60 #endif // DS3D_DATAFILTER_LIDAR_PREPROCESS_FILTER_IMPL_H
lidar_preprocess_config.h
ds3d::impl::filter::LidarPreprocessFilter::processImpl
ErrCode processImpl(GuardDataMap datamap, OnGuardDataCBImpl outputDataCb, OnGuardDataCBImpl inputConsumedCb) override
ds3d::impl::filter::LidarPreprocessFilter::~LidarPreprocessFilter
~LidarPreprocessFilter() override
nvdsinferserver::SharedBatchArray
std::shared_ptr< BaseBatchArray > SharedBatchArray
Definition: sources/libs/nvdsinferserver/infer_common.h:80
ds3d::impl::BaseImplDataProcessor< abiDataFilter >::OnGuardDataCBImpl
std::function< void(ErrCode, GuardDataMap)> OnGuardDataCBImpl
Definition: sources/includes/ds3d/common/impl/impl_dataprocess.h:33
ds3d::impl::filter::LidarPreprocessFilter::stopImpl
ErrCode stopImpl() override
ds3d::ErrCode
ErrCode
Definition: sources/includes/ds3d/common/common.h:47
voxelization.hpp
lidar_preprocess_filter.h
ds3d::impl::filter::LidarPreprocessFilter::LidarPreprocessFilter
LidarPreprocessFilter()=default
ds3d::impl::filter::LidarPreprocessFilter::flushImpl
ErrCode flushImpl() override
ds3d
Definition: sources/includes/ds3d/common/abi_dataprocess.h:25
ds3d::impl::filter::LidarPreprocessFilter::startImpl
ErrCode startImpl(const std::string &content, const std::string &path)