Fix cpplint. (#4157)

* Add comment after #endif.
* Add missing headers.
This commit is contained in:
Jiaming Yuan
2019-02-18 00:16:29 +08:00
committed by GitHub
parent 71a604fae3
commit 2e618af743
46 changed files with 97 additions and 72 deletions

View File

@@ -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

View File

@@ -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 {

View File

@@ -100,4 +100,4 @@ bool SparsePageDMatrix::SingleColBlock() const {
}
} // namespace data
} // namespace xgboost
#endif
#endif // DMLC_ENABLE_STD_THREAD

View File

@@ -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 {

View File

@@ -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

View File

@@ -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 {

View File

@@ -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 {