[R] Address warnings to comply with CRAN submission policy (#5600)

* [R] Address warnings to comply with CRAN submission policy

* Include <xgboost/logging.h>
This commit is contained in:
Philip Hyunsu Cho
2020-04-25 13:34:36 -07:00
committed by GitHub
parent a23de1c108
commit 474cfddf91
2 changed files with 6 additions and 3 deletions

View File

@@ -30,6 +30,7 @@
#define XGBOOST_SPAN_H_
#include <xgboost/base.h>
#include <xgboost/logging.h>
#include <cinttypes> // size_t
#include <limits> // numeric_limits
@@ -85,9 +86,11 @@ namespace common {
} \
} while (0);
#ifdef __CUDA_ARCH__
#if defined(__CUDA_ARCH__)
#define SPAN_CHECK KERNEL_CHECK
#else
#elif defined(XGBOOST_STRICT_R_MODE) && XGBOOST_STRICT_R_MODE == 1 // R package
#define SPAN_CHECK CHECK // check from dmlc
#else // not CUDA, not R
#define SPAN_CHECK(cond) \
do { \
if (XGBOOST_EXPECT(!(cond), false)) { \