| 497 | } |
| 498 | |
| 499 | void |
| 500 | FluxRegister::FineSetVal (int dir, |
| 501 | int boxno, |
| 502 | int destcomp, |
| 503 | int numcomp, |
| 504 | Real val, |
| 505 | RunOn runon) noexcept |
| 506 | { |
| 507 | BL_ASSERT(destcomp >= 0 && destcomp+numcomp <= ncomp); |
| 508 | |
| 509 | FArrayBox& loreg = bndry[Orientation(dir,Orientation::low)][boxno]; // NOLINT(clang-analyzer-security.ArrayBound) |
| 510 | BL_ASSERT(numcomp <= loreg.nComp()); |
| 511 | if ((runon == RunOn::Gpu) && Gpu::inLaunchRegion()) { |
| 512 | loreg.setVal<RunOn::Device>(val, loreg.box(), destcomp, numcomp); |
| 513 | } else { |
| 514 | loreg.setVal<RunOn::Host>(val, loreg.box(), destcomp, numcomp); |
| 515 | } |
| 516 | |
| 517 | FArrayBox& hireg = bndry[Orientation(dir,Orientation::high)][boxno]; // NOLINT(clang-analyzer-security.ArrayBound) |
| 518 | BL_ASSERT(numcomp <= hireg.nComp()); |
| 519 | if ((runon == RunOn::Gpu) && Gpu::inLaunchRegion()) { |
| 520 | hireg.setVal<RunOn::Device>(val, hireg.box(), destcomp, numcomp); |
| 521 | } else { |
| 522 | hireg.setVal<RunOn::Host>(val, hireg.box(), destcomp, numcomp); |
| 523 | } |
| 524 | } |
| 525 | |
| 526 | void |
| 527 | FluxRegister::Reflux (MultiFab& mf, |
no test coverage detected