28 use,
intrinsic :: iso_fortran_env
43 integer(int64) :: dummy
46 integer(int64),
public,
parameter :: &
47 ALLOC_CACHE_ANY_SIZE = -1_8
52 use,
intrinsic :: iso_fortran_env
56 type(alloc_cache_t),
intent(out) :: alloc_cache
57 integer(int64),
intent(in) :: max_size
62 subroutine alloc_cache_end(alloc_cache, hits, misses, vol_hits, vol_misses)
64 use,
intrinsic :: iso_fortran_env
68 type(alloc_cache_t),
intent(inout) :: alloc_cache
69 integer(int64),
intent(out) :: hits
70 integer(int64),
intent(out) :: misses
71 real(c_double),
intent(out) :: vol_hits
72 real(c_double),
intent(out) :: vol_misses
80 type(alloc_cache_t),
intent(inout) :: alloc_cache
81 integer(int64),
intent(in) :: size
83 type(cl_mem),
intent(in) :: loc
85 type(c_ptr),
intent(in) :: loc
87 logical,
intent(out) :: put
90 subroutine alloc_cache_put_low(alloc_cache, size, loc, put)
95 use,
intrinsic :: iso_fortran_env
99 type(alloc_cache_t),
intent(inout) :: alloc_cache
100 integer(int64),
intent(in) :: size
102 type(cl_mem),
intent(in) :: loc
104 type(c_ptr),
intent(in) :: loc
106 integer,
intent(out) :: put
107 end subroutine alloc_cache_put_low
112 call alloc_cache_put_low(alloc_cache,
size, loc, iput)
121 type(alloc_cache_t),
intent(inout) :: alloc_cache
122 integer(int64),
intent(in) :: size
123 logical,
intent(out) :: found
125 type(cl_mem),
intent(out) :: loc
127 type(c_ptr),
intent(out) :: loc
131 subroutine alloc_cache_get_low(alloc_cache, size, found, loc)
136 use,
intrinsic :: iso_fortran_env
141 integer(int64),
intent(in) :: size
142 integer,
intent(out) :: found
144 type(cl_mem),
intent(out) :: loc
146 type(c_ptr),
intent(out) :: loc
148 end subroutine alloc_cache_get_low
153 call alloc_cache_get_low(alloc_cache,
size, ifound, loc)
155 found = (ifound /= 0)
subroutine, public alloc_cache_put(alloc_cache, size, loc, put)
subroutine, public alloc_cache_get(alloc_cache, size, found, loc)