accept_changes Subroutine

public subroutine accept_changes(fp_prev, fp_now, changed_idx, changed_count)

Accept the new fingerprints for the subset of changed indices.

After a successful run, this updates fp_prev so future scans detect new changes relative to the latest known state.

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(inout) :: fp_prev(:)
integer(kind=int64), intent(in) :: fp_now(:)
integer, intent(in) :: changed_idx(:)
integer, intent(in) :: changed_count

Called by

proc~~accept_changes~~CalledByGraph proc~accept_changes accept_changes proc~watcher_run watcher_t%watcher_run proc~watcher_run->proc~accept_changes

Source Code

   subroutine accept_changes(fp_prev, fp_now, changed_idx, changed_count)
      integer(int64), intent(inout) :: fp_prev(:)
      integer(int64), intent(in)    :: fp_now(:)
      integer, intent(in) :: changed_idx(:)
      integer, intent(in) :: changed_count
      integer :: j, i
      do j = 1, changed_count
         i = changed_idx(j)
         if (i >= 1 .and. i <= size(fp_prev)) fp_prev(i) = fp_now(i)
      end do
   end subroutine accept_changes