Apollo  6.0
Open source self driving car software
nms_cuda.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2020 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *****************************************************************************/
16 
17 /*
18  * Copyright 2018-2019 Autoware Foundation. All rights reserved.
19  *
20  * Licensed under the Apache License, Version 2.0 (the "License");
21  * you may not use this file except in compliance with the License.
22  * You may obtain a copy of the License at
23  *
24  * http://www.apache.org/licenses/LICENSE-2.0
25  *
26  * Unless required by applicable law or agreed to in writing, software
27  * distributed under the License is distributed on an "AS IS" BASIS,
28  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29  * See the License for the specific language governing permissions and
30  * limitations under the License.
31  */
32 
40 #pragma once
41 
42 // heders in STL
43 #include <iostream>
44 #include <vector>
45 
46 // headers in local files
48 
49 namespace apollo {
50 namespace perception {
51 namespace lidar {
52 
53 class NmsCuda {
54  private:
55  const int num_threads_;
56  const int num_box_corners_;
57  const float nms_overlap_threshold_;
58 
59  public:
68  NmsCuda(const int num_threads, const int num_box_corners,
69  const float nms_overlap_threshold);
70 
79  void DoNmsCuda(const int host_filter_count, float* dev_sorted_box_for_nms,
80  int* out_keep_inds, int* out_num_to_keep);
81 };
82 
83 } // namespace lidar
84 } // namespace perception
85 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: nms_cuda.h:53
NmsCuda(const int num_threads, const int num_box_corners, const float nms_overlap_threshold)
Constructor.
void DoNmsCuda(const int host_filter_count, float *dev_sorted_box_for_nms, int *out_keep_inds, int *out_num_to_keep)
GPU Non-Maximum Suppresion for network output.