MCPcopy Create free account
hub / github.com/dmlc/xgboost / ThreadBuffer

Method ThreadBuffer

src/predictor/cpu_predictor.cc:382–387  ·  view source on GitHub ↗

* @brief Get a thread local buffer. * * @param n The size of the thread local block. */

Source from the content-addressed store, hash-verified

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
390template <std::size_t kBlockOfRowsSize, typename DataView>

Callers 3

PredictBatchKernelMethod · 0.80
PredictLeafMethod · 0.80

Calls 1

subspanMethod · 0.80

Tested by

no test coverage detected