Free_Scalar3D Subroutine

public subroutine Free_Scalar3D(this)

Arguments

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

Calls

proc~~free_scalar3d~~CallsGraph proc~free_scalar3d Free_Scalar3D proc~free_scalar3d_t Free_Scalar3D_t proc~free_scalar3d->proc~free_scalar3d_t interface~hipfree hipFree proc~free_scalar3d->interface~hipfree proc~gpucheck gpuCheck proc~free_scalar3d->proc~gpucheck

Contents

Source Code


Source Code

  subroutine Free_Scalar3D(this)
    implicit none
    class(Scalar3D),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_Scalar3D_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_Scalar3D