From 61806ae22bcf0f267b63449ef75fd92e18df37cd Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sat, 29 Mar 2025 13:55:17 +0100 Subject: [PATCH] Define a parameter for sequential search limit in hash_map --- base/modules/desc/psb_hash_map_mod.F90 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base/modules/desc/psb_hash_map_mod.F90 b/base/modules/desc/psb_hash_map_mod.F90 index 316f145d..e83fd56b 100644 --- a/base/modules/desc/psb_hash_map_mod.F90 +++ b/base/modules/desc/psb_hash_map_mod.F90 @@ -118,6 +118,7 @@ module psb_hash_map_mod module procedure hash_srch_ipk, hash_srch_lpk end interface hash_srch private :: hash_srch + integer, parameter, private :: seqsrchmax=6 contains @@ -1773,7 +1774,7 @@ contains integer(psb_ipk_) :: lb,ub,lm res = -1 if (nh > 0) then - if (nh <= 6) then + if (nh <= seqsrchmax) then ! ! If the list is short, a sequential search is enough ! @@ -1815,7 +1816,7 @@ contains integer(psb_ipk_) :: lb,ub,lm res = -1 if (nh > 0) then - if (nh <= 6) then + if (nh <= seqsrchmax) then ! ! If the list is short, a sequential search is enough !