profile_same Function

public function profile_same(this, that)

All checks passed!

Type Bound

profile_config_t

Arguments

Type IntentOptional Attributes Name
class(profile_config_t), intent(in) :: this
class(serializable_t), intent(in) :: that

Return Value logical


Variables

Type Visibility Attributes Name Initial
integer, public :: ii

Source Code

      logical function profile_same(this,that)
          class(profile_config_t), intent(in) :: this
          class(serializable_t), intent(in) :: that

          integer :: ii

          profile_same = .false.

          select type (other=>that)
             type is (profile_config_t)
                
                ! Compare the underlying features
                if (.not.(this%profile_feature==other%profile_feature)) return

                ! Compare file scope flags (maintained for backward compatibility)
                if (allocated(this%file_scope_flags).neqv.allocated(other%file_scope_flags)) return
                if (allocated(this%file_scope_flags)) then
                    if (.not.size(this%file_scope_flags)==size(other%file_scope_flags)) return
                    do ii=1,size(this%file_scope_flags)
                       if (.not.this%file_scope_flags(ii)==other%file_scope_flags(ii)) return
                    end do
                endif

             class default
                ! Not the same type
                return
          end select

          !> All checks passed!
          profile_same = .true.

    end function profile_same