Free_Scalar2D Subroutine

public subroutine Free_Scalar2D(this)

Arguments

TypeIntentOptionalAttributesName
class(Scalar2D), intent(inout) :: this

Calls

proc~~free_scalar2d~~CallsGraph proc~free_scalar2d Free_Scalar2D proc~free_scalar2d_t Free_Scalar2D_t proc~free_scalar2d->proc~free_scalar2d_t proc~gpucheck gpuCheck proc~free_scalar2d->proc~gpucheck interface~hipfree hipFree proc~free_scalar2d->interface~hipfree

Contents

Source Code


Source Code

  subroutine Free_Scalar2D(this)
    implicit none
    class(Scalar2D),intent(inout) :: this

    ! Host storage is owned by the pools in the parent type, not by these pointers (Stage 6b),
    ! so the parent Free is what releases it.
    call Free_Scalar2D_t(this)

    call gpuCheck(hipFree(this%interior_gpu))
    call gpuCheck(hipFree(this%boundary_gpu))
    call gpuCheck(hipFree(this%extBoundary_gpu))
    call gpuCheck(hipFree(this%avgBoundary_gpu))
    call gpuCheck(hipFree(this%boundarynormal_gpu))
    this%interior_gpu = c_null_ptr
    this%boundary_gpu = c_null_ptr
    this%extBoundary_gpu = c_null_ptr
    this%avgBoundary_gpu = c_null_ptr
    this%boundarynormal_gpu = c_null_ptr
    this%alloc_interior = 0
    this%alloc_boundary = 0
    this%alloc_extBoundary = 0
    this%alloc_avgBoundary = 0
    this%alloc_boundarynormal = 0

  endsubroutine Free_Scalar2D