DCS
a Driven-Cavity Open source Simulator code
 All Classes Files Functions Variables Groups Pages
IR_Precision

Portable kind-parameters module. More...

+ Collaboration diagram for IR_Precision:
elemental integer(i2p) function ir_precision::bit_size_r16p (r)
 Procedure for computing the number of bits of a real variable. More...
 
elemental integer(i1p) function ir_precision::bit_size_r8p (r)
 Procedure for computing the number of bits of a real variable. More...
 
elemental integer(i1p) function ir_precision::bit_size_r4p (r)
 Procedure for computing the number of bits of a real variable. More...
 
elemental integer(i4p) function ir_precision::bit_size_chr (c)
 Procedure for computing the number of bits of a character variable. More...
 
elemental integer(i1p) function ir_precision::byte_size_i8p (i)
 Procedure for computing the number of bytes of an integer variable. More...
 
elemental integer(i1p) function ir_precision::byte_size_i4p (i)
 Procedure for computing the number of bytes of an integer variable. More...
 
elemental integer(i1p) function ir_precision::byte_size_i2p (i)
 Procedure for computing the number of bytes of an integer variable. More...
 
elemental integer(i1p) function ir_precision::byte_size_i1p (i)
 Procedure for computing the number of bytes of an integer variable. More...
 
elemental integer(i1p) function ir_precision::byte_size_r16p (r)
 Procedure for computing the number of bytes of a real variable. More...
 
elemental integer(i1p) function ir_precision::byte_size_r8p (r)
 Procedure for computing the number of bytes of a real variable. More...
 
elemental integer(i1p) function ir_precision::byte_size_r4p (r)
 Procedure for computing the number of bytes of a real variable. More...
 
elemental integer(i4p) function ir_precision::byte_size_chr (c)
 Procedure for computing the number of bytes of a character variable. More...
 
elemental character(dr16p) function ir_precision::strf_r16p (fm, n)
 Procedure for converting real to string. More...
 
elemental character(dr8p) function ir_precision::strf_r8p (fm, n)
 Procedure for converting real to string. More...
 
elemental character(dr4p) function ir_precision::strf_r4p (fm, n)
 Procedure for converting real to string. More...
 
elemental character(di8p) function ir_precision::strf_i8p (fm, n)
 Procedure for converting integer to string. More...
 
elemental character(di4p) function ir_precision::strf_i4p (fm, n)
 Procedure for converting integer to string. More...
 
elemental character(di2p) function ir_precision::strf_i2p (fm, n)
 Procedure for converting integer to string. More...
 
elemental character(di1p) function ir_precision::strf_i1p (fm, n)
 Procedure for converting integer to string. More...
 
elemental character(dr16p) function ir_precision::str_r16p (no_sign, n)
 Procedure for converting real to string. More...
 
elemental character(dr8p) function ir_precision::str_r8p (no_sign, n)
 Procedure for converting real to string. More...
 
elemental character(dr4p) function ir_precision::str_r4p (no_sign, n)
 Procedure for converting real to string. More...
 
elemental character(di8p) function ir_precision::str_i8p (no_sign, n)
 Procedure for converting integer to string. More...
 
elemental character(di4p) function ir_precision::str_i4p (no_sign, n)
 Procedure for converting integer to string. More...
 
elemental character(di2p) function ir_precision::str_i2p (no_sign, n)
 Procedure for converting integer to string. More...
 
elemental character(di1p) function ir_precision::str_i1p (no_sign, n)
 Procedure for converting integer to string. More...
 
elemental character(di8p) function ir_precision::strz_i8p (nz_pad, n)
 Procedure for converting integer to string, prefixing with the right number of zeros. More...
 
elemental character(di4p) function ir_precision::strz_i4p (nz_pad, n)
 Procedure for converting integer to string, prefixing with the right number of zeros. More...
 
elemental character(di2p) function ir_precision::strz_i2p (nz_pad, n)
 Procedure for converting integer to string, prefixing with the right number of zeros. More...
 
elemental character(di1p) function ir_precision::strz_i1p (nz_pad, n)
 Procedure for converting integer to string, prefixing with the right number of zeros. More...
 
real(r16p) function ir_precision::ctor_r16p (str, knd)
 Procedure for converting string to real. More...
 
real(r8p) function ir_precision::ctor_r8p (str, knd)
 Procedure for converting string to real. More...
 
real(r4p) function ir_precision::ctor_r4p (str, knd)
 Procedure for converting string to real. More...
 
integer(i8p) function ir_precision::ctoi_i8p (str, knd)
 Procedure for converting string to integer. More...
 
integer(i4p) function ir_precision::ctoi_i4p (str, knd)
 Procedure for converting string to integer. More...
 
integer(i2p) function ir_precision::ctoi_i2p (str, knd)
 Procedure for converting string to integer. More...
 
integer(i1p) function ir_precision::ctoi_i1p (str, knd)
 Procedure for converting string to integer. More...
 
elemental character(128) function ir_precision::bstr_r16p (n)
 Procedure for converting real to string of bits. More...
 
elemental character(64) function ir_precision::bstr_r8p (n)
 Procedure for converting real to string of bits. More...
 
elemental character(32) function ir_precision::bstr_r4p (n)
 Procedure for converting real to string of bits. More...
 
elemental character(64) function ir_precision::bstr_i8p (n)
 Procedure for converting integer to string of bits. More...
 
elemental character(32) function ir_precision::bstr_i4p (n)
 Procedure for converting integer to string of bits. More...
 
elemental character(16) function ir_precision::bstr_i2p (n)
 Procedure for converting integer to string of bits. More...
 
elemental character(8) function ir_precision::bstr_i1p (n)
 Procedure for converting integer to string of bits. More...
 
elemental real(r8p) function ir_precision::bctor_r8p (bstr, knd)
 Procedure for converting bit-string to real. More...
 
elemental real(r4p) function ir_precision::bctor_r4p (bstr, knd)
 Procedure for converting bit-string to real. More...
 
elemental integer(i8p) function ir_precision::bctoi_i8p (bstr, knd)
 Procedure for converting bit-string to integer. More...
 
elemental integer(i4p) function ir_precision::bctoi_i4p (bstr, knd)
 Procedure for converting bit-string to integer. More...
 
elemental integer(i2p) function ir_precision::bctoi_i2p (bstr, knd)
 Procedure for converting bit-string to integer. More...
 
elemental integer(i1p) function ir_precision::bctoi_i1p (bstr, knd)
 Procedure for converting bit-string to integer. More...
 

Detailed Description

Portable kind-parameters module.

Function/Subroutine Documentation

elemental integer(i2p) function ir_precision::bit_size_r16p ( real(r16p), intent(in)  r)
private

Procedure for computing the number of bits of a real variable.

Parameters
[in]rReal variable whose number of bits must be computed.

Definition at line 390 of file IR_Precision.f90.

elemental integer(i1p) function ir_precision::bit_size_r8p ( real(r8p), intent(in)  r)
private

Procedure for computing the number of bits of a real variable.

Parameters
[in]rReal variable whose number of bits must be computed.

Definition at line 405 of file IR_Precision.f90.

elemental integer(i1p) function ir_precision::bit_size_r4p ( real(r4p), intent(in)  r)
private

Procedure for computing the number of bits of a real variable.

Parameters
[in]rReal variable whose number of bits must be computed.

Definition at line 420 of file IR_Precision.f90.

elemental integer(i4p) function ir_precision::bit_size_chr ( character(*), intent(in)  c)
private

Procedure for computing the number of bits of a character variable.

Parameters
[in]cCharacter variable whose number of bits must be computed.

Definition at line 435 of file IR_Precision.f90.

elemental integer(i1p) function ir_precision::byte_size_i8p ( integer(i8p), intent(in)  i)
private

Procedure for computing the number of bytes of an integer variable.

Parameters
[in]iInteger variable whose number of bytes must be computed.

Definition at line 450 of file IR_Precision.f90.

elemental integer(i1p) function ir_precision::byte_size_i4p ( integer(i4p), intent(in)  i)
private

Procedure for computing the number of bytes of an integer variable.

Parameters
[in]iInteger variable whose number of bytes must be computed.

Definition at line 464 of file IR_Precision.f90.

elemental integer(i1p) function ir_precision::byte_size_i2p ( integer(i2p), intent(in)  i)
private

Procedure for computing the number of bytes of an integer variable.

Parameters
[in]iInteger variable whose number of bytes must be computed.

Definition at line 478 of file IR_Precision.f90.

elemental integer(i1p) function ir_precision::byte_size_i1p ( integer(i1p), intent(in)  i)
private

Procedure for computing the number of bytes of an integer variable.

Parameters
[in]iInteger variable whose number of bytes must be computed.

Definition at line 492 of file IR_Precision.f90.

elemental integer(i1p) function ir_precision::byte_size_r16p ( real(r16p), intent(in)  r)
private

Procedure for computing the number of bytes of a real variable.

Parameters
[in]rReal variable whose number of bytes must be computed.

Definition at line 506 of file IR_Precision.f90.

elemental integer(i1p) function ir_precision::byte_size_r8p ( real(r8p), intent(in)  r)
private

Procedure for computing the number of bytes of a real variable.

Parameters
[in]rReal variable whose number of bytes must be computed.

Definition at line 520 of file IR_Precision.f90.

elemental integer(i1p) function ir_precision::byte_size_r4p ( real(r4p), intent(in)  r)
private

Procedure for computing the number of bytes of a real variable.

Parameters
[in]rReal variable whose number of bytes must be computed.

Definition at line 534 of file IR_Precision.f90.

elemental integer(i4p) function ir_precision::byte_size_chr ( character(*), intent(in)  c)
private

Procedure for computing the number of bytes of a character variable.

Parameters
[in]cCharacter variable whose number of bytes must be computed.

Definition at line 548 of file IR_Precision.f90.

elemental character(dr16p) function ir_precision::strf_r16p ( character(*), intent(in)  fm,
real(r16p), intent(in)  n 
)
private

Procedure for converting real to string.

This function achieves casting of real to string.

Parameters
[in]fmFormat different from the standard for the kind.
[in]nReal to be converted.

Definition at line 562 of file IR_Precision.f90.

elemental character(dr8p) function ir_precision::strf_r8p ( character(*), intent(in)  fm,
real(r8p), intent(in)  n 
)
private

Procedure for converting real to string.

This function achieves casting of real to string.

Parameters
[in]fmFormat different from the standard for the kind.
[in]nReal to be converted.

Definition at line 577 of file IR_Precision.f90.

elemental character(dr4p) function ir_precision::strf_r4p ( character(*), intent(in)  fm,
real(r4p), intent(in)  n 
)
private

Procedure for converting real to string.

This function achieves casting of real to string.

Parameters
[in]fmFormat different from the standard for the kind.
[in]nReal to be converted.

Definition at line 592 of file IR_Precision.f90.

elemental character(di8p) function ir_precision::strf_i8p ( character(*), intent(in)  fm,
integer(i8p), intent(in)  n 
)
private

Procedure for converting integer to string.

This function achieves casting of integer to string.

Parameters
[in]fmFormat different from the standard for the kind.
[in]nInteger to be converted.

Definition at line 607 of file IR_Precision.f90.

elemental character(di4p) function ir_precision::strf_i4p ( character(*), intent(in)  fm,
integer(i4p), intent(in)  n 
)
private

Procedure for converting integer to string.

This function achieves casting of integer to string.

Parameters
[in]fmFormat different from the standard for the kind.
[in]nInteger to be converted.

Definition at line 622 of file IR_Precision.f90.

elemental character(di2p) function ir_precision::strf_i2p ( character(*), intent(in)  fm,
integer(i2p), intent(in)  n 
)
private

Procedure for converting integer to string.

This function achieves casting of integer to string.

Parameters
[in]fmFormat different from the standard for the kind.
[in]nInteger to be converted.

Definition at line 637 of file IR_Precision.f90.

elemental character(di1p) function ir_precision::strf_i1p ( character(*), intent(in)  fm,
integer(i1p), intent(in)  n 
)
private

Procedure for converting integer to string.

This function achieves casting of integer to string.

Parameters
[in]fmFormat different from the standard for the kind.
[in]nInteger to be converted.

Definition at line 652 of file IR_Precision.f90.

elemental character(dr16p) function ir_precision::str_r16p ( logical, intent(in), optional  no_sign,
real(r16p), intent(in)  n 
)
private

Procedure for converting real to string.

This function achieves casting of real to string.

Parameters
[in]no_signFlag for leaving out the sign.
[in]nReal to be converted.

Definition at line 667 of file IR_Precision.f90.

elemental character(dr8p) function ir_precision::str_r8p ( logical, intent(in), optional  no_sign,
real(r8p), intent(in)  n 
)
private

Procedure for converting real to string.

This function achieves casting of real to string.

Parameters
[in]no_signFlag for leaving out the sign.
[in]nReal to be converted.

Definition at line 684 of file IR_Precision.f90.

elemental character(dr4p) function ir_precision::str_r4p ( logical, intent(in), optional  no_sign,
real(r4p), intent(in)  n 
)
private

Procedure for converting real to string.

This function achieves casting of real to string.

Parameters
[in]no_signFlag for leaving out the sign.
[in]nReal to be converted.

Definition at line 701 of file IR_Precision.f90.

elemental character(di8p) function ir_precision::str_i8p ( logical, intent(in), optional  no_sign,
integer(i8p), intent(in)  n 
)
private

Procedure for converting integer to string.

This function achieves casting of integer to string.

Parameters
[in]no_signFlag for leaving out the sign.
[in]nInteger to be converted.

Definition at line 718 of file IR_Precision.f90.

elemental character(di4p) function ir_precision::str_i4p ( logical, intent(in), optional  no_sign,
integer(i4p), intent(in)  n 
)
private

Procedure for converting integer to string.

This function achieves casting of integer to string.

Parameters
[in]no_signFlag for leaving out the sign.
[in]nInteger to be converted.

Definition at line 736 of file IR_Precision.f90.

elemental character(di2p) function ir_precision::str_i2p ( logical, intent(in), optional  no_sign,
integer(i2p), intent(in)  n 
)
private

Procedure for converting integer to string.

This function achieves casting of integer to string.

Parameters
[in]no_signFlag for leaving out the sign.
[in]nInteger to be converted.

Definition at line 754 of file IR_Precision.f90.

elemental character(di1p) function ir_precision::str_i1p ( logical, intent(in), optional  no_sign,
integer(i1p), intent(in)  n 
)
private

Procedure for converting integer to string.

This function achieves casting of integer to string.

Parameters
[in]no_signFlag for leaving out the sign.
[in]nInteger to be converted.

Definition at line 772 of file IR_Precision.f90.

elemental character(di8p) function ir_precision::strz_i8p ( integer(i4p), intent(in), optional  nz_pad,
integer(i8p), intent(in)  n 
)
private

Procedure for converting integer to string, prefixing with the right number of zeros.

This function achieves casting of integer to string.

Parameters
[in]nz_padNumber of zeros padding.
[in]nInteger to be converted.

Definition at line 791 of file IR_Precision.f90.

elemental character(di4p) function ir_precision::strz_i4p ( integer(i4p), intent(in), optional  nz_pad,
integer(i4p), intent(in)  n 
)
private

Procedure for converting integer to string, prefixing with the right number of zeros.

This function achieves casting of integer to string.

Parameters
[in]nz_padNumber of zeros padding.
[in]nInteger to be converted.

Definition at line 809 of file IR_Precision.f90.

elemental character(di2p) function ir_precision::strz_i2p ( integer(i4p), intent(in), optional  nz_pad,
integer(i2p), intent(in)  n 
)
private

Procedure for converting integer to string, prefixing with the right number of zeros.

This function achieves casting of integer to string.

Parameters
[in]nz_padNumber of zeros padding.
[in]nInteger to be converted.

Definition at line 827 of file IR_Precision.f90.

elemental character(di1p) function ir_precision::strz_i1p ( integer(i4p), intent(in), optional  nz_pad,
integer(i1p), intent(in)  n 
)
private

Procedure for converting integer to string, prefixing with the right number of zeros.

This function achieves casting of integer to string.

Parameters
[in]nz_padNumber of zeros padding.
[in]nInteger to be converted.

Definition at line 845 of file IR_Precision.f90.

real(r16p) function ir_precision::ctor_r16p ( character(*), intent(in)  str,
real(r16p), intent(in)  knd 
)
private

Procedure for converting string to real.

This function achieves casting of string to real.

Parameters
[in]strString containing input number.
[in]kndNumber kind.

Definition at line 862 of file IR_Precision.f90.

real(r8p) function ir_precision::ctor_r8p ( character(*), intent(in)  str,
real(r8p), intent(in)  knd 
)
private

Procedure for converting string to real.

This function achieves casting of string to real.

Parameters
[in]strString containing input number.
[in]kndNumber kind.

Definition at line 883 of file IR_Precision.f90.

real(r4p) function ir_precision::ctor_r4p ( character(*), intent(in)  str,
real(r4p), intent(in)  knd 
)
private

Procedure for converting string to real.

This function achieves casting of string to real.

Parameters
[in]strString containing input number.
[in]kndNumber kind.

Definition at line 904 of file IR_Precision.f90.

integer(i8p) function ir_precision::ctoi_i8p ( character(*), intent(in)  str,
integer(i8p), intent(in)  knd 
)
private

Procedure for converting string to integer.

This function achieves casting of string to integer.

Parameters
[in]strString containing input number.
[in]kndNumber kind.

Definition at line 925 of file IR_Precision.f90.

integer(i4p) function ir_precision::ctoi_i4p ( character(*), intent(in)  str,
integer(i4p), intent(in)  knd 
)
private

Procedure for converting string to integer.

This function achieves casting of string to integer.

Parameters
[in]strString containing input number.
[in]kndNumber kind.

Definition at line 946 of file IR_Precision.f90.

integer(i2p) function ir_precision::ctoi_i2p ( character(*), intent(in)  str,
integer(i2p), intent(in)  knd 
)
private

Procedure for converting string to integer.

This function achieves casting of string to integer.

Parameters
[in]strString containing input number.
[in]kndNumber kind.

Definition at line 967 of file IR_Precision.f90.

integer(i1p) function ir_precision::ctoi_i1p ( character(*), intent(in)  str,
integer(i1p), intent(in)  knd 
)
private

Procedure for converting string to integer.

This function achieves casting of string to integer.

Parameters
[in]strString containing input number.
[in]kndNumber kind.

Definition at line 988 of file IR_Precision.f90.

elemental character(128) function ir_precision::bstr_r16p ( real(r8p), intent(in)  n)
private

Procedure for converting real to string of bits.

This function achieves casting of real to bit-string.

Note
It is assumed that R16P is represented by means of 128 bits, but this is not ensured in all architectures.
Parameters
[in]nReal to be converted.

Definition at line 1010 of file IR_Precision.f90.

elemental character(64) function ir_precision::bstr_r8p ( real(r8p), intent(in)  n)
private

Procedure for converting real to string of bits.

This function achieves casting of real to bit-string.

Note
It is assumed that R8P is represented by means of 64 bits, but this is not ensured in all architectures.
Parameters
[in]nReal to be converted.

Definition at line 1025 of file IR_Precision.f90.

elemental character(32) function ir_precision::bstr_r4p ( real(r4p), intent(in)  n)
private

Procedure for converting real to string of bits.

This function achieves casting of real to bit-string.

Note
It is assumed that R4P is represented by means of 32 bits, but this is not ensured in all architectures.
Parameters
[in]nReal to be converted.

Definition at line 1040 of file IR_Precision.f90.

elemental character(64) function ir_precision::bstr_i8p ( integer(i8p), intent(in)  n)
private

Procedure for converting integer to string of bits.

This function achieves casting of integer to bit-string.

Note
It is assumed that I8P is represented by means of 64 bits, but this is not ensured in all architectures.
Parameters
[in]nReal to be converted.

Definition at line 1055 of file IR_Precision.f90.

elemental character(32) function ir_precision::bstr_i4p ( integer(i4p), intent(in)  n)
private

Procedure for converting integer to string of bits.

This function achieves casting of integer to bit-string.

Note
It is assumed that I4P is represented by means of 32 bits, but this is not ensured in all architectures.
Parameters
[in]nReal to be converted.

Definition at line 1070 of file IR_Precision.f90.

elemental character(16) function ir_precision::bstr_i2p ( integer(i2p), intent(in)  n)
private

Procedure for converting integer to string of bits.

This function achieves casting of integer to bit-string.

Note
It is assumed that I2P is represented by means of 16 bits, but this is not ensured in all architectures.
Parameters
[in]nReal to be converted.

Definition at line 1085 of file IR_Precision.f90.

elemental character(8) function ir_precision::bstr_i1p ( integer(i1p), intent(in)  n)
private

Procedure for converting integer to string of bits.

This function achieves casting of integer to bit-string.

Note
It is assumed that I1P is represented by means of 8 bits, but this is not ensured in all architectures.
Parameters
[in]nReal to be converted.

Definition at line 1100 of file IR_Precision.f90.

elemental real(r8p) function ir_precision::bctor_r8p ( character(*), intent(in)  bstr,
real(r8p), intent(in)  knd 
)
private

Procedure for converting bit-string to real.

This function achieves casting of bit-string to real.

Parameters
[in]bstrString containing input number.
[in]kndNumber kind.

Definition at line 1114 of file IR_Precision.f90.

elemental real(r4p) function ir_precision::bctor_r4p ( character(*), intent(in)  bstr,
real(r4p), intent(in)  knd 
)
private

Procedure for converting bit-string to real.

This function achieves casting of bit-string to real.

Parameters
[in]bstrString containing input number.
[in]kndNumber kind.

Definition at line 1129 of file IR_Precision.f90.

elemental integer(i8p) function ir_precision::bctoi_i8p ( character(*), intent(in)  bstr,
integer(i8p), intent(in)  knd 
)
private

Procedure for converting bit-string to integer.

This function achieves casting of bit-string to integer.

Parameters
[in]bstrString containing input number.
[in]kndNumber kind.

Definition at line 1144 of file IR_Precision.f90.

elemental integer(i4p) function ir_precision::bctoi_i4p ( character(*), intent(in)  bstr,
integer(i4p), intent(in)  knd 
)
private

Procedure for converting bit-string to integer.

This function achieves casting of bit-string to integer.

Parameters
[in]bstrString containing input number.
[in]kndNumber kind.

Definition at line 1159 of file IR_Precision.f90.

elemental integer(i2p) function ir_precision::bctoi_i2p ( character(*), intent(in)  bstr,
integer(i2p), intent(in)  knd 
)
private

Procedure for converting bit-string to integer.

This function achieves casting of bit-string to integer.

Parameters
[in]bstrString containing input number.
[in]kndNumber kind.

Definition at line 1174 of file IR_Precision.f90.

elemental integer(i1p) function ir_precision::bctoi_i1p ( character(*), intent(in)  bstr,
integer(i1p), intent(in)  knd 
)
private

Procedure for converting bit-string to integer.

This function achieves casting of bit-string to integer.

Parameters
[in]bstrString containing input number.
[in]kndNumber kind.

Definition at line 1189 of file IR_Precision.f90.