clear_sampler_array Subroutine

public subroutine clear_sampler_array(arr)

call the destructor on all elements of an array, then deallocate it. This is for intrinsic arrays, the sampler array class has its own deallocate routine. @param[in, out] arr array to deallocate


Type IntentOptional Attributes Name
type(AliasSampler_t), intent(inout), allocatable :: arr(:)


Source Code

Source Code

    subroutine clear_sampler_array(arr)
        type(AliasSampler_t), allocatable, intent(inout) :: arr(:)

        integer :: i

        do i = 1, size(arr)
            call arr(i)%finalize()
        end do
    end subroutine clear_sampler_array