move_chunks Subroutine

private subroutine move_chunks(from, to)

Chunks moved to a new array (their level-of-detail bounds moved, not copied).

Arguments

Type IntentOptional Attributes Name
type(LineChunk), intent(inout) :: from(:)

the chunks, and their new array (same size)

type(LineChunk), intent(inout) :: to(:)

the chunks, and their new array (same size)


Called by

proc~~move_chunks~~CalledByGraph proc~move_chunks move_chunks proc~reserve LineChain%reserve proc~reserve->proc~move_chunks proc~build_marker_nodes build_marker_nodes proc~build_marker_nodes->proc~reserve proc~chain_build ChainArtist%chain_build proc~chain_build->proc~reserve proc~segment_build SegmentArtist%segment_build proc~segment_build->proc~reserve proc~segment_update SegmentArtist%segment_update proc~segment_update->proc~reserve proc~segments_build_contents CustomLineSegments%segments_build_contents proc~segments_build_contents->proc~reserve proc~write_changed write_changed proc~write_changed->proc~reserve proc~write_intermediates write_intermediates proc~write_intermediates->proc~reserve proc~write_segments~2 write_segments proc~write_segments~2->proc~reserve proc~add_intermediates add_intermediates proc~add_intermediates->proc~write_intermediates proc~chain_update ChainArtist%chain_update proc~chain_update->proc~write_changed proc~curve_update CurveArtist%curve_update proc~curve_update->proc~write_changed proc~marker_build MarkerArtist%marker_build proc~marker_build->proc~build_marker_nodes proc~rebuild_markers rebuild_markers proc~rebuild_markers->proc~build_marker_nodes proc~segments_late_update CustomLineSegments%segments_late_update proc~segments_late_update->proc~write_segments~2 proc~marker_set_point_colors MarkerArtist%marker_set_point_colors proc~marker_set_point_colors->proc~rebuild_markers proc~marker_update MarkerArtist%marker_update proc~marker_update->proc~add_intermediates proc~marker_update->proc~rebuild_markers proc~set_marker_image MarkerArtist%set_marker_image proc~set_marker_image->proc~rebuild_markers

Source Code

    subroutine move_chunks(from, to)
        type(LineChunk), intent(inout) :: from(:), to(:) !! the chunks, and their new array (same size)
        integer :: i, k
        do i = 1, size(from)
            to(i)%line = from(i)%line
            to(i)%first = from(i)%first
            to(i)%capacity = from(i)%capacity
            to(i)%box_lo = from(i)%box_lo
            to(i)%box_hi = from(i)%box_hi
            to(i)%n_written = from(i)%n_written
            do k = 1, lod_levels
                if (allocated(from(i)%lod(k)%bound)) call move_alloc(from(i)%lod(k)%bound, to(i)%lod(k)%bound)
            end do
        end do
    end subroutine move_chunks