Fix cpplint. (#4157)
* Add comment after #endif. * Add missing headers.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#if DMLC_ENABLE_STD_THREAD
|
||||
#include "./sparse_page_source.h"
|
||||
#include "./sparse_page_dmatrix.h"
|
||||
#endif
|
||||
#endif // DMLC_ENABLE_STD_THREAD
|
||||
|
||||
namespace dmlc {
|
||||
DMLC_REGISTRY_ENABLE(::xgboost::data::SparsePageFormatReg);
|
||||
@@ -264,7 +264,7 @@ DMatrix* DMatrix::Create(dmlc::Parser<uint32_t>* parser,
|
||||
#else
|
||||
LOG(FATAL) << "External memory is not enabled in mingw";
|
||||
return nullptr;
|
||||
#endif
|
||||
#endif // DMLC_ENABLE_STD_THREAD
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ DMatrix* DMatrix::Create(std::unique_ptr<DataSource>&& source,
|
||||
#else
|
||||
LOG(FATAL) << "External memory is not enabled in mingw";
|
||||
return nullptr;
|
||||
#endif
|
||||
#endif // DMLC_ENABLE_STD_THREAD
|
||||
}
|
||||
}
|
||||
} // namespace xgboost
|
||||
|
||||
@@ -9,9 +9,13 @@
|
||||
|
||||
#include <xgboost/base.h>
|
||||
#include <xgboost/data.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "simple_csr_source.h"
|
||||
|
||||
namespace xgboost {
|
||||
|
||||
@@ -100,4 +100,4 @@ bool SparsePageDMatrix::SingleColBlock() const {
|
||||
}
|
||||
} // namespace data
|
||||
} // namespace xgboost
|
||||
#endif
|
||||
#endif // DMLC_ENABLE_STD_THREAD
|
||||
|
||||
@@ -9,9 +9,11 @@
|
||||
|
||||
#include <xgboost/data.h>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "sparse_page_source.h"
|
||||
|
||||
namespace xgboost {
|
||||
|
||||
@@ -29,7 +29,7 @@ GetCacheShards(const std::string& cache_info) {
|
||||
cache_shards[0] = cache_info.substr(0, 2) + cache_shards[0];
|
||||
return cache_shards;
|
||||
}
|
||||
#endif
|
||||
#endif // (defined _WIN32) || (defined __CYGWIN__)
|
||||
return xgboost::common::Split(cache_info, ':');
|
||||
}
|
||||
|
||||
@@ -291,4 +291,4 @@ void SparsePageSource::CreateColumnPage(DMatrix* src,
|
||||
}
|
||||
} // namespace data
|
||||
} // namespace xgboost
|
||||
#endif
|
||||
#endif // DMLC_ENABLE_STD_THREAD
|
||||
|
||||
@@ -10,9 +10,12 @@
|
||||
#include <xgboost/base.h>
|
||||
#include <xgboost/data.h>
|
||||
#include <dmlc/threadediter.h>
|
||||
#include <vector>
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "sparse_page_writer.h"
|
||||
|
||||
namespace xgboost {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#if DMLC_ENABLE_STD_THREAD
|
||||
#include <dmlc/concurrency.h>
|
||||
#include <thread>
|
||||
#endif
|
||||
#endif // DMLC_ENABLE_STD_THREAD
|
||||
|
||||
namespace xgboost {
|
||||
namespace data {
|
||||
|
||||
Reference in New Issue
Block a user