vec_int32_clear Subroutine

private pure subroutine vec_int32_clear(self)

Drop every element but keep the allocated storage, so a vector reused across iterations of an outer loop stops reallocating.

Type Bound

vector_int32_t

Arguments

Type IntentOptional Attributes Name
class(vector_int32_t), intent(inout) :: self

Source Code

   pure subroutine vec_int32_clear(self)
      !! Drop every element but keep the allocated storage, so a vector reused
      !! across iterations of an outer loop stops reallocating.
      class(vector_int32_t), intent(inout) :: self

      self%n_items = 0
   end subroutine vec_int32_clear