From e1ab8c8004d5141fc6f8693f9b0c21201a0f2820 Mon Sep 17 00:00:00 2001 From: Guillaume Marques Date: Wed, 24 Jan 2024 14:04:56 +0100 Subject: [PATCH] assert the semaphore idx is not nothing --- src/pcsr.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pcsr.jl b/src/pcsr.jl index 1126f1b..5c379ed 100644 --- a/src/pcsr.jl +++ b/src/pcsr.jl @@ -129,6 +129,7 @@ function addpartition!(pcsc::PackedCSC{K,T}, prev_sem_id::Int) where {K,T} for i in nb_semaphores:-1:(prev_sem_id+1) moved_sem_pos = pcsc.semaphores[i] semaphores[i+1] = semaphores[i] + @assert !isnothing(moved_sem_pos) pcsc.pma.array[moved_sem_pos] = (sem_key, T(i+1)) end end