Grow the device buffers to hold the current logical arrays, reusing existing allocations when the bytes already fit (AMR Stage 6b).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MappedScalar2D), | intent(inout) | :: | this |
subroutine EnsureDeviceBuffers_MappedScalar2D(this)
!! Grow the device buffers to hold the current logical arrays, reusing existing allocations
!! when the bytes already fit (AMR Stage 6b).
implicit none
class(MappedScalar2D),intent(inout) :: this
! Local
integer(c_size_t) :: workSize
call EnsureDeviceBuffers_Scalar2D(this)
workSize = int(this%interp%N+1,c_size_t)*(this%interp%N+1)*this%nElem*this%nVar*4*prec
call EnsureDeviceBuffer(this%jas_gpu,this%alloc_jas,workSize)
endsubroutine EnsureDeviceBuffers_MappedScalar2D