subroutineframe_roomprivate
subroutine frame_room(frame)
Make sure that one more variable fits in frame.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| frame | type(frame_t) | inout | the scope |
Calls
Source
Show the code
subroutine frame_room(frame)
type(frame_t), intent(inout) :: frame !! the scope
integer, allocatable :: ids(:)
type(value_t), allocatable :: values(:)
integer :: k
if (.not. allocated(frame%ids)) then
allocate (frame%ids(16), frame%values(16))
else if (frame%n == size(frame%ids)) then
allocate (ids(2*frame%n), values(2*frame%n))
ids(1:frame%n) = frame%ids(1:frame%n)
do k = 1, frame%n
call move_value(frame%values(k), values(k))
end do
call move_alloc(ids, frame%ids)
call move_alloc(values, frame%values)
end if
end subroutine frame_room