Free_Vector2D Subroutine

public subroutine Free_Vector2D(this)

Arguments

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

Calls

proc~~free_vector2d~~CallsGraph proc~free_vector2d Free_Vector2D proc~free_vector2d_t Free_Vector2D_t proc~free_vector2d->proc~free_vector2d_t proc~gpucheck gpuCheck proc~free_vector2d->proc~gpucheck interface~hipfree hipFree proc~free_vector2d->interface~hipfree

Contents

Source Code


Source Code

  subroutine Free_Vector2D(this)
    implicit none
    class(Vector2D),intent(inout) :: this

    ! Host storage is owned by the pools in the parent type (Stage 6b), so the parent Free
    ! releases it rather than deallocating these pointers.
    call Free_Vector2D_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_Vector2D