|
| 1 | +!> Version: experimental |
| 2 | +!> |
| 3 | +!> The specification of this module is available [here](../page/specs/stdlib_kinds.html). |
1 | 4 | module stdlib_kinds |
2 | | -!! version: experimental |
3 | | -use iso_fortran_env, only: sp=>real32, dp=>real64, qp=>real128 |
4 | | -use iso_fortran_env, only: int8, int16, int32, int64 |
5 | | -use iso_c_binding, only: c_bool |
6 | | -! If we decide later to use iso_c_binding instead of iso_fortran_env: |
7 | | -!use iso_c_binding, only: sp=>c_float, dp=>c_double, qp=>c_float128 |
8 | | -!use iso_c_binding, only: int8=>c_int8_t, int16=>c_int16_t, int32=>c_int32_t, int64=>c_int64_t |
9 | | -implicit none |
10 | | -private |
11 | | -public sp, dp, qp, int8, int16, int32, int64, lk, c_bool |
12 | | - |
13 | | -integer, parameter :: lk = kind(.true.) |
| 5 | + use iso_fortran_env, only: int8, int16, int32, int64 |
| 6 | + use iso_c_binding, only: c_bool |
| 7 | + implicit none |
| 8 | + private |
| 9 | + public :: sp, dp, xdp, qp, int8, int16, int32, int64, lk, c_bool |
| 10 | + |
| 11 | + !> Single precision real numbers |
| 12 | + integer, parameter :: sp = selected_real_kind(6) |
| 13 | + |
| 14 | + !> Double precision real numbers |
| 15 | + integer, parameter :: dp = selected_real_kind(15) |
| 16 | + |
| 17 | + !> Extended double precision real numbers |
| 18 | + integer, parameter :: xdp = selected_real_kind(18) |
| 19 | + |
| 20 | + !> Quadruple precision real numbers |
| 21 | + integer, parameter :: qp = selected_real_kind(33) |
| 22 | + |
| 23 | + !> Default logical kind parameter |
| 24 | + integer, parameter :: lk = kind(.true.) |
| 25 | + |
14 | 26 | end module stdlib_kinds |
0 commit comments