parent
ccf43d4ba0
commit
e803d06d8c
@ -23,7 +23,6 @@ PKG_LIBS = @OPENMP_CXXFLAGS@ @OPENMP_LIB@ @ENDIAN_FLAG@ @BACKTRACE_LIB@ -pthread
|
|||||||
OBJECTS= \
|
OBJECTS= \
|
||||||
./xgboost_R.o \
|
./xgboost_R.o \
|
||||||
./xgboost_custom.o \
|
./xgboost_custom.o \
|
||||||
./xgboost_assert.o \
|
|
||||||
./init.o \
|
./init.o \
|
||||||
$(PKGROOT)/src/metric/metric.o \
|
$(PKGROOT)/src/metric/metric.o \
|
||||||
$(PKGROOT)/src/metric/elementwise_metric.o \
|
$(PKGROOT)/src/metric/elementwise_metric.o \
|
||||||
|
|||||||
@ -23,7 +23,6 @@ PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) -DDMLC_CMAKE_LITTLE_ENDIAN=1 $(SHLIB_PTHRE
|
|||||||
OBJECTS= \
|
OBJECTS= \
|
||||||
./xgboost_R.o \
|
./xgboost_R.o \
|
||||||
./xgboost_custom.o \
|
./xgboost_custom.o \
|
||||||
./xgboost_assert.o \
|
|
||||||
./init.o \
|
./init.o \
|
||||||
$(PKGROOT)/src/metric/metric.o \
|
$(PKGROOT)/src/metric/metric.o \
|
||||||
$(PKGROOT)/src/metric/elementwise_metric.o \
|
$(PKGROOT)/src/metric/elementwise_metric.o \
|
||||||
|
|||||||
@ -1,26 +0,0 @@
|
|||||||
// Copyright (c) 2014 by Contributors
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <Rinternals.h>
|
|
||||||
|
|
||||||
// implements error handling
|
|
||||||
void XGBoostAssert_R(int exp, const char *fmt, ...) {
|
|
||||||
char buf[1024];
|
|
||||||
if (exp == 0) {
|
|
||||||
va_list args;
|
|
||||||
va_start(args, fmt);
|
|
||||||
vsprintf(buf, fmt, args);
|
|
||||||
va_end(args);
|
|
||||||
error("AssertError:%s\n", buf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void XGBoostCheck_R(int exp, const char *fmt, ...) {
|
|
||||||
char buf[1024];
|
|
||||||
if (exp == 0) {
|
|
||||||
va_list args;
|
|
||||||
va_start(args, fmt);
|
|
||||||
vsprintf(buf, fmt, args);
|
|
||||||
va_end(args);
|
|
||||||
error("%s\n", buf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user