diff --git a/device/common/include/traccc/finding/device/impl/make_barcode_sequence.ipp b/device/common/include/traccc/finding/device/impl/make_barcode_sequence.ipp index c842edb2ef..0fe6b5d27e 100644 --- a/device/common/include/traccc/finding/device/impl/make_barcode_sequence.ipp +++ b/device/common/include/traccc/finding/device/impl/make_barcode_sequence.ipp @@ -1,12 +1,15 @@ /** TRACCC library, part of the ACTS project (R&D line) * - * (c) 2023 CERN for the benefit of the ACTS project + * (c) 2023-2024 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ #pragma once +// System include(s). +#include + namespace traccc::device { TRACCC_DEVICE inline void make_barcode_sequence( @@ -16,8 +19,9 @@ TRACCC_DEVICE inline void make_barcode_sequence( measurement_collection_types::const_device uniques(uniques_view); vecmem::device_vector barcodes(barcodes_view); + assert(uniques.size() >= barcodes.size()); - if (globalIndex >= uniques.size()) { + if (globalIndex >= barcodes.size()) { return; }