beach_kernel_destroy Function

public function beach_kernel_destroy(handle) result(status) bind(C, name='beach_kernel_destroy'))

Arguments

Type IntentOptional Attributes Name
type(c_ptr), value :: handle

Return Value integer(kind=c_int)


Calls

proc~~beach_kernel_destroy~~CallsGraph proc~beach_kernel_destroy beach_kernel_destroy interface~destroy_plan destroy_plan proc~beach_kernel_destroy->interface~destroy_plan interface~destroy_state destroy_state proc~beach_kernel_destroy->interface~destroy_state

Source Code

  integer(c_int) function beach_kernel_destroy(handle) bind(C, name='beach_kernel_destroy') result(status)
    type(c_ptr), value :: handle
    type(field_kernel_handle), pointer :: kernel

    if (.not. c_associated(handle)) then
      status = beach_kernel_invalid_handle
      return
    end if

    call c_f_pointer(handle, kernel)
    call destroy_state(kernel%state)
    call destroy_plan(kernel%plan)
    deallocate (kernel)
    status = beach_kernel_ok
  end function beach_kernel_destroy