fold_plan_destroy Subroutine

private pure subroutine fold_plan_destroy(this)

Free the plan’s lists and reset it to the empty default. Safe on a plan that was never built.

Type Bound

fold_plan_t

Arguments

Type IntentOptional Attributes Name
class(fold_plan_t), intent(inout) :: this

Called by

proc~~fold_plan_destroy~~CalledByGraph proc~fold_plan_destroy fold_plan_t%fold_plan_destroy proc~ocean_fold_exchange_destroy ocean_fold_exchange_destroy proc~ocean_fold_exchange_destroy->proc~fold_plan_destroy proc~engine_teardown engine_teardown proc~engine_teardown->proc~ocean_fold_exchange_destroy proc~ocean_fold_exchange_init ocean_fold_exchange_init proc~ocean_fold_exchange_init->proc~ocean_fold_exchange_destroy proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_teardown proc~engine_setup engine_setup proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_teardown proc~driver_validate->proc~engine_setup proc~engine_setup->proc~ocean_fold_exchange_init proc~rdb_ocean_destroy rdb_ocean_destroy proc~rdb_ocean_destroy->proc~engine_teardown proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Source Code

   pure subroutine fold_plan_destroy(this)
      !! Free the plan's lists and reset it to the empty default.  Safe on
      !! a plan that was never built.
      class(fold_plan_t), intent(inout) :: this
      if (allocated(this%peer_rx)) deallocate (this%peer_rx)
      if (allocated(this%send_n)) deallocate (this%send_n)
      if (allocated(this%send_start)) deallocate (this%send_start)
      if (allocated(this%recv_n)) deallocate (this%recv_n)
      if (allocated(this%recv_start)) deallocate (this%recv_start)
      if (allocated(this%send_col)) deallocate (this%send_col)
      if (allocated(this%send_peer)) deallocate (this%send_peer)
      if (allocated(this%send_e)) deallocate (this%send_e)
      if (allocated(this%recv_col)) deallocate (this%recv_col)
      if (allocated(this%recv_peer)) deallocate (this%recv_peer)
      if (allocated(this%recv_e)) deallocate (this%recv_e)
      if (allocated(this%recv_cls)) deallocate (this%recv_cls)
      this%ni = 0
      this%px = 0
      this%ng = 0
      this%rx = -1
      this%npeer = 0
      this%self_peer = 0
      this%nmax = 0
      this%nsend = 0
      this%nrecv = 0
   end subroutine fold_plan_destroy