| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points), | intent(inout) | :: | this |
subroutine Free_Points(this)
implicit none
class(Points),intent(inout) :: this
if(allocated(this%x)) deallocate(this%x)
if(associated(this%elements)) deallocate(this%elements)
if(associated(this%coordinates)) deallocate(this%coordinates)
if(associated(this%lS_cache)) deallocate(this%lS_cache)
if(associated(this%lT_cache)) deallocate(this%lT_cache)
if(associated(this%lU_cache)) deallocate(this%lU_cache)
this%elements => null()
this%coordinates => null()
this%lS_cache => null()
this%lT_cache => null()
this%lU_cache => null()
if(c_associated(this%elements_gpu)) call gpuCheck(hipFree(this%elements_gpu))
if(c_associated(this%coordinates_gpu)) call gpuCheck(hipFree(this%coordinates_gpu))
if(c_associated(this%lS_cache_gpu)) call gpuCheck(hipFree(this%lS_cache_gpu))
if(c_associated(this%lT_cache_gpu)) call gpuCheck(hipFree(this%lT_cache_gpu))
if(c_associated(this%lU_cache_gpu)) call gpuCheck(hipFree(this%lU_cache_gpu))
this%elements_gpu = c_null_ptr
this%coordinates_gpu = c_null_ptr
this%lS_cache_gpu = c_null_ptr
this%lT_cache_gpu = c_null_ptr
this%lU_cache_gpu = c_null_ptr
this%nPoints = 0
this%nDim = 0
this%nCached = 0
this%nPointsAlloc = 0
this%nCachedAlloc = 0
endsubroutine Free_Points