Skip to content

Commit

Permalink
[R] Address warnings to comply with CRAN submission policy (#5600)
Browse files Browse the repository at this point in the history
* [R] Address warnings to comply with CRAN submission policy

* Include <xgboost/logging.h>
  • Loading branch information
hcho3 committed May 4, 2020
1 parent 4979991 commit 6daa6ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R-package/vignettes/xgboostPresentation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ In some very specific cases, like when you want to pilot **XGBoost** from `caret

```{r saveLoadRBinVectorModel, message=F, warning=F}
# save model to R's raw vector
rawVec <- xgb.save.raw(bst)
rawVec <- xgb.serialize(bst)
# print class
print(class(rawVec))
Expand Down
7 changes: 5 additions & 2 deletions include/xgboost/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#define XGBOOST_SPAN_H_

#include <xgboost/base.h>
#include <xgboost/logging.h>

#include <cinttypes> // size_t
#include <limits> // numeric_limits
Expand Down Expand Up @@ -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)) { \
Expand Down

0 comments on commit 6daa6ee

Please sign in to comment.