tests/cpp: Add tests for SparsePageDMatrix
The SparsePageDMatrix or external memory DMatrix reads data from the file IO rather than load it into RAM.
This commit is contained in:
@@ -4,6 +4,11 @@ std::string TempFileName() {
|
||||
return std::tmpnam(nullptr);
|
||||
}
|
||||
|
||||
bool FileExists(const std::string name) {
|
||||
struct stat st;
|
||||
return stat(name.c_str(), &st) == 0;
|
||||
}
|
||||
|
||||
long GetFileSize(const std::string filename) {
|
||||
struct stat st;
|
||||
stat(filename.c_str(), &st);
|
||||
|
||||
Reference in New Issue
Block a user