Apollo 10.0
自动驾驶开放平台
object_pool_types.h
浏览该文件的文档.
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#pragma once
17
23
24namespace apollo {
25namespace perception {
26namespace base {
27
29 void operator()(Object* object) const { object->Reset(); }
30};
31
32template <typename T>
35 cloud->clear();
36 }
37};
38
39template <typename T>
42 cloud->clear();
43 }
44};
45
47 void operator()(Frame* frame) const { frame->Reset(); }
48};
49
50static const size_t kObjectPoolSize = 10000;
51static const size_t kPointCloudPoolSize = 1000;
52static const size_t kFramePoolSize = 100;
53
58 kPointCloudPoolSize,
62 kPointCloudPoolSize,
66 kPointCloudPoolSize,
70 kPointCloudPoolSize,
73
74} // namespace base
75} // namespace perception
76} // namespace apollo
ConcurrentObjectPool< Frame, kFramePoolSize, FrameInitializer > FramePool
ConcurrentObjectPool< AttributePointCloud< PointD >, kPointCloudPoolSize, PointCloudInitializer< double > > PointDCloudPool
ConcurrentObjectPool< AttributeRadarPointCloud< RadarPointD >, kPointCloudPoolSize, RadarPointCloudInitializer< double > > RadarPointDCloudPool
ConcurrentObjectPool< AttributeRadarPointCloud< RadarPointF >, kPointCloudPoolSize, RadarPointCloudInitializer< double > > RadarPointFCloudPool
ConcurrentObjectPool< Object, kObjectPoolSize, ObjectInitializer > ObjectPool
ConcurrentObjectPool< AttributePointCloud< PointF >, kPointCloudPoolSize, PointCloudInitializer< float > > PointFCloudPool
class register implement
Definition arena_queue.h:37
void operator()(AttributePointCloud< Point< T > > *cloud) const
void operator()(AttributeRadarPointCloud< RadarPoint< T > > *cloud) const