25 use,
intrinsic :: iso_fortran_env
40 integer(int64) :: dummy
43 integer(int64),
public,
parameter :: &
44 ALLOC_CACHE_ANY_SIZE = -1_8
49 use,
intrinsic :: iso_fortran_env
53 type(alloc_cache_t),
intent(out) :: alloc_cache
54 integer(int64),
intent(in) :: max_size
59 subroutine alloc_cache_end(alloc_cache, hits, misses, vol_hits, vol_misses)
61 use,
intrinsic :: iso_fortran_env
65 type(alloc_cache_t),
intent(inout) :: alloc_cache
66 integer(int64),
intent(out) :: hits
67 integer(int64),
intent(out) :: misses
68 real(c_double),
intent(out) :: vol_hits
69 real(c_double),
intent(out) :: vol_misses
77 type(alloc_cache_t),
intent(inout) :: alloc_cache
78 integer(int64),
intent(in) :: size
79 type(c_ptr),
intent(in) :: loc
80 logical,
intent(out) :: put
83 subroutine alloc_cache_put_low(alloc_cache, size, loc, put)
85 use,
intrinsic :: iso_fortran_env
89 type(alloc_cache_t),
intent(inout) :: alloc_cache
90 integer(int64),
intent(in) :: size
91 type(c_ptr),
intent(in) :: loc
92 integer,
intent(out) :: put
93 end subroutine alloc_cache_put_low
98 call alloc_cache_put_low(alloc_cache,
size, loc, iput)
107 type(alloc_cache_t),
intent(inout) :: alloc_cache
108 integer(int64),
intent(in) :: size
109 logical,
intent(out) :: found
110 type(c_ptr),
intent(out) :: loc
113 subroutine alloc_cache_get_low(alloc_cache, size, found, loc)
115 use,
intrinsic :: iso_fortran_env
119 type(alloc_cache_t),
intent(inout) :: alloc_cache
120 integer(int64),
intent(in) :: size
121 integer,
intent(out) :: found
122 type(c_ptr),
intent(out) :: loc
123 end subroutine alloc_cache_get_low
128 call alloc_cache_get_low(alloc_cache,
size, ifound, loc)
130 found = (ifound /= 0)
subroutine, public alloc_cache_put(alloc_cache, size, loc, put)
subroutine, public alloc_cache_get(alloc_cache, size, found, loc)