提交 469d6ed0 编写于 作者: L Lim Xiang Yann 提交者: Gines

Doc improvements for mac (hw.logicalcpu) (#1415)

上级 559a57ec
...@@ -103,7 +103,7 @@ We add links to some community-based work based on OpenPose. Note: We do not sup ...@@ -103,7 +103,7 @@ We add links to some community-based work based on OpenPose. Note: We do not sup
The first step is to clone the OpenPose repository. The first step is to clone the OpenPose repository.
1. Windows: You might use [GitHub Desktop](https://desktop.github.com/). 1. Windows: You might use [GitHub Desktop](https://desktop.github.com/).
2. Ubuntu: 2. Ubuntu/Mac:
```bash ```bash
git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose
``` ```
...@@ -180,10 +180,10 @@ make -j`nproc` ...@@ -180,10 +180,10 @@ make -j`nproc`
``` ```
#### Mac #### Mac
Build the project by running the following commands. Build the project by running the following commands (note that Mac provides both `logicalcpu` and `physicalcpu`, but we want the logical number for maximum speed).
``` ```
cd build/ cd build/
make -j`sysctl -n hw.physicalcpu` make -j`sysctl -n hw.logicalcpu`
``` ```
#### Windows #### Windows
......
...@@ -12,14 +12,20 @@ You can quickly add your custom code into this folder so that quick prototypes c ...@@ -12,14 +12,20 @@ You can quickly add your custom code into this folder so that quick prototypes c
1. Install/compile OpenPose as usual. 1. Install/compile OpenPose as usual.
2. Add your custom *.cpp / *.hpp files here,. Hint: You might want to start by copying the [OpenPoseDemo](../openpose/openpose.cpp) example or any of the [examples/tutorial_api_cpp/](../tutorial_api_cpp/) examples. Then, you can simply modify their content. 2. Add your custom *.cpp / *.hpp files here,. Hint: You might want to start by copying the [OpenPoseDemo](../openpose/openpose.cpp) example or any of the [examples/tutorial_api_cpp/](../tutorial_api_cpp/) examples. Then, you can simply modify their content.
3. Add the name of your custom *.cpp / *.hpp files at the top of the [examples/user_code/CMakeLists.txt](./CMakeLists.txt) file. 3. Add the name of your custom *.cpp / *.hpp files at the top of the [examples/user_code/CMakeLists.txt](./CMakeLists.txt) file.
4. Re-compile OpenPose. 4. Re-compile OpenPose. Depending on your OS, that means...
- Ubuntu:
``` ```
# Ubuntu/Mac
cd build/ cd build/
make -j`nproc` make -j`nproc`
# Windows
# Close Visual Studio, re-run CMake, and re-compile the project in Visual Studio
``` ```
- Mac:
```
cd build/
make -j`sysctl -n hw.logicalcpu`
```
- Windows: Close Visual Studio, re-run CMake, and re-compile the project in Visual Studio.
5. **Run step 4 every time that you make changes into your code**. 5. **Run step 4 every time that you make changes into your code**.
......
...@@ -8,8 +8,8 @@ source $BASEDIR/defaults.sh ...@@ -8,8 +8,8 @@ source $BASEDIR/defaults.sh
if [[ $WITH_CMAKE == true ]] ; then if [[ $WITH_CMAKE == true ]] ; then
cd build cd build
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make -j`nproc` ; fi if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make -j`nproc` ; fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make -j1 ; fi if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make -j`sysctl -n hw.logicalcpu` ; fi
else else
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make all -j`nproc` ; fi if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make all -j`nproc` ; fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make all -j1 ; fi if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make all -j`sysctl -n hw.logicalcpu` ; fi
fi fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册