SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ safeindex()

integer function safeindex ( integer  indx,
integer  size1,
integer  size2 
)

Definition at line 1516 of file blacstest.f.

1517*
1518* .. Scalar Arguments ..
1519 INTEGER INDX, SIZE1, SIZE2
1520* ..
1521*
1522* If you have an array with elements of SIZE1 bytes, of which you
1523* have used INDX-1 elements, returns the index necessary to keep it
1524* on a SIZE2 boundary (assuming it was SIZE2 aligned in the first place).
1525*
1526* .. Local scalars ..
1527 INTEGER I
1528* ..
1529* .. Executable Statements ..
1530*
1531* Take into account that Fortran starts arrays at 1, not 0
1532*
1533 i = indx - 1
1534 10 CONTINUE
1535 IF( mod(i*size1, size2) .EQ. 0 ) GOTO 20
1536 i = i + 1
1537 GOTO 10
1538 20 CONTINUE
1539*
1540 safeindex = i + 1
1541*
1542 RETURN
integer function safeindex(indx, size1, size2)
Definition blacstest.f:1517
Here is the call graph for this function:
Here is the caller graph for this function: