From 3fa73aab674de4a7b468bd872bcc931839d92620 Mon Sep 17 00:00:00 2001 From: fis Date: Wed, 22 Dec 2021 12:56:41 +0800 Subject: [PATCH] HD. --- src/common/categorical.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/categorical.h b/src/common/categorical.h index 056044906066..04f2a9270558 100644 --- a/src/common/categorical.h +++ b/src/common/categorical.h @@ -33,7 +33,7 @@ inline XGBOOST_DEVICE bool IsCat(Span ft, bst_feature_t fidx) } template -bool InvalidCat(float cat, SizeT n) { +XGBOOST_DEVICE bool InvalidCat(float cat, SizeT n) { return cat < 0 || cat > static_cast(std::numeric_limits::max()) || cat >= n; }