EnsureDeviceBuffers_Vector2D Subroutine

public subroutine EnsureDeviceBuffers_Vector2D(this)

Grow each device buffer to hold the current logical array, reusing the existing allocation when the bytes already fit (AMR Stage 6b). A device pointer carries no shape, so only byte capacity has to be tracked.

Arguments

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

Calls

proc~~ensuredevicebuffers_vector2d~~CallsGraph proc~ensuredevicebuffers_vector2d EnsureDeviceBuffers_Vector2D ensuredevicebuffer ensuredevicebuffer proc~ensuredevicebuffers_vector2d->ensuredevicebuffer

Called by

proc~~ensuredevicebuffers_vector2d~~CalledByGraph proc~ensuredevicebuffers_vector2d EnsureDeviceBuffers_Vector2D proc~init_vector2d Init_Vector2D proc~init_vector2d->proc~ensuredevicebuffers_vector2d proc~resize_vector2d Resize_Vector2D proc~resize_vector2d->proc~ensuredevicebuffers_vector2d

Contents


Source Code

  subroutine EnsureDeviceBuffers_Vector2D(this)
    !! Grow each device buffer to hold the current logical array, reusing the existing allocation
    !! when the bytes already fit (AMR Stage 6b). A device pointer carries no shape, so only byte
    !! capacity has to be tracked.
    implicit none
    class(Vector2D),intent(inout) :: this

    call EnsureDeviceBuffer(this%interior_gpu,this%alloc_interior,sizeof(this%interior))
    call EnsureDeviceBuffer(this%boundary_gpu,this%alloc_boundary,sizeof(this%boundary))
    call EnsureDeviceBuffer(this%extBoundary_gpu,this%alloc_extBoundary, &
                            sizeof(this%extBoundary))
    call EnsureDeviceBuffer(this%avgBoundary_gpu,this%alloc_avgBoundary, &
                            sizeof(this%avgBoundary))
    call EnsureDeviceBuffer(this%boundaryNormal_gpu,this%alloc_boundaryNormal, &
                            sizeof(this%boundaryNormal))

  endsubroutine EnsureDeviceBuffers_Vector2D