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

Method NumpyArrayIterForTest

tests/cpp/helpers.cc:600–606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598#endif // !defined(XGBOOST_USE_CUDA)
599
600NumpyArrayIterForTest::NumpyArrayIterForTest(float sparsity, bst_idx_t rows, size_t cols,
601 size_t batches)
602 : ArrayIterForTest{sparsity, rows, cols, batches} {
603 rng_->Device(DeviceOrd::CPU());
604 std::tie(batches_, interface_) = rng_->GenerateArrayInterfaceBatch(&data_, n_batches_);
605 this->Reset();
606}
607
608int NumpyArrayIterForTest::Next() {
609 if (iter_ == n_batches_) {

Callers

nothing calls this directly

Calls 4

CPUFunction · 0.85
DeviceMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected