Apollo  6.0
Open source self driving car software
cuda_util.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2018 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 #include <vector>
18 
19 #include <cublas_v2.h>
20 
23 
24 namespace apollo {
25 namespace pnc_map {
26 
28  double x1;
29  double y1;
30  double x2;
31  double y2;
32 };
33 
35  public:
37 
38  bool UpdateLineSegment(
39  const std::vector<apollo::common::math::LineSegment2d>& segments);
40 
41  int FindNearestSegment(double x, double y);
42 
44 
45  private:
46  std::size_t size_ = 0;
47  CudaLineSegment2d* host_seg_;
48  double* dev_dist_;
49  CudaLineSegment2d* dev_seg_;
50  cublasHandle_t handle_;
51 };
52 
53 } // namespace pnc_map
54 } // namespace apollo
Definition: cuda_util.h:27
Define the LineSegment2d class.
Defines the Vec2d class.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
double x1
Definition: cuda_util.h:28
Definition: cuda_util.h:34
double y2
Definition: cuda_util.h:31
double x2
Definition: cuda_util.h:30
double y1
Definition: cuda_util.h:29