pfe_cuda.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #pragma once
  17. #include "common.h"
  18. namespace apollo {
  19. namespace perception {
  20. namespace lidar {
  21. class PfeCuda {
  22. public:
  23. PfeCuda(int max_num_pillars, int max_num_points_per_pillar,
  24. int num_point_feature, int num_gather_point_feature,
  25. float pillar_x_size, float pillar_y_size, float min_x_range,
  26. float min_y_range, int num_threads);
  27. ~PfeCuda() = default;
  28. void GatherPointFeature(float* dev_pillar_point_feature,
  29. float* dev_num_points_per_pillar,
  30. float* dev_pillar_coors,
  31. float* dev_pfe_gather_feature);
  32. private:
  33. int max_num_pillars_;
  34. int max_num_points_per_pillar_;
  35. int num_point_feature_;
  36. int num_gather_point_feature_;
  37. float pillar_x_size_;
  38. float pillar_y_size_;
  39. float min_x_range_;
  40. float min_y_range_;
  41. int num_threads_;
  42. };
  43. } // namespace lidar
  44. } // namespace perception
  45. } // namespace apollo