Implement cudf construction with adapters. (#5189)

This commit is contained in:
Rory Mitchell
2020-01-09 20:23:06 +13:00
committed by GitHub
parent 9559f81377
commit 87ebfc1315
14 changed files with 705 additions and 34 deletions

View File

@@ -6,7 +6,7 @@
#include "../../../src/common/timer.h"
#include "../helpers.h"
using namespace xgboost; // NOLINT
TEST(c_api, CSRAdapter) {
TEST(adapter, CSRAdapter) {
int m = 3;
int n = 2;
std::vector<float> data = {1, 2, 3, 4, 5};
@@ -29,7 +29,7 @@ TEST(c_api, CSRAdapter) {
EXPECT_EQ(line2 .GetElement(0).column_idx, 1);
}
TEST(c_api, CSCAdapterColsMoreThanRows) {
TEST(adapter, CSCAdapterColsMoreThanRows) {
std::vector<float> data = {1, 2, 3, 4, 5, 6, 7, 8};
std::vector<unsigned> row_idx = {0, 1, 0, 1, 0, 1, 0, 1};
std::vector<size_t> col_ptr = {0, 2, 4, 6, 8};