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(MappedScalar3D), | intent(inout) | :: | this |
subroutine EnsureDeviceBuffers_MappedScalar3D(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(MappedScalar3D),intent(inout) :: this
! Local
integer(c_size_t) :: workSize
call EnsureDeviceBuffers_Scalar3D(this)
workSize = int(this%interp%N+1,c_size_t)*(this%interp%N+1)*(this%interp%N+1)* &
this%nElem*this%nVar*9*prec
call EnsureDeviceBuffer(this%jas_gpu,this%alloc_jas,workSize)
endsubroutine EnsureDeviceBuffers_MappedScalar3D