EvalScalar_2D_dev_Points Subroutine

public 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 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.

Arguments

TypeIntentOptionalAttributesName
class(Points), intent(in) :: this
class(MappedScalar2D), intent(in) :: scalar
type(c_ptr), intent(inout) :: values_dev

Calls

proc~~evalscalar_2d_dev_points~~CallsGraph proc~evalscalar_2d_dev_points EvalScalar_2D_dev_Points interface~evalscalarpoints_2d_gpu EvalScalarPoints_2D_gpu proc~evalscalar_2d_dev_points->interface~evalscalarpoints_2d_gpu

Contents


Source Code

  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