Reduce compile warnings (#6198)
Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
@@ -240,6 +240,9 @@ namespace aft {
|
||||
template <>
|
||||
XGBOOST_DEVICE inline double
|
||||
GetLimitGradAtInfPred<NormalDistribution>(CensoringType censor_type, bool sign, double sigma) {
|
||||
// Remove unused parameter compiler warning.
|
||||
(void) sigma;
|
||||
|
||||
switch (censor_type) {
|
||||
case CensoringType::kUncensored:
|
||||
return sign ? kMinGradient : kMaxGradient;
|
||||
@@ -288,6 +291,10 @@ GetLimitGradAtInfPred<LogisticDistribution>(CensoringType censor_type, bool sign
|
||||
template <>
|
||||
XGBOOST_DEVICE inline double
|
||||
GetLimitHessAtInfPred<LogisticDistribution>(CensoringType censor_type, bool sign, double sigma) {
|
||||
// Remove unused parameter compiler warning.
|
||||
(void) sign;
|
||||
(void) sigma;
|
||||
|
||||
switch (censor_type) {
|
||||
case CensoringType::kUncensored:
|
||||
case CensoringType::kRightCensored:
|
||||
@@ -317,6 +324,9 @@ GetLimitGradAtInfPred<ExtremeDistribution>(CensoringType censor_type, bool sign,
|
||||
template <>
|
||||
XGBOOST_DEVICE inline double
|
||||
GetLimitHessAtInfPred<ExtremeDistribution>(CensoringType censor_type, bool sign, double sigma) {
|
||||
// Remove unused parameter compiler warning.
|
||||
(void) sigma;
|
||||
|
||||
switch (censor_type) {
|
||||
case CensoringType::kUncensored:
|
||||
case CensoringType::kRightCensored:
|
||||
|
||||
@@ -157,7 +157,10 @@ class Transform {
|
||||
/*! \brief Dummy funtion defined when compiling for CPU. */
|
||||
template <typename std::enable_if<!CompiledWithCuda>::type* = nullptr,
|
||||
typename... HDV>
|
||||
void LaunchCUDA(Functor _func, HDV*... _vectors) const {
|
||||
void LaunchCUDA(Functor _func, HDV*...) const {
|
||||
// Remove unused parameter compiler warning.
|
||||
(void) _func;
|
||||
|
||||
LOG(FATAL) << "Not part of device code. WITH_CUDA: " << WITH_CUDA();
|
||||
}
|
||||
#endif // defined(__CUDACC__)
|
||||
|
||||
Reference in New Issue
Block a user