Evaluate a 2D MappedScalar at the cached points on the device. The caller is responsible for hipMalloc-ing values_dev with capacity nPointsnVarprec bytes. Layout is column-major (nPoints, nVar).
Requires: the cache must have been populated by LocatePoints (or a subsequent UpdateDevice). Mismatch with scalar%interp%N is fatal.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points), | intent(in) | :: | this | |||
| class(MappedScalar2D), | intent(in) | :: | scalar | |||
| type(c_ptr), | intent(inout) | :: | values_dev |
subroutine EvalScalar_2D_dev_Points(this,scalar,values_dev)
!! Evaluate a 2D MappedScalar at the cached points on the device. The
!! caller is responsible for hipMalloc-ing values_dev with capacity
!! nPoints*nVar*prec bytes. Layout is column-major (nPoints, nVar).
!!
!! Requires: the cache must have been populated by LocatePoints (or a
!! subsequent UpdateDevice). Mismatch with scalar%interp%N is fatal.
implicit none
class(Points),intent(in) :: this
class(MappedScalar2D),intent(in) :: scalar
type(c_ptr),intent(inout) :: values_dev
if(this%nDim /= 2) then
print*,"SELF_Points (gpu)::EvaluateScalar (2D): nDim must be 2"
stop 1
endif
if(this%nCached /= scalar%interp%N .or. .not. c_associated(this%lS_cache_gpu)) then
print*,"SELF_Points (gpu)::EvaluateScalar (2D): basis cache not synchronized; ", &
"call LocatePoints (or UpdateDevice) first. nCached=", &
this%nCached," scalar%N=",scalar%interp%N
stop 1
endif
call EvalScalarPoints_2D_gpu(values_dev, &
this%elements_gpu, &
this%lS_cache_gpu,this%lT_cache_gpu, &
scalar%interior_gpu, &
scalar%interp%N,this%nPoints,scalar%nElem,scalar%nVar)
endsubroutine EvalScalar_2D_dev_Points