* @brief Get a thread local buffer. * * @param n The size of the thread local block. */
| 380 | * @param n The size of the thread local block. |
| 381 | */ |
| 382 | common::Span<RegTree::FVec> ThreadBuffer(std::size_t n) { |
| 383 | std::int32_t thread_idx = omp_get_thread_num(); |
| 384 | auto const fvec_offset = thread_idx * kBlockOfRowsSize; |
| 385 | auto fvec_tloc = common::Span{feat_vecs_}.subspan(fvec_offset, n); |
| 386 | return fvec_tloc; |
| 387 | } |
| 388 | }; |
| 389 | |
| 390 | template <std::size_t kBlockOfRowsSize, typename DataView> |
no test coverage detected