Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dmlc/xgboost
/ TransformDevice
Function
TransformDevice
tests/cpp/common/test_transform_range.cc:17–23 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
15
namespace xgboost::common {
16
namespace {
17
constexpr DeviceOrd TransformDevice() {
18
#if defined(__CUDACC__)
19
return DeviceOrd::CUDA(0);
20
#else
21
return DeviceOrd::CPU();
22
#endif
23
}
24
} // namespace
25
26
template <typename T>
Callers
1
TEST
Function · 0.85
Calls
1
CPU
Function · 0.85
Tested by
no test coverage detected