|
1 | 1 | #:include "common.fypp" |
2 | 2 | module modtable |
3 | 3 | use iso_fortran_env, only: int32, real32 |
4 | | - use modhash, only: roundinguppower2, seed_hash, hash |
| 4 | + use modhash, only: next_power_of_2, seed_hash, hash |
5 | 5 | implicit none |
6 | 6 | private |
7 | 7 | #:for t,k,l,m in TYPES |
@@ -117,8 +117,8 @@ contains |
117 | 117 | integer(kind=int32), intent(in), optional :: nel |
118 | 118 | type(table_${k}$_t) :: this |
119 | 119 |
|
120 | | - this%nel = roundinguppower2(default_nel) |
121 | | - if (present(nel)) this%nel = roundinguppower2(nel) |
| 120 | + this%nel = next_power_of_2(default_nel) |
| 121 | + if (present(nel)) this%nel = next_power_of_2(nel) |
122 | 122 |
|
123 | 123 | this%filled = 0 |
124 | 124 |
|
@@ -366,7 +366,7 @@ contains |
366 | 366 | if (nfilled == 0_int32) then |
367 | 367 | this%nel = default_nel |
368 | 368 | else |
369 | | - this%nel = roundinguppower2(int(1.3*nfilled, kind=int32)) |
| 369 | + this%nel = next_power_of_2(int(1.3*nfilled, kind=int32)) |
370 | 370 | end if |
371 | 371 | this%filled = 0 |
372 | 372 |
|
@@ -399,8 +399,8 @@ contains |
399 | 399 | integer(kind=int32), intent(in), optional :: nel |
400 | 400 | type(table_arr${k}$_t) :: this |
401 | 401 |
|
402 | | - this%nel = roundinguppower2(default_nel) |
403 | | - if (present(nel)) this%nel = roundinguppower2(nel) |
| 402 | + this%nel = next_power_of_2(default_nel) |
| 403 | + if (present(nel)) this%nel = next_power_of_2(nel) |
404 | 404 |
|
405 | 405 | this%filled = 0 |
406 | 406 |
|
@@ -633,7 +633,7 @@ contains |
633 | 633 | if (nfilled == 0_int32) then |
634 | 634 | this%nel = 0_int32 |
635 | 635 | else |
636 | | - this%nel = roundinguppower2(int(1.3*nfilled, kind=int32)) |
| 636 | + this%nel = next_power_of_2(int(1.3*nfilled, kind=int32)) |
637 | 637 | end if |
638 | 638 | this%filled = 0 |
639 | 639 |
|
|
0 commit comments