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

Arguments

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

Contents

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
        deallocate(arr)
    end subroutine clear_sampler_array