cmake .. -DWITH_GPU=ON -DWITH_DOC=OFF -DCMAKE_INSTALL_PREFIX=<path to install>
# please use sudo make install, if you want
# to install PaddlePaddle into the system
make -j `nproc` && make install
# set PaddlePaddle installation path in ~/.bashrc
export PATH=<path to install>/bin:$PATH
```
- **Python Dependencies(optional)**
If you want to compile PaddlePaddle with python predict api, you need to add -DWITH_SWIG_PY=ON in cmake command and install these first:
**Note:**
If you set `WITH_SWIG_PY=ON`, related python dependencies also need to be installed.
Otherwise, PaddlePaddle will automatically install python dependencies
at first time when user run paddle commands, such as `paddle version`, `paddle train`.
It may require sudo privileges:
```bash
sudo apt-get install swig
# you can run
sudo pip install <path to install>/opt/paddle/share/wheels/*.whl
# or just run
sudo paddle version
```
- **Doc Dependencies(optional)**
## <span id="mac">Building on Mac OS X</span>
If you want to compile PaddlePaddle with doc, you need to add -DWITH_DOC=ON in cmake command and install these first:
### Prerequisites
This guide is based on Mac OS X 10.11 (El Capitan). Note that if you are running an up to date version of OS X,
you will already have Python 2.7.10 and Numpy 1.8 installed.
The best option is to use the package manager homebrew to handle installations and upgrades for you.
To install [homebrew](http://brew.sh/), first open a terminal window (you can find Terminal in the Utilities folder in Applications), and issue the command:
CMake will find dependent libraries in system default paths first. After installing some optional libraries, corresponding build option will automatically be on(such as glog, gtest and gflags). And if libraries are not found, you have to set following variables manually in cmake command(CUDNN_ROOT, ATLAS_ROOT, MKL_ROOT, OPENBLAS_ROOT).
- **CPU Dependencies**
Here are some examples of cmake command with different options:
<spanid="build-and-install"></span><h1>Build and Install<aclass="headerlink"href="#build-and-install"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="requirement">
<spanid="requirement"></span><h2>Requirement<aclass="headerlink"href="#requirement"title="Permalink to this headline">¶</a></h2>
<divclass="section"id="dependents">
<spanid="dependents"></span><h3>Dependents<aclass="headerlink"href="#dependents"title="Permalink to this headline">¶</a></h3>
<divclass="section"id="installing-from-sources">
<spanid="installing-from-sources"></span><h1>Installing from Sources<aclass="headerlink"href="#installing-from-sources"title="Permalink to this headline">¶</a></h1>
<ulclass="simple">
<li><strong>CMake</strong>: required for 2.8+ version</li>
<li><strong>g++</strong>: a recent c++ compiler supporting c++11, >= 4.6, < 5</li>
<li><strong>BLAS library</strong>: such as openBLAS, MKL, ATLAS</li>
<li><strong>protobuf</strong>: required for 2.4+ version, 3.x is not supported</li>
<li><strong>python</strong>: currently only 2.7 version is supported</li>
<li><aclass="reference external"href="#download">1. Download and Setup</a></li>
<spanid="span-id-download-download-and-setup-span"></span><h2><spanid="download">Download and Setup</span><aclass="headerlink"href="#span-id-download-download-and-setup-span"title="Permalink to this headline">¶</a></h2>
<p>You can download PaddlePaddle from the <aclass="reference external"href="https://github.com/gangliao/Paddle">github source</a>.</p>
<spanid="span-id-requirements-requirements-span"></span><h2><spanid="requirements">Requirements</span><aclass="headerlink"href="#span-id-requirements-requirements-span"title="Permalink to this headline">¶</a></h2>
<p>To compile the source code, your computer must be equipped with GCC >=4.6 or Clang Compiler.</p>
<divclass="section"id="dependencies">
<spanid="dependencies"></span><h3>Dependencies<aclass="headerlink"href="#dependencies"title="Permalink to this headline">¶</a></h3>
<ulclass="simple">
<li><strong>WITH_GPU</strong>: Compile with gpu mode<ul>
<li>The GPU version works best with Cuda Toolkit 7.5 and cuDNN v5</li>
<li>Other versions Cuda Toolkit 6.5, 7.0 and cuDNN v2, v3, v4 are also supported</li>
<li>Note: to utilize cuDNN v5, Cuda Toolkit 7.5 is prerequisite and vice versa</li>
<li><strong>CMake</strong>: version >= 2.8</li>
<li><strong>BLAS</strong>: MKL, OpenBlas or ATLAS</li>
<li><strong>protobuf</strong>: version >= 2.4, <strong>Note: 3.x is not supported</strong></li>
<li><strong>python</strong>: only python 2.7 is supported currently</li>
</ul>
</li>
<li><strong>WITH_DOUBLE</strong>: Compile with double precision, otherwise use single precision</li>
<li><strong>WITH_GLOG</strong>: Compile with glog, otherwise use a log implement internally</li>
<li><strong>WITH_GFLAGS</strong>: Compile with gflags, otherwise use a flag implement internally</li>
<li><strong>WITH_TESTING</strong>: Compile with gtest and run unittest for PaddlePaddle</li>
<li><strong>WITH_DOC</strong>: Compile with documentation</li>
<li><strong>WITH_SWIG_PY</strong>: Compile with python predict api</li>
<li><strong>WITH_STYLE_CHECK</strong>: Style check for source code</li>
</div>
<divclass="section"id="options">
<spanid="options"></span><h3>Options<aclass="headerlink"href="#options"title="Permalink to this headline">¶</a></h3>
<p>PaddlePaddle supports some build options. To enable it, first you need to install the related libraries.</p>
<spanclass="o">**</span><spanclass="n">WITH_TESTING</span><spanclass="o">**</span><spanclass="o">|</span><spanclass="n">Compile</span><spanclass="k">with</span><spanclass="n">gtest</span><spanclass="k">for</span><spanclass="n">PaddlePaddle</span><spanclass="s1">'s unit testing. </span>
<p>To compile PaddlePaddle with python predict API, make sure swig installed and set <codeclass="docutils literal"><spanclass="pre">-DWITH_SWIG_PY=ON</span></code> as follows:</p>
<divclass="highlight-bash"><divclass="highlight"><pre><span></span><spanclass="c1"># install swig on ubuntu</span>
<p>To generate PaddlePaddle’s documentation, install dependencies and set <codeclass="docutils literal"><spanclass="pre">-DWITH_DOC=ON</span></code> as follows:</p>
<spanid="building-on-ubuntu14-04"></span><h2>Building on Ubuntu14.04<aclass="headerlink"href="#building-on-ubuntu14-04"title="Permalink to this headline">¶</a></h2>
<spanid="span-id-ubuntu-build-on-ubuntu-14-04-span"></span><h2><spanid="ubuntu">Build on Ubuntu 14.04</span><aclass="headerlink"href="#span-id-ubuntu-build-on-ubuntu-14-04-span"title="Permalink to this headline">¶</a></h2>
<divclass="section"id="install-dependencies">
<spanid="install-dependencies"></span><h3>Install Dependencies<aclass="headerlink"href="#install-dependencies"title="Permalink to this headline">¶</a></h3>
<spanid="id1"></span><h3>Build and Install<aclass="headerlink"href="#build-and-install"title="Permalink to this headline">¶</a></h3>
<p>CMake will find dependent libraries in system default paths first. After installing some optional libraries, corresponding build option will automatically be on(such as glog, gtest and gflags). And if libraries are not found, you have to set following variables manually in cmake command(CUDNN_ROOT, ATLAS_ROOT, MKL_ROOT, OPENBLAS_ROOT).</p>
<p>Here are some examples of cmake command with different options:</p>
<spanclass="c1"># set PaddlePaddle installation path in ~/.bashrc</span>
<spanclass="nb">export</span><spanclass="nv">PATH</span><spanclass="o">=</span><path to install>/bin:<spanclass="nv">$PATH</span>
</pre></div>
</div>
<p><strong>Note</strong></p>
<p>And if you set WITH_SWIG_PY=ON, you have to install related python predict api at the same time:</p>
<divclass="highlight-bash"><divclass="highlight"><pre><span></span>pip install <path to install>/opt/paddle/share/wheels/*.whl
<p><strong>Note:</strong></p>
<p>If you set <codeclass="docutils literal"><spanclass="pre">WITH_SWIG_PY=ON</span></code>, related python dependencies also need to be installed.
Otherwise, PaddlePaddle will automatically install python dependencies
at first time when user run paddle commands, such as <codeclass="docutils literal"><spanclass="pre">paddle</span><spanclass="pre">version</span></code>, <codeclass="docutils literal"><spanclass="pre">paddle</span><spanclass="pre">train</span></code>.
It may require sudo privileges:</p>
<divclass="highlight-bash"><divclass="highlight"><pre><span></span><spanclass="c1"># you can run</span>
sudo pip install <path to install>/opt/paddle/share/wheels/*.whl
<spanid="span-id-mac-building-on-mac-os-x-span"></span><h2><spanid="mac">Building on Mac OS X</span><aclass="headerlink"href="#span-id-mac-building-on-mac-os-x-span"title="Permalink to this headline">¶</a></h2>
<divclass="section"id="prerequisites">
<spanid="prerequisites"></span><h3>Prerequisites<aclass="headerlink"href="#prerequisites"title="Permalink to this headline">¶</a></h3>
<p>This guide is based on Mac OS X 10.11 (El Capitan). Note that if you are running an up to date version of OS X,
you will already have Python 2.7.10 and Numpy 1.8 installed.</p>
<p>The best option is to use the package manager homebrew to handle installations and upgrades for you.
To install <aclass="reference external"href="http://brew.sh/">homebrew</a>, first open a terminal window (you can find Terminal in the Utilities folder in Applications), and issue the command:</p>
<p>If you set <codeclass="docutils literal"><spanclass="pre">WITH_SWIG_PY=ON</span></code>, related python dependencies also need to be installed.
Otherwise, PaddlePaddle will automatically install python dependencies
at first time when user run paddle commands, such as <codeclass="docutils literal"><spanclass="pre">paddle</span><spanclass="pre">version</span></code>, <codeclass="docutils literal"><spanclass="pre">paddle</span><spanclass="pre">train</span></code>.
It may require sudo privileges:</p>
<divclass="highlight-bash"><divclass="highlight"><pre><span></span><spanclass="c1"># you can run</span>
sudo pip install <path to install>/opt/paddle/share/wheels/*.whl
<spanid="paddle"></span><spanclass="target"id="paddlenamespacepaddle"></span><emclass="property">namespace </em><codeclass="descname">paddle</code><aclass="headerlink"href="#_CPPv26paddle"title="Permalink to this definition">¶</a></dt>
<spanclass="target"id="paddlenamespacepaddle_1abcad9a84d03d6d95c6f95c2374c507f1"></span><codeclass="descname">__device__ T paddle::paddleAtomicAdd(T * address, T val)</code></dt>
<spanid="paddle::__attribute____paddle::IParameterUpdaterHook"></span><spanclass="target"id="paddlenamespacepaddle_1ae83136be5a20c0fcca6a7858f6cf7b56"></span><emclass="property">class</em><aclass="reference internal"href="../../math/matrix/matrix.html#_CPPv26paddle"title="paddle">paddle</a>::<aclass="reference internal"href="#_CPPv2N6paddle21IParameterUpdaterHookE"title="paddle::IParameterUpdaterHook">IParameterUpdaterHook</a><codeclass="descname">__attribute__</code><aclass="headerlink"href="#_CPPv2N6paddle13__attribute__E"title="Permalink to this definition">¶</a></dt>
<spanid="paddle::__attribute____paddle::IParameterUpdaterHook"></span><spanclass="target"id="paddlenamespacepaddle_1ae83136be5a20c0fcca6a7858f6cf7b56"></span><emclass="property">class</em><aclass="reference internal"href="../../cuda/rnn/rnn.html#_CPPv26paddle"title="paddle">paddle</a>::<aclass="reference internal"href="#_CPPv2N6paddle21IParameterUpdaterHookE"title="paddle::IParameterUpdaterHook">IParameterUpdaterHook</a><codeclass="descname">__attribute__</code><aclass="headerlink"href="#_CPPv2N6paddle13__attribute__E"title="Permalink to this definition">¶</a></dt>
<spanid="paddle::SpinLock"></span><spanclass="target"id="paddleclasspaddle_1_1SpinLock"></span><emclass="property">class </em><codeclass="descclassname">paddle::</code><codeclass="descname">SpinLock</code><aclass="headerlink"href="#_CPPv2N6paddle8SpinLockE"title="Permalink to this definition">¶</a></dt>
<dd><p>A simple wrapper for spin lock. The lock() method of <aclass="reference internal"href="#paddleclasspaddle_1_1SpinLock"><spanclass="std std-ref">SpinLock</span></a> is busy-waiting which means it will keep trying to lock until lock on successfully. The <aclass="reference internal"href="#paddleclasspaddle_1_1SpinLock"><spanclass="std std-ref">SpinLock</span></a> disable copy. </p>
<spanid="paddle::SpinLock::DISABLE_COPY__SpinLock"></span><spanclass="target"id="paddleclasspaddle_1_1SpinLock_1abb87cdb52fc8a8cc9576e2e220809085"></span><codeclass="descname">DISABLE_COPY</code><spanclass="sig-paren">(</span><aclass="reference internal"href="#_CPPv2N6paddle8SpinLockE"title="paddle::SpinLock">SpinLock</a><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle8SpinLock12DISABLE_COPYE8SpinLock"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="_CPPv2N6paddle8SpinLock8SpinLockEv">
<spanid="paddle::SpinLock::SpinLock"></span><spanclass="target"id="paddleclasspaddle_1_1SpinLock_1ae4b8664661115cae5d7a9f5c1e4cd4ed"></span><codeclass="descname">SpinLock</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle8SpinLock8SpinLockEv"title="Permalink to this definition">¶</a></dt>
...
...
@@ -196,16 +200,6 @@ var _hmt = _hmt || [];
<spanid="paddle::SpinLock::~SpinLock"></span><spanclass="target"id="paddleclasspaddle_1_1SpinLock_1a12800af3f93511270eceba996f2e1233"></span><codeclass="descname">~SpinLock</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle8SpinLockD0Ev"title="Permalink to this definition">¶</a></dt>
<spanid="paddle::SpinLock::SpinLock__SpinLockCR"></span><spanclass="target"id="paddleclasspaddle_1_1SpinLock_1a055efdc5fa3c87bf9c5efa19ca91fceb"></span><codeclass="descname">SpinLock</code><spanclass="sig-paren">(</span><emclass="property">const</em><aclass="reference internal"href="#_CPPv2N6paddle8SpinLock8SpinLockEv"title="paddle::SpinLock::SpinLock">SpinLock</a>&<spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle8SpinLock8SpinLockERK8SpinLock"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="_CPPv2N6paddle8SpinLockaSERK8SpinLock">
<spanid="paddle::SpinLock::assign-operator__SpinLockCR"></span><spanclass="target"id="paddleclasspaddle_1_1SpinLock_1a65860c4525eafaf6c50f67bb7e6f1217"></span><aclass="reference internal"href="#_CPPv2N6paddle8SpinLockE"title="paddle::SpinLock">SpinLock</a>&<codeclass="descname">operator=</code><spanclass="sig-paren">(</span><emclass="property">const</em><aclass="reference internal"href="#_CPPv2N6paddle8SpinLockE"title="paddle::SpinLock">SpinLock</a>&<spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle8SpinLockaSERK8SpinLock"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="_CPPv2N6paddle8SpinLock4lockEv">
<spanid="paddle::SpinLock::lock"></span><spanclass="target"id="paddleclasspaddle_1_1SpinLock_1ae5b78520a7808c9eee28674fa2dc1196"></span>void <codeclass="descname">lock</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle8SpinLock4lockEv"title="Permalink to this definition">¶</a></dt>
...
...
@@ -216,19 +210,6 @@ var _hmt = _hmt || [];
<spanid="paddle::SpinLock::unlock"></span><spanclass="target"id="paddleclasspaddle_1_1SpinLock_1a14f55be9684bed14427537571e7b6f7a"></span>void <codeclass="descname">unlock</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle8SpinLock6unlockEv"title="Permalink to this definition">¶</a></dt>
<spanid="paddle::SpinLock::lock___pthread_spinlock_t"></span><spanclass="target"id="paddleclasspaddle_1_1SpinLock_1a262929588dcc81d1740094988782f57e"></span>pthread_spinlock_t <codeclass="descname">lock_</code><aclass="headerlink"href="#_CPPv2N6paddle8SpinLock5lock_E"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="member">
<dtid="_CPPv2N6paddle8SpinLock8padding_E">
<spanid="paddle::SpinLock::padding___cA"></span><spanclass="target"id="paddleclasspaddle_1_1SpinLock_1a8c0dd8c3d3959525ecb169db292382ec"></span>char <codeclass="descname">padding_</code>[64-sizeof(pthread_spinlock_t)]<aclass="headerlink"href="#_CPPv2N6paddle8SpinLock8padding_E"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
</dd></dl>
...
...
@@ -238,9 +219,25 @@ var _hmt = _hmt || [];
<dlclass="class">
<dtid="_CPPv2N6paddle9SemaphoreE">
<spanid="paddle::Semaphore"></span><spanclass="target"id="paddleclasspaddle_1_1Semaphore"></span><emclass="property">class </em><codeclass="descclassname">paddle::</code><codeclass="descname">Semaphore</code><aclass="headerlink"href="#_CPPv2N6paddle9SemaphoreE"title="Permalink to this definition">¶</a></dt>
<dd><p>A simple wapper of semaphore which can only be shared in the same process. </p>
<spanid="paddle::Semaphore::Semaphore__SemaphoreCR"></span><spanclass="target"id="paddleclasspaddle_1_1Semaphore_1a6d471a25979a5d8c85f3649576a01284"></span><codeclass="descname">Semaphore</code><spanclass="sig-paren">(</span><emclass="property">const</em><aclass="reference internal"href="#_CPPv2N6paddle9Semaphore9SemaphoreERK9Semaphore"title="paddle::Semaphore::Semaphore">Semaphore</a>&<em>other</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle9Semaphore9SemaphoreERK9Semaphore"title="Permalink to this definition">¶</a></dt>
<dd><p>Disable copy & assign. </p>
</dd></dl>
<dlclass="function">
<dtid="_CPPv2N6paddle9SemaphoreaSERRK9Semaphore">
<spanid="paddle::Semaphore::assign-operator__SemaphoreCRR"></span><spanclass="target"id="paddleclasspaddle_1_1Semaphore_1a9072e5b688450318d9c55437b5593f46"></span><aclass="reference internal"href="#_CPPv2N6paddle9SemaphoreE"title="paddle::Semaphore">Semaphore</a>&<codeclass="descname">operator=</code><spanclass="sig-paren">(</span><emclass="property">const</em><aclass="reference internal"href="#_CPPv2N6paddle9SemaphoreE"title="paddle::Semaphore">Semaphore</a>&&<em>other</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle9SemaphoreaSERRK9Semaphore"title="Permalink to this definition">¶</a></dt>
<spanid="paddle::Semaphore::Semaphore__SemaphoreRR"></span><spanclass="target"id="paddleclasspaddle_1_1Semaphore_1a0a3cacfa683029887de7a865a6956b72"></span><codeclass="descname">Semaphore</code><spanclass="sig-paren">(</span><aclass="reference internal"href="#_CPPv2N6paddle9Semaphore9SemaphoreERK9Semaphore"title="paddle::Semaphore::Semaphore">Semaphore</a>&&<em>other</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle9Semaphore9SemaphoreERR9Semaphore"title="Permalink to this definition">¶</a></dt>
<dd><p>Enable move. </p>
</dd></dl>
<dlclass="function">
<dtid="_CPPv2N6paddle9Semaphore9SemaphoreEi">
<spanid="paddle::Semaphore::Semaphore__i"></span><spanclass="target"id="paddleclasspaddle_1_1Semaphore_1a4884c28f1f853a0467b70e7f33547670"></span><codeclass="descname">Semaphore</code><spanclass="sig-paren">(</span>int <em>initValue</em> = 0<spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle9Semaphore9SemaphoreEi"title="Permalink to this definition">¶</a></dt>
...
...
@@ -290,14 +287,6 @@ var _hmt = _hmt || [];
<dd><p>increment the semaphore. If the semaphore’s value greater than 0, wake up a thread blocked in <aclass="reference internal"href="#paddleclasspaddle_1_1Semaphore_1a3d7d3699ad8f49ad8bbad260a174c28d"><spanclass="std std-ref">wait()</span></a>. </p>
<spanid="paddle::Semaphore::sem___sem_t"></span><spanclass="target"id="paddleclasspaddle_1_1Semaphore_1ab66cee48c4a02d13b4ef56cf2538ee42"></span>sem_t <codeclass="descname">sem_</code><aclass="headerlink"href="#_CPPv2N6paddle9Semaphore4sem_E"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
</dd></dl>
...
...
@@ -307,9 +296,13 @@ var _hmt = _hmt || [];
<dlclass="class">
<dtid="_CPPv2N6paddle13ThreadBarrierE">
<spanid="paddle::ThreadBarrier"></span><spanclass="target"id="paddleclasspaddle_1_1ThreadBarrier"></span><emclass="property">class </em><codeclass="descclassname">paddle::</code><codeclass="descname">ThreadBarrier</code><aclass="headerlink"href="#_CPPv2N6paddle13ThreadBarrierE"title="Permalink to this definition">¶</a></dt>
<dd><p>A simple wrapper of thread barrier. The <aclass="reference internal"href="#paddleclasspaddle_1_1ThreadBarrier"><spanclass="std std-ref">ThreadBarrier</span></a> disable copy. </p>
<spanid="paddle::ThreadBarrier::DISABLE_COPY__ThreadBarrier"></span><spanclass="target"id="paddleclasspaddle_1_1ThreadBarrier_1ace6a9d5cf27b395ce3c478b3cbfd1f17"></span><codeclass="descname">DISABLE_COPY</code><spanclass="sig-paren">(</span><aclass="reference internal"href="#_CPPv2N6paddle13ThreadBarrierE"title="paddle::ThreadBarrier">ThreadBarrier</a><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle13ThreadBarrier12DISABLE_COPYE13ThreadBarrier"title="Permalink to this definition">¶</a></dt>
<spanid="paddle::ThreadBarrier::ThreadBarrier__i"></span><spanclass="target"id="paddleclasspaddle_1_1ThreadBarrier_1a2b4ee1af9857ce417455d6a343a1a117"></span><codeclass="descname">ThreadBarrier</code><spanclass="sig-paren">(</span>int <em>count</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle13ThreadBarrier13ThreadBarrierEi"title="Permalink to this definition">¶</a></dt>
...
...
@@ -321,30 +314,12 @@ var _hmt = _hmt || [];
<spanid="paddle::ThreadBarrier::~ThreadBarrier"></span><spanclass="target"id="paddleclasspaddle_1_1ThreadBarrier_1a0922960555e03da24426cf8fdd0b15dd"></span><codeclass="descname">~ThreadBarrier</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle13ThreadBarrierD0Ev"title="Permalink to this definition">¶</a></dt>
<spanid="paddle::ThreadBarrier::ThreadBarrier__ThreadBarrierCR"></span><spanclass="target"id="paddleclasspaddle_1_1ThreadBarrier_1a42b7d18074508549f5e53156d8791fd8"></span><codeclass="descname">ThreadBarrier</code><spanclass="sig-paren">(</span><emclass="property">const</em><aclass="reference internal"href="#_CPPv2N6paddle13ThreadBarrier13ThreadBarrierEi"title="paddle::ThreadBarrier::ThreadBarrier">ThreadBarrier</a>&<spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle13ThreadBarrier13ThreadBarrierERK13ThreadBarrier"title="Permalink to this definition">¶</a></dt>
<spanid="paddle::ThreadBarrier::assign-operator__ThreadBarrierCR"></span><spanclass="target"id="paddleclasspaddle_1_1ThreadBarrier_1a84b0ef2c24d0ee7770fa453d385f5bdf"></span><aclass="reference internal"href="#_CPPv2N6paddle13ThreadBarrierE"title="paddle::ThreadBarrier">ThreadBarrier</a>&<codeclass="descname">operator=</code><spanclass="sig-paren">(</span><emclass="property">const</em><aclass="reference internal"href="#_CPPv2N6paddle13ThreadBarrierE"title="paddle::ThreadBarrier">ThreadBarrier</a>&<spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle13ThreadBarrieraSERK13ThreadBarrier"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="_CPPv2N6paddle13ThreadBarrier4waitEv">
<spanid="paddle::ThreadBarrier::wait"></span><spanclass="target"id="paddleclasspaddle_1_1ThreadBarrier_1af63f9491d2644a258350e12120fedf89"></span>void <codeclass="descname">wait</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#_CPPv2N6paddle13ThreadBarrier4waitEv"title="Permalink to this definition">¶</a></dt>
<dd><p>If there were count - 1 threads waiting before, then wake up all the count - 1 threads and continue run together. Else block the thread until waked by other thread . </p>
<spanid="paddle::ThreadBarrier::barrier___pthread_barrier_t"></span><spanclass="target"id="paddleclasspaddle_1_1ThreadBarrier_1ae29548e35c5a20906647e8dcc48f9f39"></span>pthread_barrier_t <codeclass="descname">barrier_</code><aclass="headerlink"href="#_CPPv2N6paddle13ThreadBarrier8barrier_E"title="Permalink to this definition">¶</a></dt>