From dc249fb1257753e3f2e277653e478d0c5d28569f Mon Sep 17 00:00:00 2001 From: Ben Hourahine Date: Tue, 12 Aug 2025 23:15:48 +0100 Subject: [PATCH] Avoid LHS reallocation in helper --- lib/scalapackfx.fpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/scalapackfx.fpp b/lib/scalapackfx.fpp index 9238037..a9bdb23 100644 --- a/lib/scalapackfx.fpp +++ b/lib/scalapackfx.fpp @@ -2161,11 +2161,11 @@ contains ! Note that we explicitly multiply with a double here instead of ! dividing by an integer to enhance performance. inv = 1.0_dp / real(descB, kind=dp) - blk = (globalInd - 1) * inv + blk(:) = (globalInd - 1) * inv check = modulo(myPos - descSRC, nPos) - localPos = mod(blk + descSRC, nPos) + localPos(:) = mod(blk + descSRC, nPos) calcAllIndices_ = .true. if (present(calcAllIndices)) then