66#include < Eigen/Core>
77#include < thrust/device_vector.h>
88
9+ #include < gtsam_points/cuda/kernels/correspondence.hpp>
910#include < gtsam_points/cuda/kernels/pose.cuh>
1011#include < gtsam_points/cuda/kernels/linearized_system.cuh>
1112
@@ -24,9 +25,9 @@ struct gicp_derivatives_kernel {
2425 source_means_ptr(source_means),
2526 source_covs_ptr(source_covs) {}
2627
27- __device__ LinearizedSystem6 operator ()(const thrust::pair< int , int > & source_target_correspondence) const {
28- const int source_idx = source_target_correspondence.first ;
29- const int target_idx = source_target_correspondence.second ;
28+ __device__ LinearizedSystem6 operator ()(const Correspondence & source_target_correspondence) const {
29+ const int source_idx = source_target_correspondence.source_idx ;
30+ const int target_idx = source_target_correspondence.target_idx ;
3031 if (source_idx < 0 || target_idx < 0 ) {
3132 return LinearizedSystem6::zero ();
3233 }
@@ -93,9 +94,9 @@ struct gicp_error_kernel {
9394 source_means_ptr(source_means),
9495 source_covs_ptr(source_covs) {}
9596
96- __device__ float operator ()(const thrust::pair< int , int > & source_target_correspondence) const {
97- const int source_idx = source_target_correspondence.first ;
98- const int target_idx = source_target_correspondence.second ;
97+ __device__ float operator ()(const Correspondence & source_target_correspondence) const {
98+ const int source_idx = source_target_correspondence.source_idx ;
99+ const int target_idx = source_target_correspondence.target_idx ;
99100 if (source_idx < 0 || target_idx < 0 ) {
100101 return 0 .0f ;
101102 }
0 commit comments