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

Function CSRSetDataNextForTest

tests/cpp/data/test_adapter.cc:142–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140size_t constexpr CSRIterForTest::kCols;
141
142int CSRSetDataNextForTest(DataIterHandle data_handle,
143 XGBCallbackSetData *set_function,
144 DataHolderHandle set_function_handle) {
145 size_t constexpr kIters { 2 };
146 auto iter = static_cast<CSRIterForTest *>(data_handle);
147 if (iter->Iter() < kIters) {
148 auto batch = iter->Next();
149 batch.columns = CSRIterForTest::kCols;
150 set_function(set_function_handle, batch);
151 return 1;
152 } else {
153 return 0; // stoping condition
154 }
155}
156
157TEST(Adapter, IteratorAdapter) {
158 CSRIterForTest iter;

Callers

nothing calls this directly

Calls 2

IterMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected