MAESTROeX
MAESTROeX copied to clipboard
Replace setVal's so that FArrayBox's are filled on the GPU
Currently, all setVal
calls acting on FArrayBox
's are performed on the host. In profiling of code running on the GPU, it can be seen that this can result in considerable copying of data to/from the host and device, and means that this operation can take a non-negligible amount of time (considering all it's doing is filling arrays with zeros).
Such calls should be replaced e.g. with an AMREX_PARALLEL_FOR
, as was done here https://github.com/AMReX-Astro/Castro/commit/93b7b6f734efc2af2140d485b2188e01694aec75