30 use precisn,
only: longint, wp
31 use mpi_gbl,
only: mpi_mod_wtime
47 integer,
intent(in) :: n
61 integer,
intent(in) :: width, height
73 integer,
intent(in) :: idx, height
74 integer,
intent(out) :: i, j
76 i = mod(idx - 1, height) + 1
77 j = (idx - 1) / height + 1
87 integer,
intent(in) :: idx_f, n
88 integer,
intent(out) :: row, column
89 integer :: idx, ii, k, jj
92 ii = n * (n + 1) / 2 - 1 - idx
93 k = int((sqrt(8.0_wp*real(ii,wp) + 1.0_wp) - 1.0_wp) / 2.0_wp, longint)
94 jj = ii - k * (k + 1) / 2
110 character(len=*),
intent(in) :: str
111 integer,
intent(in) :: table_size
112 integer :: i, chr, g, mask = int(z
"1FFFFFF")
115 do i = 1, len_trim(str)
116 chr = ichar(str(i:i))
117 h = ishft(h, 4) + chr
119 h = iand(ieor(h,g), mask)
121 h = 1 + modulo(h, table_size)