38class CudaTransformContext {
40 CudaTransformContext();
41 ~CudaTransformContext();
44 CudaTransformContext(
const CudaTransformContext&) =
delete;
45 CudaTransformContext& operator=(
const CudaTransformContext&) =
delete;
64 bool resetBatch(
size_t total_max_points,
65 size_t max_single_cloud_points,
66 size_t input_point_step,
67 size_t output_point_step,
74 const std::vector<CudaFieldCopy>& copy_plan,
96 bool addCloud(
const uint8_t* input_data,
98 const float* rotation_matrix_host,
99 const float* translation_host,
100 bool apply_transform,
102 int desired_points = 0);
111 bool getBatchOutput(std::vector<uint8_t>& output_data,
size_t& valid_count);
114 bool ensureInputCapacity(
size_t num_points);
115 bool ensureOutputCapacity(
size_t total_max_points,
size_t point_step);
119 uint8_t* d_input_points_;
120 uint8_t* d_accumulated_buffer_;
121 unsigned int* d_global_count_;
122 void* d_cloud_metadata_;
126 unsigned int* h_global_count_pinned_;
127 void* h_cloud_metadata_pinned_;
132 size_t input_capacity_;
133 size_t output_capacity_;
134 size_t current_input_point_step_;
135 size_t current_output_point_step_;
136 size_t slot_size_points_;
138 size_t metadata_capacity_;
139 size_t copy_plan_capacity_;
141 int current_src_x_offset_;
142 int current_src_y_offset_;
143 int current_src_z_offset_;
144 int current_dst_x_offset_;
145 int current_dst_y_offset_;
146 int current_dst_z_offset_;
147 float current_x_min_;
148 float current_x_max_;
149 float current_y_min_;
150 float current_y_max_;
151 float current_z_min_;
152 float current_z_max_;
153 bool current_range_enable_;
157 std::vector<CloudMetadata> host_metadata_;
160 struct InputCloudInfo {
165 std::vector<InputCloudInfo> pending_inputs_;