[R] Add missing DMatrix functions (#9929)
* `XGDMatrixGetQuantileCut` * `XGDMatrixNumNonMissing` * `XGDMatrixGetDataAsCSR` --------- Co-authored-by: Jiaming Yuan <jm.yuan@outlook.com>
This commit is contained in:
13
src/data/array_interface.cc
Normal file
13
src/data/array_interface.cc
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Copyright 2019-2024, XGBoost Contributors
|
||||
*/
|
||||
#include "array_interface.h"
|
||||
|
||||
#include "../common/common.h" // for AssertGPUSupport
|
||||
|
||||
namespace xgboost {
|
||||
#if !defined(XGBOOST_USE_CUDA)
|
||||
void ArrayInterfaceHandler::SyncCudaStream(int64_t) { common::AssertGPUSupport(); }
|
||||
bool ArrayInterfaceHandler::IsCudaPtr(void const *) { return false; }
|
||||
#endif // !defined(XGBOOST_USE_CUDA)
|
||||
} // namespace xgboost
|
||||
@@ -375,11 +375,6 @@ struct ToDType<int64_t> {
|
||||
static constexpr ArrayInterfaceHandler::Type kType = ArrayInterfaceHandler::kI8;
|
||||
};
|
||||
|
||||
#if !defined(XGBOOST_USE_CUDA)
|
||||
inline void ArrayInterfaceHandler::SyncCudaStream(int64_t) { common::AssertGPUSupport(); }
|
||||
inline bool ArrayInterfaceHandler::IsCudaPtr(void const *) { return false; }
|
||||
#endif // !defined(XGBOOST_USE_CUDA)
|
||||
|
||||
/**
|
||||
* \brief A type erased view over __array_interface__ protocol defined by numpy
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user