Skip to content

Commit

Permalink
Rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jul 8, 2021
1 parent 04b4bc0 commit ce37278
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
3 changes: 0 additions & 3 deletions src/data/adapter.h
Expand Up @@ -337,9 +337,6 @@ class CSRArrayAdapterBatch : public detail::NoMetaInfo {
size_t NumCols() const { return n_features_; }
size_t Size() const { return this->NumRows(); }

size_t NumCols() const { return n_features_; }
size_t Size() const { return this->NumRows(); }

Line const GetLine(size_t idx) const {
auto begin_offset = indptr_.GetElement<size_t>(idx, 0);
auto end_offset = indptr_.GetElement<size_t>(idx + 1, 0);
Expand Down
20 changes: 0 additions & 20 deletions src/data/file_iterator.h
Expand Up @@ -16,26 +16,6 @@

namespace xgboost {
namespace data {
template <typename T> std::string MakeArrayInterface(T const *data, size_t n) {
Json arr{Object{}};
arr["data"] = Array(std::vector<Json>{
Json{Integer{reinterpret_cast<int64_t>(data)}}, Json{Boolean{false}}});
arr["shape"] = Array{std::vector<Json>{Json{Integer{n}}, Json{Integer{1}}}};
std::string typestr;
if (DMLC_LITTLE_ENDIAN) {
typestr.push_back('<');
} else {
typestr.push_back('>');
}
typestr.push_back(ArrayInterfaceHandler::TypeChar<T>());
typestr += std::to_string(sizeof(T));
arr["typestr"] = typestr;
arr["version"] = 3;
std::string str;
Json::Dump(arr, &str);
return str;
}

/**
* An iterator for implementing external memory support with file inputs. Users of
* external memory are encouraged to define their own file parsers/loaders so this one is
Expand Down

0 comments on commit ce37278

Please sign in to comment.