append_ga_dynlong Subroutine

public subroutine append_ga_dynlong(me, val, length)


Type IntentOptional AttributesName
type(grw_dynlongarray_type) :: me
type(dyn_longarray_type), intent(in) :: val
integer, intent(in), optional :: length

optional length to expand the array


proc~~append_ga_dynlong~~CallsGraph proc~append_ga_dynlong append_ga_dynlong interface~expand~3 expand proc~append_ga_dynlong->interface~expand~3 proc~expand_ga_dynlong expand_ga_dynlong interface~expand~3->proc~expand_ga_dynlong

Called by

proc~~append_ga_dynlong~~CalledByGraph proc~append_ga_dynlong append_ga_dynlong interface~append~5 append interface~append~5->proc~append_ga_dynlong proc~append_element append_element proc~append_element->interface~append~5 proc~tem_halo_append tem_halo_append proc~tem_halo_append->interface~append~5 program~derivedtype_memalloc derivedType_memAlloc program~derivedtype_memalloc->interface~append~5 interface~append~39 append interface~append~39->proc~append_element proc~identify_lists identify_lists proc~identify_lists->proc~tem_halo_append proc~communicate_elements communicate_elements proc~communicate_elements->proc~identify_lists proc~tem_find_allelements tem_find_allElements proc~tem_find_allelements->proc~identify_lists


Source Code

Source Code

  subroutine append_ga_dynlong(me, val, length)
    type(grw_dynlongarray_type) :: me !< array to append the value to
    type(dyn_longarray_type), intent(in) :: val !< value to append
    !> optional length to expand the array
    integer, intent(in), optional :: length

    ! value to append is larger than all existing ones,
    ! just put it to the end of the list, this captures
    ! also the case of empty lists.
    ! in this case foundpos = me%nvals + 1 holds.
    if (me%nvals+1 > me%containersize) then
      ! expand the array, if its boundary is reached
      call expand(me = me, length = length)
    end if

    me%nvals = me%nvals+1
    me%val(me%nvals) = val

  end subroutine append_ga_dynlong