MPI-SCATCI  2.0
An MPI version of SCATCI
utility_module Module Reference

Utility module. More...

Functions/Subroutines

integer(longint) function, public compute_total_triangular (n)
 Calculate triangular area. More...
 
integer function, public compute_total_box (width, height)
 Calculate rectangular product. More...
 
subroutine, public box_index_to_ij (idx, height, i, j)
 Extract indices from rectangular multi-index. More...
 
subroutine, public triangular_index_to_ij (idx_f, N, row, column)
 Extract indices from triangular multi-index. More...
 
integer function, public string_hash (str, table_size)
 Calculate a string hash. More...
 
real(wp) function, public get_real_time ()
 Get current (real) time. More...
 
real(wp) function, public get_cpu_time ()
 Get current (CPU) time. More...
 

Detailed Description

Utility module.

Authors
A Al-Refaie
Date
2017
Note
16/01/2019 - Jakub Benda: Unifom coding style and expanded documentation.

Function/Subroutine Documentation

◆ box_index_to_ij()

subroutine, public utility_module::box_index_to_ij ( integer, intent(in)  idx,
integer, intent(in)  height,
integer, intent(out)  i,
integer, intent(out)  j 
)

Extract indices from rectangular multi-index.

Authors
A Al-Refaie
Date
2017

Definition at line 72 of file Utility_module.f90.

Here is the caller graph for this function:

◆ compute_total_box()

integer function, public utility_module::compute_total_box ( integer, intent(in)  width,
integer, intent(in)  height 
)

Calculate rectangular product.

Authors
A Al-Refaie
Date
2017

Calculate width*height.

Definition at line 60 of file Utility_module.f90.

Here is the caller graph for this function:

◆ compute_total_triangular()

integer(longint) function, public utility_module::compute_total_triangular ( integer, intent(in)  n)

Calculate triangular area.

Authors
A Al-Refaie
Date
2017

Calculate n*(n+1)/2.

Definition at line 46 of file Utility_module.f90.

◆ get_cpu_time()

real(wp) function, public utility_module::get_cpu_time

Get current (CPU) time.

Authors
A Al-Refaie
Date
2017

Definition at line 144 of file Utility_module.f90.

◆ get_real_time()

real(wp) function, public utility_module::get_real_time

Get current (real) time.

Authors
A Al-Refaie
Date
2017

Uses a function from GBTOlib.

Definition at line 132 of file Utility_module.f90.

Here is the caller graph for this function:

◆ string_hash()

integer function, public utility_module::string_hash ( character(len=*), intent(in)  str,
integer, intent(in)  table_size 
)

Calculate a string hash.

Authors
A Al-Refaie
Date
2017

This hash assumes at least 29-bit integers. It is supposedly documented in Aho, Sethi, and Ullman, pp. 434-438

Definition at line 109 of file Utility_module.f90.

Here is the caller graph for this function:

◆ triangular_index_to_ij()

subroutine, public utility_module::triangular_index_to_ij ( integer, intent(in)  idx_f,
integer, intent(in)  N,
integer, intent(out)  row,
integer, intent(out)  column 
)

Extract indices from triangular multi-index.

Authors
A Al-Refaie
Date
2017

Definition at line 86 of file Utility_module.f90.