@@ -5,29 +5,30 @@ module stdlib_bitsets
5
5
!! The code assumes two's complement integers, and treats negative integers as
6
6
!! having the sign bit set.
7
7
8
- use, intrinsic :: &
9
- iso_fortran_env, only: &
10
- bits_kind => int32, &
11
- block_kind => int64, &
12
- error_unit, &
13
- int8, &
14
- int16, &
15
- int32, &
16
- int64, &
17
- dp => real64
8
+ use :: stdlib_kinds, only: &
9
+ bits_kind => int32, &
10
+ block_kind => int64, &
11
+ int8, &
12
+ int16, &
13
+ int32, &
14
+ int64
15
+
16
+ use, intrinsic :: &
17
+ iso_fortran_env, only: &
18
+ error_unit
18
19
19
20
implicit none
20
21
21
22
private
22
23
23
- integer, parameter :: &
24
+ integer(bits_kind) , parameter :: &
24
25
block_size = bit_size(0_block_kind)
25
26
26
- integer(block_kind), private, parameter :: all_zeros = 0_block_kind
27
- integer(block_kind), private, parameter :: all_ones = not(all_zeros)
27
+ integer(block_kind), parameter :: all_zeros = 0_block_kind
28
+ integer(block_kind), parameter :: all_ones = not(all_zeros)
28
29
29
- character(*), parameter, private :: module_name = "STDLIB_BITSETS"
30
- integer, parameter, private :: &
30
+ character(*), parameter :: module_name = "STDLIB_BITSETS"
31
+ integer, parameter :: &
31
32
ia0 = iachar('0'), &
32
33
ia9 = iachar('9')
33
34
@@ -870,7 +871,7 @@ module stdlib_bitsets
870
871
elemental module subroutine clear_bit_large(self, pos)
871
872
!! Version: experimental
872
873
!!
873
- !! Sets to zero the bit at `pos` position in `self`. If ' pos` is less than
874
+ !! Sets to zero the bit at `pos` position in `self`. If ` pos` is less than
874
875
!! zero or greater than `bits(self)-1` it is ignored.
875
876
class(bitset_large), intent(inout) :: self
876
877
integer(bits_kind), intent(in) :: pos
@@ -1303,7 +1304,7 @@ module stdlib_bitsets
1303
1304
!! * `success` - if no problems were found,
1304
1305
!! * `alloc_fault` - if memory allocation failed
1305
1306
!! * `array_size_invalid_error` - if `bits` is either negative or larger
1306
- !! than 64 with `self` of class `bitset_64`, or
1307
+ !! than 64 with `self` of class `bitset_64`.
1307
1308
class(bitset_64), intent(out) :: self
1308
1309
integer(bits_kind), intent(in) :: bits
1309
1310
integer, intent(out), optional :: status
@@ -1653,7 +1654,7 @@ module stdlib_bitsets
1653
1654
!! Version: experimental
1654
1655
!!
1655
1656
!! Creates a new bitset, `new`, from a range, `start_pos` to `stop_pos`, in
1656
- !! bitset `old`. If ' start_pos` is greater than `stop_pos` the new bitset is
1657
+ !! bitset `old`. If ` start_pos` is greater than `stop_pos` the new bitset is
1657
1658
!! empty. If `start_pos` is less than zero or `stop_pos` is greater than
1658
1659
!! `bits(old)-1` then if `status` is present it has the value
1659
1660
!! `index_invalid_error`and `new` is undefined, otherwise processing stops
@@ -1799,7 +1800,7 @@ module stdlib_bitsets
1799
1800
elemental module function eqv_64(set1, set2) result(eqv)
1800
1801
!! Version: experimental
1801
1802
!!
1802
- !! Returns `.true`. if all bits in `set1` and `set2` have the same value,
1803
+ !! Returns `.true.` if all bits in `set1` and `set2` have the same value,
1803
1804
!! `.false.` otherwise. The sets must have the same number of bits
1804
1805
!! otherwise the result is undefined.
1805
1806
logical :: eqv
@@ -1893,7 +1894,7 @@ module stdlib_bitsets
1893
1894
!! Version: experimental
1894
1895
!!
1895
1896
!! Returns `.true.` if the bits in `set1` and `set2` differ and the
1896
- !! highest order different bit is set to 1 in `set1` and to 0 in `set2`.
1897
+ !! highest order different bit is set to 1 in `set1` and to 0 in `set2`,
1897
1898
!! `.false.` otherwise. The sets must have the same number of bits
1898
1899
!! otherwise the result is undefined.
1899
1900
logical :: gt
@@ -1909,7 +1910,7 @@ module stdlib_bitsets
1909
1910
!! Version: experimental
1910
1911
!!
1911
1912
!! Returns `.true.` if the bits in `set1` and `set2` are the same or the
1912
- !! highest order different bit is set to 1 in `set1` and to 0 in `set2`.
1913
+ !! highest order different bit is set to 1 in `set1` and to 0 in `set2`,
1913
1914
!! `.false.` otherwise. The sets must have the same number of bits
1914
1915
!! otherwise the result is undefined.
1915
1916
!!
@@ -1942,7 +1943,7 @@ module stdlib_bitsets
1942
1943
!! Version: experimental
1943
1944
!!
1944
1945
!! Returns `.true.` if the bits in `set1` and `set2` are the same or the
1945
- !! highest order different bit is set to 1 in `set1` and to 0 in `set2`.
1946
+ !! highest order different bit is set to 1 in `set1` and to 0 in `set2`,
1946
1947
!! `.false.` otherwise. The sets must have the same number of bits
1947
1948
!! otherwise the result is undefined.
1948
1949
logical :: ge
@@ -1958,7 +1959,7 @@ module stdlib_bitsets
1958
1959
!! Version: experimental
1959
1960
!!
1960
1961
!! Returns `.true.` if the bits in `set1` and `set2` differ and the
1961
- !! highest order different bit is set to 0 in `set1` and to 1 in `set2`.
1962
+ !! highest order different bit is set to 0 in `set1` and to 1 in `set2`,
1962
1963
!! `.false.` otherwise. The sets must have the same number of bits
1963
1964
!! otherwise the result is undefined.
1964
1965
!!
@@ -1990,7 +1991,7 @@ module stdlib_bitsets
1990
1991
!! Version: experimental
1991
1992
!!
1992
1993
!! Returns `.true.` if the bits in `set1` and `set2` differ and the
1993
- !! highest order different bit is set to 0 in `set1` and to 1 in `set2`.
1994
+ !! highest order different bit is set to 0 in `set1` and to 1 in `set2`,
1994
1995
!! `.false.` otherwise. The sets must have the same number of bits
1995
1996
!! otherwise the result is undefined.
1996
1997
logical :: lt
@@ -2006,7 +2007,7 @@ module stdlib_bitsets
2006
2007
!! Version: experimental
2007
2008
!!
2008
2009
!! Returns `.true.` if the bits in `set1` and `set2` are the same or the
2009
- !! highest order different bit is set to 0 in `set1` and to 1 in `set2`.
2010
+ !! highest order different bit is set to 0 in `set1` and to 1 in `set2`,
2010
2011
!! `.false.` otherwise. The sets must have the same number of bits
2011
2012
!! otherwise the result is undefined.
2012
2013
!!
@@ -2039,7 +2040,7 @@ module stdlib_bitsets
2039
2040
!! Version: experimental
2040
2041
!!
2041
2042
!! Returns `.true.` if the bits in `set1` and `set2` are the same or the
2042
- !! highest order different bit is set to 0 in `set1` and to 1 in `set2`.
2043
+ !! highest order different bit is set to 0 in `set1` and to 1 in `set2`,
2043
2044
!! `.false.` otherwise. The sets must have the same number of bits
2044
2045
!! otherwise the result is undefined.
2045
2046
logical :: le
@@ -2049,7 +2050,8 @@ module stdlib_bitsets
2049
2050
end interface operator(<=)
2050
2051
2051
2052
interface error_handler
2052
- module subroutine error_handler( message, error, status, module, procedure )
2053
+ module subroutine error_handler( message, error, status, &
2054
+ module, procedure )
2053
2055
character(*), intent(in) :: message
2054
2056
integer, intent(in) :: error
2055
2057
integer, intent(out), optional :: status
0 commit comments