Skip to content

Commit 583abd4

Browse files
committed
Remove Thrust pair type from prefix sum code
It turns out (see acts-project#816) that simply removing Thrust from the core library is not enough; it needs to be further removed from the common device code, too. Although this commit is unlikely to resolve the issue (as some Thrust functions are still called in the common device code), removing the last use of the Thrust pair type serves to make me feel better.
1 parent ef23946 commit 583abd4

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

device/common/include/traccc/device/fill_prefix_sum.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@
1010
// Project include(s).
1111
#include "traccc/definitions/qualifiers.hpp"
1212
#include "traccc/edm/container.hpp"
13+
#include "traccc/utils/pair.hpp"
1314

1415
// VecMem include(s).
1516
#include <vecmem/memory/memory_resource.hpp>
1617
#include <vecmem/utils/copy.hpp>
1718

18-
// Thrust include(s).
19-
#include <thrust/pair.h>
20-
2119
namespace traccc::device {
2220

2321
/// Type for the individual elements in the prefix sum vector
24-
typedef thrust::pair<unsigned int, unsigned int> prefix_sum_element_t;
22+
typedef traccc::pair<unsigned int, unsigned int> prefix_sum_element_t;
2523

2624
/// Convenience type definition for the return value of the helper function
2725
typedef vecmem::vector<prefix_sum_element_t> prefix_sum_t;

device/common/include/traccc/device/impl/fill_prefix_sum.ipp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ inline void fill_prefix_sum(
2828
const prefix_sum_size_t current =
2929
sizes[static_cast<unsigned int>(globalIndex)];
3030
for (prefix_sum_size_t i = 0; i < current - previous; ++i) {
31-
result.at(previous + i) = {globalIndex, i};
31+
result.at(previous + i) = {static_cast<unsigned int>(globalIndex), i};
3232
}
3333
}
3434

0 commit comments

Comments
 (0)