| 337 | } |
| 338 | |
| 339 | std::string RandomDataGenerator::GenerateColumnarArrayInterface( |
| 340 | std::vector<HostDeviceVector<float>>* data) const { |
| 341 | CHECK(data); |
| 342 | CHECK_EQ(data->size(), cols_); |
| 343 | auto& storage = *data; |
| 344 | Json arr{Array()}; |
| 345 | for (size_t i = 0; i < cols_; ++i) { |
| 346 | auto column = this->ArrayInterfaceImpl(&storage[i], rows_, 1); |
| 347 | get<Array>(arr).emplace_back(column); |
| 348 | } |
| 349 | std::string out; |
| 350 | Json::Dump(arr, &out); |
| 351 | return out; |
| 352 | } |
| 353 | |
| 354 | void RandomDataGenerator::GenerateCSR(HostDeviceVector<float>* value, |
| 355 | HostDeviceVector<std::size_t>* row_ptr, |
nothing calls this directly
no test coverage detected