vec_dp_clear Subroutine

private pure subroutine vec_dp_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_dp_t

Arguments

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

Source Code

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

      self%n_items = 0
   end subroutine vec_dp_clear