ROMS
Loading...
Searching...
No Matches
ran_state::ran_hash Interface Reference

Public Member Functions

subroutine ran_hash_s (il, ir)
 
subroutine ran_hash_v (il, ir)
 

Detailed Description

Definition at line 58 of file ran_state.F.

Member Function/Subroutine Documentation

◆ ran_hash_s()

subroutine ran_state::ran_hash::ran_hash_s ( integer(i8b), intent(inout) il,
integer(i8b), intent(inout) ir )

Definition at line 244 of file ran_state.F.

245!
246!=======================================================================
247! !
248! DES-like hashing of 32-bit integer, using shifts, xor, and adds to !
249! make the interval nonlinear function. Scalar version. !
250! !
251!=======================================================================
252!
253! Imported variable declarations.
254!
255 integer(i8b), intent(inout) :: il, ir
256!
257! Local variable declarations.
258!
259 integer(i8b) :: is, j
260!
261!-----------------------------------------------------------------------
262! Bit mixing. The various constants should not be changed.
263!-----------------------------------------------------------------------
264!
265 DO j=1,4
266 is=ir
267 ir=ieor(ir,ishft(ir,5))+1422217823
268 ir=ieor(ir,ishft(ir,-16))+1842055030
269 ir=ieor(ir,ishft(ir,9))+80567781
270 ir=ieor(il,ir)
271 il=is
272 END DO
273
274 RETURN

◆ ran_hash_v()

subroutine ran_state::ran_hash::ran_hash_v ( integer(i8b), dimension(:), intent(inout) il,
integer(i8b), dimension(:), intent(inout) ir )

Definition at line 277 of file ran_state.F.

278!
279!=======================================================================
280! !
281! DES-like hashing of 32-bit integer, using shifts, xor, and adds to !
282! make the interval nonlinear function. Vector version. !
283! !
284!=======================================================================
285!
286! Imported variable declarations.
287!
288 integer(i8b), intent(inout) :: il(:)
289 integer(i8b), intent(inout) :: ir(:)
290!
291! Local variable declarations.
292!
293 integer(i8b) :: j
294 integer(i8b), dimension(SIZE(il)) :: is
295!
296!-----------------------------------------------------------------------
297! Bit mixing. The various constants should not be changed.
298!-----------------------------------------------------------------------
299!
300 DO j=1,4
301 is=ir
302 ir=ieor(ir,ishft(ir,5))+1422217823
303 ir=ieor(ir,ishft(ir,-16))+1842055030
304 ir=ieor(ir,ishft(ir,9))+80567781
305 ir=ieor(il,ir)
306 il=is
307 END DO
308
309 RETURN

The documentation for this interface was generated from the following file: