File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -281,8 +281,8 @@ struct TreeBuilder {
281281
282282 // NCCL cannot allreduce custom types, need to reinterpret as double
283283 SumAllReduce (context,
284- // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
285284 cuda::std::span<double >(
285+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
286286 reinterpret_cast <double *>(histogram.Ptr (batch.node_idx_begin )),
287287 batch.NodesInBatch () * num_outputs * split_proposals.HistogramSize () * 2 ));
288288 this ->Scan (histogram, batch, tree);
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ class SparseSplitProposals {
175175// Returns the bin index for a given feature and value
176176// If the value is not in the split proposals, -1 is returned
177177#ifdef __CUDACC__
178- __device__ auto FindBin (T x, int feature) const -> int
178+ [[nodiscard]] __device__ auto FindBin (T x, int feature) const -> int
179179 {
180180 const auto begin = split_proposals.begin () + row_pointers[feature];
181181 const auto end = split_proposals.begin () + row_pointers[feature + 1 ];
@@ -190,7 +190,9 @@ class SparseSplitProposals {
190190 // This could potentially be specialised for the 256 items case
191191 // https://blog.demofox.org/2017/06/20/simd-gpu-friendly-branchless-binary-search/
192192 template <class ForwardIt >
193- constexpr ForwardIt branchless_lower_bound (ForwardIt first, ForwardIt last, const T& value) const
193+ [[nodiscard]] constexpr ForwardIt branchless_lower_bound (ForwardIt first,
194+ ForwardIt last,
195+ const T& value) const
194196 {
195197 int n = last - first;
196198 ForwardIt base = first;
You can’t perform that action at this time.
0 commit comments