Skip to content

Commit fcad69a

Browse files
authored
Merge pull request #1133 from stephenswat/fix/cuda_13_thrust_identity
Replace deprecated `thrust::identity` type
2 parents 30b2c9b + 475c5e4 commit fcad69a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

device/cuda/src/ambiguity_resolution/greedy_ambiguity_resolution_algorithm.cu

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@
3939
#include <thrust/unique.h>
4040
namespace traccc::cuda {
4141

42+
struct identity_op {
43+
template <typename T>
44+
TRACCC_HOST_DEVICE T operator()(T i) const {
45+
return i;
46+
}
47+
};
48+
4249
// Device operator to calculate relative number of shared measurements
4350
struct devide_op {
4451
TRACCC_HOST_DEVICE
@@ -200,7 +207,7 @@ greedy_ambiguity_resolution_algorithm::operator()(
200207
auto cit_begin = thrust::counting_iterator<int>(0);
201208
auto cit_end = cit_begin + n_tracks;
202209
thrust::copy_if(thrust_policy, cit_begin, cit_end, status_buffer.ptr(),
203-
pre_accepted_ids_buffer.ptr(), thrust::identity<int>());
210+
pre_accepted_ids_buffer.ptr(), identity_op{});
204211

205212
// Sort the flat measurement id vector
206213
thrust::sort(thrust_policy, flat_meas_ids_buffer.ptr(),

0 commit comments

Comments
 (0)