Skip to content

Commit 6ff57e5

Browse files
authored
Merge pull request #955 from beomki-yeo/barcode-sequencer-test
Check overflow in barcode sequencer
2 parents 5f52af0 + d6a59a0 commit 6ff57e5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/include/detray/propagator/actors/barcode_sequencer.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ struct barcode_sequencer : actor {
2424

2525
using sequence_t = vecmem::device_vector<detray::geometry::barcode>;
2626
sequence_t _sequence;
27+
bool overflow = false;
2728

2829
/// Constructor with the vector of track states
2930
DETRAY_HOST_DEVICE
@@ -41,6 +42,11 @@ struct barcode_sequencer : actor {
4142
return;
4243
}
4344

45+
if (actor_state._sequence.size() == actor_state._sequence.capacity()) {
46+
actor_state.overflow = true;
47+
return;
48+
}
49+
4450
const auto& bcd = navigation.current().sf_desc.barcode();
4551
assert(!bcd.is_invalid());
4652

0 commit comments

Comments
 (0)