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

Method ArrayIterForTest

tests/cpp/helpers.cc:689–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

687}
688
689ArrayIterForTest::ArrayIterForTest(float sparsity, bst_idx_t rows, size_t cols, size_t batches)
690 : rows_{rows}, cols_{cols}, n_batches_{batches} {
691 XGProxyDMatrixCreate(&proxy_);
692 rng_ = std::make_unique<RandomDataGenerator>(rows_, cols_, sparsity);
693 std::tie(batches_, interface_) = rng_->GenerateArrayInterfaceBatch(&data_, n_batches_);
694}
695
696ArrayIterForTest::ArrayIterForTest(Context const* ctx, HostDeviceVector<float> const& data,
697 std::size_t n_samples, bst_feature_t n_features,

Callers

nothing calls this directly

Calls 7

XGProxyDMatrixCreateFunction · 0.85
MakeArrayInterfaceBatchFunction · 0.85
ResizeMethod · 0.45
SizeMethod · 0.45
CopyMethod · 0.45
DeviceMethod · 0.45

Tested by

no test coverage detected