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

Function test_d2h

Tests/Base/TrackedVector/main.cpp:211–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void test_d2h ()
212{
213 TVec v;
214 v.host().assign({0, 0, 0});
215
216 // device() auto-syncs host->device, then fill_device_linear writes on device
217 fill_device_linear(v, 100);
218
219 // host_const() auto-syncs device->host
220 AMREX_ALWAYS_ASSERT(v.host_const()[0] == 100 && v.host_const()[1] == 101 && v.host_const()[2] == 102);
221 verify_host_device_match(v);
222}
223
224void test_empty ()
225{

Callers 1

Calls 3

fill_device_linearFunction · 0.85
verify_host_device_matchFunction · 0.85
assignMethod · 0.45

Tested by

no test coverage detected