MCPcopy Create free account
hub / github.com/dmlc/xgboost / TestHostDeviceVector

Function TestHostDeviceVector

tests/cpp/plugin/test_sycl_host_device_vector.cc:83–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void TestHostDeviceVector(size_t n, DeviceOrd device) {
84 HostDeviceVector<int> v;
85 InitHostDeviceVector(n, device, &v);
86 CheckDevice(&v, n, 0, GPUAccess::kRead);
87 PlusOne(&v);
88 CheckDevice(&v, n, 1, GPUAccess::kWrite);
89 CheckHost(&v, GPUAccess::kRead);
90 CheckHost(&v, GPUAccess::kNone);
91}
92
93TEST(SyclHostDeviceVector, Basic) {
94 size_t n = 1001;

Callers 1

TESTFunction · 0.85

Calls 4

InitHostDeviceVectorFunction · 0.85
PlusOneFunction · 0.85
CheckHostFunction · 0.85
CheckDeviceFunction · 0.70

Tested by

no test coverage detected