dfs_mark_mask Subroutine

private recursive subroutine dfs_mark_mask(node, all, tmask, mask)

Uses

    • fpm_targets
  • proc~~dfs_mark_mask~~UsesGraph proc~dfs_mark_mask dfs_mark_mask fpm_targets fpm_targets proc~dfs_mark_mask->fpm_targets

Arguments

Type IntentOptional Attributes Name
type(build_target_t), intent(in), pointer :: node
type(build_target_ptr), intent(in) :: all(:)
integer(kind=int64), intent(inout) :: tmask(:)
integer(kind=int64), intent(in) :: mask

Calls

proc~~dfs_mark_mask~~CallsGraph proc~dfs_mark_mask dfs_mark_mask proc~dfs_mark_mask->proc~dfs_mark_mask dependencies dependencies proc~dfs_mark_mask->dependencies proc~find_ptr_index find_ptr_index proc~dfs_mark_mask->proc~find_ptr_index

Called by

proc~~dfs_mark_mask~~CalledByGraph proc~dfs_mark_mask dfs_mark_mask proc~dfs_mark_mask->proc~dfs_mark_mask proc~compute_watch_files_from_settings compute_watch_files_from_settings proc~compute_watch_files_from_settings->proc~dfs_mark_mask proc~rebuild_watch_list rebuild_watch_list proc~rebuild_watch_list->proc~compute_watch_files_from_settings proc~handle_manifest_change handle_manifest_change proc~handle_manifest_change->proc~rebuild_watch_list proc~watcher_init watcher_t%watcher_init proc~watcher_init->proc~rebuild_watch_list proc~watcher_run watcher_t%watcher_run proc~watcher_run->proc~rebuild_watch_list proc~watcher_run->proc~handle_manifest_change

Source Code

   recursive subroutine dfs_mark_mask(node, all, tmask, mask)
      use fpm_targets, only: build_target_t
      type(build_target_t), pointer, intent(in) :: node
      type(build_target_ptr), intent(in) :: all(:)
      integer(int64), intent(inout) :: tmask(:)
      integer(int64), intent(in) :: mask
      integer :: idx, i

      idx = find_ptr_index(node, all)
      if (idx <= 0) return
      if (iand(tmask(idx), mask) /= 0_int64) return

      tmask(idx) = ior(tmask(idx), mask)

      if (allocated(node%dependencies)) then
         do i = 1, size(node%dependencies)
            if (associated(node%dependencies(i)%ptr)) call dfs_mark_mask(node%dependencies(i)%ptr, all, tmask, mask)
         end do
      end if
   end subroutine dfs_mark_mask