Rename and extract Context. (#8528)
* Rename `GenericParameter` to `Context`. * Rename header file to reflect the change. * Rename all references.
This commit is contained in:
@@ -8,21 +8,21 @@
|
||||
#define XGBOOST_COMMON_HIST_UTIL_H_
|
||||
|
||||
#include <xgboost/data.h>
|
||||
#include <xgboost/generic_parameters.h>
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "algorithm.h" // SegmentId
|
||||
#include "categorical.h"
|
||||
#include "common.h"
|
||||
#include "quantile.h"
|
||||
#include "row_set.h"
|
||||
#include "threading_utils.h"
|
||||
#include "timer.h"
|
||||
#include "algorithm.h" // SegmentId
|
||||
|
||||
namespace xgboost {
|
||||
class GHistIndexMatrix;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#ifndef XGBOOST_COMMON_LINALG_OP_CUH_
|
||||
#define XGBOOST_COMMON_LINALG_OP_CUH_
|
||||
|
||||
#include "xgboost/generic_parameters.h"
|
||||
#include "device_helpers.cuh"
|
||||
#include "linalg_op.h"
|
||||
#include "xgboost/context.h"
|
||||
#include "xgboost/linalg.h"
|
||||
|
||||
namespace xgboost {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "common.h"
|
||||
#include "threading_utils.h"
|
||||
#include "transform_iterator.h" // MakeIndexTransformIter
|
||||
#include "xgboost/generic_parameters.h"
|
||||
#include "xgboost/context.h" // Context
|
||||
#include "xgboost/linalg.h"
|
||||
|
||||
namespace xgboost {
|
||||
@@ -54,7 +54,7 @@ void ElementWiseTransformDevice(linalg::TensorView<T, D>, Fn&&, void* = nullptr)
|
||||
}
|
||||
|
||||
template <typename T, int32_t D, typename Fn>
|
||||
void ElementWiseKernel(GenericParameter const* ctx, linalg::TensorView<T, D> t, Fn&& fn) {
|
||||
void ElementWiseKernel(Context const* ctx, linalg::TensorView<T, D> t, Fn&& fn) {
|
||||
if (!ctx->IsCPU()) {
|
||||
common::AssertGPUSupport();
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <type_traits> // std::is_same
|
||||
|
||||
#include "threading_utils.h" // MemStackAllocator, ParallelFor, DefaultMaxThreads
|
||||
#include "xgboost/generic_parameters.h" // Context
|
||||
#include "xgboost/context.h" // Context
|
||||
#include "xgboost/host_device_vector.h" // HostDeviceVector
|
||||
|
||||
namespace xgboost {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "device_helpers.cuh" // dh::Reduce, safe_cuda, dh::XGBCachingDeviceAllocator
|
||||
#include "numeric.h"
|
||||
#include "xgboost/generic_parameters.h" // Context
|
||||
#include "xgboost/context.h" // Context
|
||||
#include "xgboost/host_device_vector.h" // HostDeviceVector
|
||||
|
||||
namespace xgboost {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "common.h" // AssertGPUSupport
|
||||
#include "threading_utils.h" // MemStackAllocator, DefaultMaxThreads
|
||||
#include "xgboost/generic_parameters.h" // Context
|
||||
#include "xgboost/context.h" // Context
|
||||
#include "xgboost/host_device_vector.h" // HostDeviceVector
|
||||
|
||||
namespace xgboost {
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
#include <xgboost/data.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
#include "../tree/hist/expand_entry.h"
|
||||
#include "categorical.h"
|
||||
#include "column_matrix.h"
|
||||
#include "../tree/hist/expand_entry.h"
|
||||
#include "xgboost/generic_parameters.h"
|
||||
#include "xgboost/context.h"
|
||||
#include "xgboost/tree_model.h"
|
||||
|
||||
namespace xgboost {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "common.h" // common::OptionalWeights
|
||||
#include "device_helpers.cuh" // dh::MakeTransformIterator, tcbegin, tcend
|
||||
#include "stats.cuh" // common::SegmentedQuantile, common::SegmentedWeightedQuantile
|
||||
#include "xgboost/generic_parameters.h" // Context
|
||||
#include "xgboost/context.h" // Context
|
||||
#include "xgboost/host_device_vector.h" // HostDeviceVector
|
||||
#include "xgboost/linalg.h" // linalg::TensorView, UnravelIndex, Apply
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "device_helpers.cuh"
|
||||
#include "linalg_op.cuh"
|
||||
#include "xgboost/generic_parameters.h"
|
||||
#include "xgboost/context.h"
|
||||
#include "xgboost/linalg.h"
|
||||
#include "xgboost/tree_model.h"
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "common.h" // AssertGPUSupport
|
||||
#include "transform_iterator.h" // MakeIndexTransformIter
|
||||
#include "xgboost/generic_parameters.h"
|
||||
#include "xgboost/context.h" // Context
|
||||
#include "xgboost/linalg.h"
|
||||
|
||||
namespace xgboost {
|
||||
|
||||
Reference in New Issue
Block a user