Skip to content

Commit 69712e0

Browse files
authored
Avoid LHS reallocation in helper (#46)
1 parent c6ca532 commit 69712e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/scalapackfx.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,11 +2218,11 @@ contains
22182218
! Note that we explicitly multiply with a double here instead of
22192219
! dividing by an integer to enhance performance.
22202220
inv = 1.0_dp / real(descB, kind=dp)
2221-
blk = (globalInd - 1) * inv
2221+
blk(:) = (globalInd - 1) * inv
22222222

22232223
check = modulo(myPos - descSRC, nPos)
22242224

2225-
localPos = mod(blk + descSRC, nPos)
2225+
localPos(:) = mod(blk + descSRC, nPos)
22262226

22272227
calcAllIndices_ = .true.
22282228
if (present(calcAllIndices)) then

0 commit comments

Comments
 (0)