项目作者: Quangbd

项目描述 :
cpp xgboost
高级语言: C++
项目地址: git://github.com/Quangbd/cxgboost.git
创建时间: 2021-02-24T03:32:15Z
项目社区:https://github.com/Quangbd/cxgboost

开源协议:

下载


Native XGBoost

The C++ XGBoost version for PC and Android.

  1. git clone https://github.com/Quangbd/cxgboost.git
  2. cd cxgboost
  3. mkdir -p /libs/arm64-v8a
  4. mkdir -p /libs/osx_x86_64

Build

1. XGBoost

  1. git clone --recursive https://github.com/dmlc/xgboost
  2. cd xgboost
  3. mkdir build
  4. cd build
  5. cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_LIB=ON ..
  6. make -j$(nproc)
  7. cp build/dmlc-core/libdmlc.a lib/libxgboost.a ${path}/cxgboost/libs/osx_x86_64/
  • For Android
  1. git clone --recursive https://github.com/dmlc/xgboost
  2. cd xgboost
  3. mkdir build
  4. cd build
  5. cmake \ INT 10:07:50
  6. -DCMAKE_TOOLCHAIN_FILE=/Users/$(username)/Library/Android/sdk/ndk/21.3.6528147/build/cmake/android.toolchain.cmake \
  7. -DANDROID_ABI=arm64-v8a \
  8. -DCMAKE_BUILD_TYPE=Release \
  9. -DANDROID_NATIVE_API_LEVEL=28 -DBUILD_STATIC_LIB=ON ..
  10. make -j$(nproc)
  11. cp build/dmlc-core/libdmlc.a lib/libxgboost.a ${path}/cxgboost/libs/arm64-v8a/
  • Copy header files
  1. cp -r include/xgboost ${path}/cxgboost/includes

2.Lib

  • For PC
  1. cd cxgboost
  2. mkdir build
  3. cd build
  4. cmake -DCMAKE_BUILD_TYPE=Release ..
  5. make -j$(nproc)
  • For Android
  1. cd cxgboost
  2. mkdir build
  3. cd build
  4. cmake \ INT 10:07:50
  5. -DCMAKE_TOOLCHAIN_FILE=/Users/$(username)/Library/Android/sdk/ndk/21.3.6528147/build/cmake/android.toolchain.cmake \
  6. -DANDROID_ABI=arm64-v8a \
  7. -DCMAKE_BUILD_TYPE=Release \
  8. -DANDROID_NATIVE_API_LEVEL=28 ..
  9. make -j$(nproc)