Apollo  6.0
Open source self driving car software
anchor_mask_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 namespace apollo {
43 namespace perception {
44 namespace lidar {
45 
47  private:
48  const int num_threads_;
49  const int num_inds_for_scan_;
50  const int num_anchor_;
51  const float min_x_range_;
52  const float min_y_range_;
53  const float pillar_x_size_;
54  const float pillar_y_size_;
55  const int grid_x_size_;
56  const int grid_y_size_;
57 
58  public:
72  AnchorMaskCuda(const int num_threads, const int num_inds_for_scan,
73  const int num_anchor, const float min_x_range,
74  const float min_y_range, const float pillar_x_size,
75  const float pillar_y_size, const int grid_x_size,
76  const int grid_y_size);
77 
100  void DoAnchorMaskCuda(int* dev_sparse_pillar_map, int* dev_cumsum_along_x,
101  int* dev_cumsum_along_y,
102  const float* dev_box_anchors_min_x,
103  const float* dev_box_anchors_min_y,
104  const float* dev_box_anchors_max_x,
105  const float* dev_box_anchors_max_y,
106  int* dev_anchor_mask);
107 };
108 
109 } // namespace lidar
110 } // namespace perception
111 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: anchor_mask_cuda.h:46
AnchorMaskCuda(const int num_threads, const int num_inds_for_scan, const int num_anchor, const float min_x_range, const float min_y_range, const float pillar_x_size, const float pillar_y_size, const int grid_x_size, const int grid_y_size)
Constructor.
void DoAnchorMaskCuda(int *dev_sparse_pillar_map, int *dev_cumsum_along_x, int *dev_cumsum_along_y, const float *dev_box_anchors_min_x, const float *dev_box_anchors_min_y, const float *dev_box_anchors_max_x, const float *dev_box_anchors_max_y, int *dev_anchor_mask)
call cuda code for making anchor mask