EnsureDeviceBuffers_Tensor2D Subroutine

public subroutine EnsureDeviceBuffers_Tensor2D(this)

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

Arguments

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

Calls

proc~~ensuredevicebuffers_tensor2d~~CallsGraph proc~ensuredevicebuffers_tensor2d EnsureDeviceBuffers_Tensor2D ensuredevicebuffer ensuredevicebuffer proc~ensuredevicebuffers_tensor2d->ensuredevicebuffer

Called by

proc~~ensuredevicebuffers_tensor2d~~CalledByGraph proc~ensuredevicebuffers_tensor2d EnsureDeviceBuffers_Tensor2D proc~init_tensor2d Init_Tensor2D proc~init_tensor2d->proc~ensuredevicebuffers_tensor2d proc~resize_tensor2d Resize_Tensor2D proc~resize_tensor2d->proc~ensuredevicebuffers_tensor2d

Contents


Source Code

  subroutine EnsureDeviceBuffers_Tensor2D(this)
    !! Grow each device buffer to hold the current logical array, reusing the existing allocation
    !! when the bytes already fit (AMR Stage 6b/6c). A device pointer carries no shape, so only
    !! byte capacity has to be tracked.
    implicit none
    class(Tensor2D),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))

  endsubroutine EnsureDeviceBuffers_Tensor2D