Skip to content

Commit 6daa6ee

Browse files
committed
[R] Address warnings to comply with CRAN submission policy (#5600)
* [R] Address warnings to comply with CRAN submission policy * Include <xgboost/logging.h>
1 parent 4979991 commit 6daa6ee

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

R-package/vignettes/xgboostPresentation.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ In some very specific cases, like when you want to pilot **XGBoost** from `caret
410410

411411
```{r saveLoadRBinVectorModel, message=F, warning=F}
412412
# save model to R's raw vector
413-
rawVec <- xgb.save.raw(bst)
413+
rawVec <- xgb.serialize(bst)
414414
415415
# print class
416416
print(class(rawVec))

include/xgboost/span.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#define XGBOOST_SPAN_H_
3131

3232
#include <xgboost/base.h>
33+
#include <xgboost/logging.h>
3334

3435
#include <cinttypes> // size_t
3536
#include <limits> // numeric_limits
@@ -85,9 +86,11 @@ namespace common {
8586
} \
8687
} while (0);
8788

88-
#ifdef __CUDA_ARCH__
89+
#if defined(__CUDA_ARCH__)
8990
#define SPAN_CHECK KERNEL_CHECK
90-
#else
91+
#elif defined(XGBOOST_STRICT_R_MODE) && XGBOOST_STRICT_R_MODE == 1 // R package
92+
#define SPAN_CHECK CHECK // check from dmlc
93+
#else // not CUDA, not R
9194
#define SPAN_CHECK(cond) \
9295
do { \
9396
if (XGBOOST_EXPECT(!(cond), false)) { \

0 commit comments

Comments
 (0)