Skip to content

Commit

Permalink
workaround gcc-7.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Mar 6, 2023
1 parent 9f52e42 commit b928387
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/xgboost/linalg.h
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,8 @@ class TensorView {
* \brief Constructor for automatic type deduction.
*/
template <typename Container, typename... S,
std::enable_if_t<!common::detail::IsSpan<Container>::value> * = nullptr>
std::enable_if_t<!common::detail::IsSpan<Container>::value &&
!std::is_pointer_v<Container>> * = nullptr>
auto MakeTensorView(Context const *ctx, Container &data, S &&...shape) { // NOLINT
using T = typename Container::value_type;
std::size_t in_shape[sizeof...(S)];
Expand Down
3 changes: 1 addition & 2 deletions src/objective/adaptive.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ void UpdateTreeLeafHost(Context const* ctx, std::vector<bst_node_t> const& posit

#if !defined(XGBOOST_USE_CUDA)
void UpdateTreeLeafDevice(Context const*, common::Span<bst_node_t const>, std::int32_t,
MetaInfo const&, float learning_rate, HostDeviceVector<float> const&,
float, RegTree*) {
MetaInfo const&, float, HostDeviceVector<float> const&, float, RegTree*) {
common::AssertGPUSupport();
}
#endif // !defined(XGBOOST_USE_CUDA)
Expand Down

0 comments on commit b928387

Please sign in to comment.