Wrapper procedures for C callbacks (module-level, work with wrapper type)
| Type | Intent | Optional | 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 |
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