[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:
parent
4979991d5b
commit
6daa6ee4e0
@ -410,7 +410,7 @@ In some very specific cases, like when you want to pilot **XGBoost** from `caret
|
|||||||
|
|
||||||
```{r saveLoadRBinVectorModel, message=F, warning=F}
|
```{r saveLoadRBinVectorModel, message=F, warning=F}
|
||||||
# save model to R's raw vector
|
# save model to R's raw vector
|
||||||
rawVec <- xgb.save.raw(bst)
|
rawVec <- xgb.serialize(bst)
|
||||||
|
|
||||||
# print class
|
# print class
|
||||||
print(class(rawVec))
|
print(class(rawVec))
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
#define XGBOOST_SPAN_H_
|
#define XGBOOST_SPAN_H_
|
||||||
|
|
||||||
#include <xgboost/base.h>
|
#include <xgboost/base.h>
|
||||||
|
#include <xgboost/logging.h>
|
||||||
|
|
||||||
#include <cinttypes> // size_t
|
#include <cinttypes> // size_t
|
||||||
#include <limits> // numeric_limits
|
#include <limits> // numeric_limits
|
||||||
@ -85,9 +86,11 @@ namespace common {
|
|||||||
} \
|
} \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
#ifdef __CUDA_ARCH__
|
#if defined(__CUDA_ARCH__)
|
||||||
#define SPAN_CHECK KERNEL_CHECK
|
#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) \
|
#define SPAN_CHECK(cond) \
|
||||||
do { \
|
do { \
|
||||||
if (XGBOOST_EXPECT(!(cond), false)) { \
|
if (XGBOOST_EXPECT(!(cond), false)) { \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user