fcn_wrapper Subroutine

public subroutine fcn_wrapper(me, x, f, istat)

Wrapper procedures for C callbacks (module-level, work with wrapper type)

Arguments

Type IntentOptional Attributes Name
class(simulated_annealing_type), intent(inout) :: me
real(kind=wp), intent(in), dimension(:) :: x
real(kind=wp), intent(out) :: f
integer, intent(out) :: istat

Calls

proc~~fcn_wrapper~~CallsGraph proc~fcn_wrapper fcn_wrapper c_fcn_ptr c_fcn_ptr proc~fcn_wrapper->c_fcn_ptr

Source Code

    subroutine fcn_wrapper(me, x, f, istat)
        class(simulated_annealing_type), intent(inout) :: me
        real(wp), dimension(:), intent(in) :: x
        real(wp), intent(out) :: f
        integer, intent(out) :: istat

        select type (me)
         type is (c_sa_wrapper_type)
          call me%c_fcn_ptr(me%iproblem, x, size(x), f, istat)
        end select

    end subroutine fcn_wrapper