fix wrapper checkNAN
This commit is contained in:
parent
d202d8b977
commit
e79840e620
@ -28,12 +28,13 @@ extern "C" {
|
|||||||
void (*Check)(int exp, const char *fmt, ...) = XGBoostCheck_R;
|
void (*Check)(int exp, const char *fmt, ...) = XGBoostCheck_R;
|
||||||
void (*Error)(const char *fmt, ...) = error;
|
void (*Error)(const char *fmt, ...) = error;
|
||||||
}
|
}
|
||||||
|
} // namespace utils
|
||||||
|
|
||||||
namespace wrapper {
|
namespace wrapper {
|
||||||
bool CheckNAN(float v) {
|
bool CheckNAN(float v) {
|
||||||
return ISNAN(v);
|
return ISNAN(v);
|
||||||
}
|
}
|
||||||
}
|
} // namespace wrapper
|
||||||
} // namespace utils
|
|
||||||
|
|
||||||
namespace random {
|
namespace random {
|
||||||
void Seed(unsigned seed) {
|
void Seed(unsigned seed) {
|
||||||
|
|||||||
@ -423,7 +423,7 @@ class ColMaker: public IUpdater {
|
|||||||
#endif
|
#endif
|
||||||
int poption = param.parallel_option;
|
int poption = param.parallel_option;
|
||||||
if (poption == 2) {
|
if (poption == 2) {
|
||||||
poption = nsize * 2 < nthread ? 1 : 0;
|
poption = static_cast<int>(nsize) * 2 < nthread ? 1 : 0;
|
||||||
}
|
}
|
||||||
if (poption == 0) {
|
if (poption == 0) {
|
||||||
#pragma omp parallel for schedule(dynamic, batch_size)
|
#pragma omp parallel for schedule(dynamic, batch_size)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user