MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / test_lockAdd

Function test_lockAdd

Tests/OpenMP/atomicAdd/main.cpp:25–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25void test_lockAdd (MultiFab& mf)
26{
27
28#ifdef AMREX_USE_OMP
29#pragma omp parallel
30#endif
31 {
32 FArrayBox tmp;
33 for (MFIter mfi(mf,true); mfi.isValid(); ++mfi) {
34 Box const& tbx = mfi.growntilebox();
35 tmp.resize(tbx);
36 tmp.template setVal<RunOn::Host>(0.2);
37 mf[mfi].template lockAdd<RunOn::Host>(tmp, tbx, tbx, 0, 0, 1);
38 }
39 }
40}
41
42int main (int argc, char* argv[])
43{

Callers 1

mainFunction · 0.85

Calls 3

growntileboxMethod · 0.80
isValidMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected