=================================
CUDA Libraries Host API
=================================

.. raw:: html

    <p>NumbaPro provides binding to cuRAND, cuFFT host API for operation on NumPy
    arrays.</p>
    <div class="section" id="curand">
    <h2>cuRAND<a class="headerlink" href="#curand" title="Permalink to this headline">¶</a></h2>
    <p>Provides <cite>pseudo-random number generator</cite> (PRNG) and <cite>quasi-random generator</cite> (QRNG).
    See <a class="reference external" href="http://docs.nvidia.com/cuda/curand/index.html">NVIDIA cuRAND</a>.</p>
    <div class="section" id="class-prng">
    <h3>class PRNG<a class="headerlink" href="#class-prng" title="Permalink to this headline">¶</a></h3>
    <dl class="class">
    <dt id="numbapro.cudalib.curand.PRNG">
    <em class="property">class </em><code class="descclassname">numbapro.cudalib.curand.</code><code class="descname">PRNG</code><span class="sig-paren">(</span><em>*args</em>, <em>**kws</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.PRNG" title="Permalink to this definition">¶</a></dt>
    <dd><p>cuRAND pseudo random number generator</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>rndtype</strong> &#8211; Algorithm type.  All possible values are listed as
    class attributes of this class, e.g. TEST, DEFAULT,
    XORWOW, MRG32K3A, MTGP32.</li>
    <li><strong>seed</strong> &#8211; Seed for the RNG.</li>
    <li><strong>offset</strong> &#8211; Offset to the random number stream.</li>
    <li><strong>stream</strong> &#8211; CUDA stream.</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    <p>Example:</p>
    <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">accelerate.cuda</span> <span class="kn">import</span> <span class="n">rand</span>
    <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">numpy</span> <span class="kn">import</span> <span class="n">empty</span>
    <span class="gp">&gt;&gt;&gt; </span><span class="n">prng</span> <span class="o">=</span> <span class="n">rand</span><span class="o">.</span><span class="n">PRNG</span><span class="p">(</span><span class="n">rndtype</span><span class="o">=</span><span class="n">rand</span><span class="o">.</span><span class="n">PRNG</span><span class="o">.</span><span class="n">XORWOW</span><span class="p">)</span>
    <span class="gp">&gt;&gt;&gt; </span><span class="n">r</span> <span class="o">=</span> <span class="n">empty</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
    <span class="gp">&gt;&gt;&gt; </span><span class="n">prng</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="n">r</span><span class="p">)</span>
    <span class="gp">&gt;&gt;&gt; </span><span class="n">r</span>
    <span class="go">array([ ... ])</span>
    </pre></div>
    </div>
    <dl class="method">
    <dt id="numbapro.cudalib.curand.PRNG.lognormal">
    <code class="descname">lognormal</code><span class="sig-paren">(</span><em>ary</em>, <em>mean</em>, <em>sigma</em>, <em>size=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.PRNG.lognormal" title="Permalink to this definition">¶</a></dt>
    <dd><dl class="docutils">
    <dt>Generate floating point random number sampled</dt>
    <dd>from a log-normal distribution and fill into ary.</dd>
    </dl>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>ary</strong> &#8211; Numpy array or cuda device array.</li>
    <li><strong>mean</strong> &#8211; Center of the distribution.</li>
    <li><strong>sigma</strong> &#8211; Standard deviation of the distribution.</li>
    <li><strong>size</strong> &#8211; Number of samples. Default to array size.</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.curand.PRNG.normal">
    <code class="descname">normal</code><span class="sig-paren">(</span><em>ary</em>, <em>mean</em>, <em>sigma</em>, <em>size=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.PRNG.normal" title="Permalink to this definition">¶</a></dt>
    <dd><p>Generate floating point random number sampled
    from a normal distribution and fill into ary.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>ary</strong> &#8211; Numpy array or cuda device array.</li>
    <li><strong>mean</strong> &#8211; Center of the distribution.</li>
    <li><strong>sigma</strong> &#8211; Standard deviation of the distribution.</li>
    <li><strong>size</strong> &#8211; Number of samples. Default to array size.</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.curand.PRNG.poisson">
    <code class="descname">poisson</code><span class="sig-paren">(</span><em>ary</em>, <em>lmbd</em>, <em>size=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.PRNG.poisson" title="Permalink to this definition">¶</a></dt>
    <dd><p>Generate floating point random number sampled
    from a poisson distribution and fill into ary.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>ary</strong> &#8211; Numpy array or cuda device array.</li>
    <li><strong>lmbda</strong> &#8211; Lambda for the distribution.</li>
    <li><strong>size</strong> &#8211; Number of samples. Default to array size.</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="attribute">
    <dt id="numbapro.cudalib.curand.PRNG.seed">
    <code class="descname">seed</code><a class="headerlink" href="#numbapro.cudalib.curand.PRNG.seed" title="Permalink to this definition">¶</a></dt>
    <dd><p>Mutatable attribute for the seed for the RNG</p>
    </dd></dl>

    <dl class="attribute">
    <dt id="numbapro.cudalib.curand.PRNG.stream">
    <code class="descname">stream</code><a class="headerlink" href="#numbapro.cudalib.curand.PRNG.stream" title="Permalink to this definition">¶</a></dt>
    <dd><p>Associate a CUDA stream to the generator object.
    All subsequent calls will use this stream.</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.curand.PRNG.uniform">
    <code class="descname">uniform</code><span class="sig-paren">(</span><em>ary</em>, <em>size=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.PRNG.uniform" title="Permalink to this definition">¶</a></dt>
    <dd><dl class="docutils">
    <dt>Generate floating point random number sampled</dt>
    <dd>from a uniform distribution and fill into ary.</dd>
    </dl>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>ary</strong> &#8211; Numpy array or cuda device array.</li>
    <li><strong>size</strong> &#8211; Number of samples. Default to array size.</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    </dd></dl>

    </div>
    <div class="section" id="class-qrng">
    <h3>class QRNG<a class="headerlink" href="#class-qrng" title="Permalink to this headline">¶</a></h3>
    <dl class="class">
    <dt id="numbapro.cudalib.curand.QRNG">
    <em class="property">class </em><code class="descclassname">numbapro.cudalib.curand.</code><code class="descname">QRNG</code><span class="sig-paren">(</span><em>*args</em>, <em>**kws</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.QRNG" title="Permalink to this definition">¶</a></dt>
    <dd><p>cuRAND quasi random number generator</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>rndtype</strong> &#8211; Algorithm type.
    Also control output data type.
    All possible values are listed as class
    attributes of this class, e.g. TEST, DEFAULT, SOBOL32,
    SCRAMBLED_SOBOL32, SOBOL64, SCRAMABLED_SOBOL64.</li>
    <li><strong>ndim</strong> &#8211; Number of dimension for the QRNG.</li>
    <li><strong>offset</strong> &#8211; Offset to the random number stream.</li>
    <li><strong>stream</strong> &#8211; CUDA stream.</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    <dl class="method">
    <dt id="numbapro.cudalib.curand.QRNG.generate">
    <code class="descname">generate</code><span class="sig-paren">(</span><em>ary</em>, <em>size=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.QRNG.generate" title="Permalink to this definition">¶</a></dt>
    <dd><p>Generate quasi random number in ary.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>ary</strong> &#8211; Numpy array or cuda device array.</li>
    <li><strong>size</strong> &#8211; Number of samples;
    Default to array size.  Must be multiple of ndim.</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="attribute">
    <dt id="numbapro.cudalib.curand.QRNG.ndim">
    <code class="descname">ndim</code><a class="headerlink" href="#numbapro.cudalib.curand.QRNG.ndim" title="Permalink to this definition">¶</a></dt>
    <dd><p>Mutatable attribute for number of dimension for the QRNG.</p>
    </dd></dl>

    <dl class="attribute">
    <dt id="numbapro.cudalib.curand.QRNG.stream">
    <code class="descname">stream</code><a class="headerlink" href="#numbapro.cudalib.curand.QRNG.stream" title="Permalink to this definition">¶</a></dt>
    <dd><p>Associate a CUDA stream to the generator object.
    All subsequent calls will use this stream.</p>
    </dd></dl>

    </dd></dl>

    </div>
    <div class="section" id="top-level-prng-functions">
    <h3>Top Level PRNG Functions<a class="headerlink" href="#top-level-prng-functions" title="Permalink to this headline">¶</a></h3>
    <p>Simple interface to the PRNG methods.</p>
    <div class="admonition note">
    <p class="first admonition-title">Note</p>
    <p class="last">This methods automatically create a PRNG object.</p>
    </div>
    <dl class="function">
    <dt id="numbapro.cudalib.curand.uniform">
    <code class="descclassname">numbapro.cudalib.curand.</code><code class="descname">uniform</code><span class="sig-paren">(</span><em>size</em>, <em>dtype=&lt;type 'float'&gt;</em>, <em>device=False</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.uniform" title="Permalink to this definition">¶</a></dt>
    <dd><p>Generate floating point random number sampled
    from a uniform distribution</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>size</strong> &#8211; Number of samples.</li>
    <li><strong>dtype</strong> &#8211; np.float32 or np.float64.</li>
    <li><strong>device</strong> &#8211; Set to True to return a device array instead or numpy array.</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy array or a device array.</p>
    </td>
    </tr>
    </tbody>
    </table>
    <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">accelerate.cuda</span> <span class="kn">import</span> <span class="n">rand</span>
    <span class="gp">&gt;&gt;&gt; </span><span class="n">rand</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="n">size</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
    <span class="go">array([...])</span>
    </pre></div>
    </div>
    <div class="admonition seealso">
    <p class="first admonition-title">See also</p>
    <p class="last"><a class="reference internal" href="../accelerate/curand.html#accelerate.cuda.rand.PRNG.uniform" title="accelerate.cuda.rand.PRNG.uniform"><code class="xref py py-meth docutils literal"><span class="pre">accelerate.cuda.rand.PRNG.uniform()</span></code></a></p>
    </div>
    </dd></dl>

    <dl class="function">
    <dt id="numbapro.cudalib.curand.normal">
    <code class="descclassname">numbapro.cudalib.curand.</code><code class="descname">normal</code><span class="sig-paren">(</span><em>mean</em>, <em>sigma</em>, <em>size</em>, <em>dtype=&lt;type 'float'&gt;</em>, <em>device=False</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.normal" title="Permalink to this definition">¶</a></dt>
    <dd><p>Generate floating point random number sampled
    from a normal distribution</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>mean</strong> &#8211; Center point of the distribution.</li>
    <li><strong>sigma</strong> &#8211; Standard deviation of the distribution.</li>
    <li><strong>size</strong> &#8211; &#8212; Number of samples.</li>
    <li><strong>dtype</strong> &#8211; np.float32 or np.float64.</li>
    <li><strong>device</strong> &#8211; Set to True to return a device array instead or ndarray.</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy array or a device array.</p>
    </td>
    </tr>
    </tbody>
    </table>
    <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">accelerate.cuda</span> <span class="kn">import</span> <span class="n">rand</span>
    <span class="gp">&gt;&gt;&gt; </span><span class="n">rand</span><span class="o">.</span><span class="n">normal</span><span class="p">(</span><span class="n">mean</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">sigma</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
    <span class="go">array([...])</span>
    </pre></div>
    </div>
    <div class="admonition seealso">
    <p class="first admonition-title">See also</p>
    <p class="last"><a class="reference internal" href="../accelerate/curand.html#accelerate.cuda.rand.PRNG.normal" title="accelerate.cuda.rand.PRNG.normal"><code class="xref py py-meth docutils literal"><span class="pre">accelerate.cuda.rand.PRNG.normal()</span></code></a></p>
    </div>
    </dd></dl>

    <dl class="function">
    <dt id="numbapro.cudalib.curand.lognormal">
    <code class="descclassname">numbapro.cudalib.curand.</code><code class="descname">lognormal</code><span class="sig-paren">(</span><em>mean</em>, <em>sigma</em>, <em>size</em>, <em>dtype=&lt;type 'float'&gt;</em>, <em>device=False</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.lognormal" title="Permalink to this definition">¶</a></dt>
    <dd><p>Generate floating point random number sampled
    from a log-normal distribution.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>mean</strong> &#8211; Center point of the distribution.</li>
    <li><strong>sigma</strong> &#8211; Standard deviation of the distribution.</li>
    <li><strong>size</strong> &#8211; Number of samples.</li>
    <li><strong>dtype</strong> &#8211; np.float32 or np.float64.</li>
    <li><strong>device</strong> &#8211; set to True to return a device array instead or ndarray.</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy array or a device array.</p>
    </td>
    </tr>
    </tbody>
    </table>
    <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">accelerate.cuda</span> <span class="kn">import</span> <span class="n">rand</span>
    <span class="gp">&gt;&gt;&gt; </span><span class="n">rand</span><span class="o">.</span><span class="n">lognormal</span><span class="p">(</span><span class="n">mean</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">sigma</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
    <span class="go">array([...])</span>
    </pre></div>
    </div>
    <div class="admonition seealso">
    <p class="first admonition-title">See also</p>
    <p class="last"><a class="reference internal" href="../accelerate/curand.html#accelerate.cuda.rand.PRNG.lognormal" title="accelerate.cuda.rand.PRNG.lognormal"><code class="xref py py-meth docutils literal"><span class="pre">accelerate.cuda.rand.PRNG.lognormal()</span></code></a></p>
    </div>
    </dd></dl>

    <dl class="function">
    <dt id="numbapro.cudalib.curand.poisson">
    <code class="descclassname">numbapro.cudalib.curand.</code><code class="descname">poisson</code><span class="sig-paren">(</span><em>lmbd</em>, <em>size</em>, <em>device=False</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.poisson" title="Permalink to this definition">¶</a></dt>
    <dd><p>Generate int32 random number sampled
    from a poisson distribution.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>lmbda</strong> &#8211; Lambda of the distribution.</li>
    <li><strong>size</strong> &#8211; Number of samples</li>
    <li><strong>device</strong> &#8211; Set to True to return a device array instead or ndarray.</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy array or a device array.</p>
    </td>
    </tr>
    </tbody>
    </table>
    <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">accelerate.cuda</span> <span class="kn">import</span> <span class="n">rand</span>
    <span class="gp">&gt;&gt;&gt; </span><span class="n">rand</span><span class="o">.</span><span class="n">poisson</span><span class="p">(</span><span class="n">lmbd</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
    <span class="go">array([...], dtype=uint32)</span>
    </pre></div>
    </div>
    <div class="admonition seealso">
    <p class="first admonition-title">See also</p>
    <p class="last"><a class="reference internal" href="../accelerate/curand.html#accelerate.cuda.rand.PRNG.poisson" title="accelerate.cuda.rand.PRNG.poisson"><code class="xref py py-meth docutils literal"><span class="pre">accelerate.cuda.rand.PRNG.poisson()</span></code></a></p>
    </div>
    </dd></dl>

    </div>
    <div class="section" id="top-level-qrng-functions">
    <h3>Top Level QRNG Functions<a class="headerlink" href="#top-level-qrng-functions" title="Permalink to this headline">¶</a></h3>
    <p>Simple interface to the QRNG methods.</p>
    <div class="admonition note">
    <p class="first admonition-title">Note</p>
    <p class="last">This methods automatically create a QRNG object.</p>
    </div>
    <dl class="function">
    <dt id="numbapro.cudalib.curand.quasi">
    <code class="descclassname">numbapro.cudalib.curand.</code><code class="descname">quasi</code><span class="sig-paren">(</span><em>size</em>, <em>bits=32</em>, <em>nd=1</em>, <em>device=False</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.curand.quasi" title="Permalink to this definition">¶</a></dt>
    <dd><p>Generate quasi random number using SOBOL{bits} RNG type.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>size</strong> &#8211; Number of samples.</li>
    <li><strong>bits</strong> &#8211; Bit length of output element; e.g. 32 or 64.</li>
    <li><strong>nd</strong> &#8211; Number of dimension .</li>
    <li><strong>device</strong> &#8211; Set to True to return a device array instead or ndarray.</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A numpy array or a device array.</p>
    </td>
    </tr>
    </tbody>
    </table>
    <div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">accelerate.cuda</span> <span class="kn">import</span> <span class="n">rand</span>
    <span class="gp">&gt;&gt;&gt; </span><span class="n">rand</span><span class="o">.</span><span class="n">quasi</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
    <span class="go">array([...], dtype=uint32)</span>
    </pre></div>
    </div>
    <div class="admonition seealso">
    <p class="first admonition-title">See also</p>
    <p class="last"><a class="reference internal" href="../accelerate/curand.html#accelerate.cuda.rand.QRNG.generate" title="accelerate.cuda.rand.QRNG.generate"><code class="xref py py-meth docutils literal"><span class="pre">accelerate.cuda.rand.QRNG.generate()</span></code></a></p>
    </div>
    </dd></dl>

    </div>
    </div>
    <div class="section" id="cufft">
    <h2>cuFFT<a class="headerlink" href="#cufft" title="Permalink to this headline">¶</a></h2>
    <p>Provides FFT and inverse FFT for 1D, 2D and 3D arrays.
    See <a class="reference external" href="http://docs.nvidia.com/cuda/cufft/index.html">NVIDIA cuFFT</a>.</p>
    <div class="admonition note">
    <p class="first admonition-title">Note</p>
    <p class="last">cuFFT only supports FFT operations on numpy.float32, numpy float64,
    numpy.complex64, numpy.complex128 with C-contiguous datalayout.</p>
    </div>
    <div class="section" id="forward-fft">
    <h3>Forward FFT<a class="headerlink" href="#forward-fft" title="Permalink to this headline">¶</a></h3>
    <dl class="function">
    <dt id="numbapro.cudalib.cufft.fft">
    <code class="descclassname">numbapro.cudalib.cufft.</code><code class="descname">fft</code><span class="sig-paren">(</span><em>ary</em>, <em>out</em><span class="optional">[</span>, <em>stream</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cufft.fft" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="function">
    <dt id="numbapro.cudalib.cufft.fft_inplace">
    <code class="descclassname">numbapro.cudalib.cufft.</code><code class="descname">fft_inplace</code><span class="sig-paren">(</span><em>ary</em><span class="optional">[</span>, <em>stream</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cufft.fft_inplace" title="Permalink to this definition">¶</a></dt>
    <dd><table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>ary</strong> &#8211; The input array. The inplace version stores the result in here.</li>
    <li><strong>out</strong> &#8211; The output array for non-inplace versions.</li>
    <li><strong>stream</strong> &#8211; The CUDA stream in which all operations will take place.</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    </div>
    <div class="section" id="inverse-fft">
    <h3>Inverse FFT<a class="headerlink" href="#inverse-fft" title="Permalink to this headline">¶</a></h3>
    <dl class="function">
    <dt id="numbapro.cudalib.cufft.ifft">
    <code class="descclassname">numbapro.cudalib.cufft.</code><code class="descname">ifft</code><span class="sig-paren">(</span><em>ary</em>, <em>out</em><span class="optional">[</span>, <em>stream</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cufft.ifft" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="function">
    <dt id="numbapro.cudalib.cufft.ifft_inplace">
    <code class="descclassname">numbapro.cudalib.cufft.</code><code class="descname">ifft_inplace</code><span class="sig-paren">(</span><em>ary</em><span class="optional">[</span>, <em>stream</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cufft.ifft_inplace" title="Permalink to this definition">¶</a></dt>
    <dd><table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>ary</strong> &#8211; The input array. The inplace version stores the result in here.</li>
    <li><strong>out</strong> &#8211; The output array for non-inplace versions.</li>
    <li><strong>stream</strong> &#8211; The CUDA stream in which all operations will take place.</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    </div>
    <div class="section" id="fftplan">
    <h3>FFTPlan<a class="headerlink" href="#fftplan" title="Permalink to this headline">¶</a></h3>
    <dl class="class">
    <dt id="numbapro.cudalib.cufft.FFTPlan">
    <em class="property">class </em><code class="descclassname">numbapro.cudalib.cufft.</code><code class="descname">FFTPlan</code><span class="sig-paren">(</span><em>*args</em>, <em>**kws</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cufft.FFTPlan" title="Permalink to this definition">¶</a></dt>
    <dd><table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>shape</strong> &#8211; Input array shape.</li>
    <li><strong>itype</strong> &#8211; Input data type.</li>
    <li><strong>otype</strong> &#8211; Output data type.</li>
    <li><strong>batch</strong> &#8211; Maximum number of operation to perform.</li>
    <li><strong>stream</strong> &#8211; A CUDA stream for all the operations to put on.</li>
    <li><strong>mode</strong> &#8211; Operation mode; e.g. MODE_NATIVE, MODE_FFTW_PADDING,
    MODE_FFTW_ASYMMETRIC, MODE_FFTW_ALL, MODE_DEFAULT.</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    <dl class="method">
    <dt id="numbapro.cudalib.cufft.FFTPlan.forward">
    <code class="descname">forward</code><span class="sig-paren">(</span><em>ary</em>, <em>out=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cufft.FFTPlan.forward" title="Permalink to this definition">¶</a></dt>
    <dd><p>Perform forward FFT</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>ary</strong> &#8211; Input array</li>
    <li><strong>out</strong> &#8211; Optional output array</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">The output array or a new numpy array is <cite>out</cite> is None.</p>
    </td>
    </tr>
    </tbody>
    </table>
    <div class="admonition note">
    <p class="first admonition-title">Note</p>
    <p class="last">If <cite>ary</cite> is <cite>out</cite>, an inplace operation is performed.</p>
    </div>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cufft.FFTPlan.inverse">
    <code class="descname">inverse</code><span class="sig-paren">(</span><em>ary</em>, <em>out=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cufft.FFTPlan.inverse" title="Permalink to this definition">¶</a></dt>
    <dd><p>Perform inverse FFT</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>ary</strong> &#8211; Input array</li>
    <li><strong>out</strong> &#8211; Optional output array</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">The output array or a new numpy array is <cite>out</cite> is None.</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    </dd></dl>

    </div>
    </div>
    <div class="section" id="cublas">
    <h2>cuBLAS<a class="headerlink" href="#cublas" title="Permalink to this headline">¶</a></h2>
    <p>Provides basic linear algebra building blocks that operates on the CUDA device.
    See <a class="reference external" href="http://docs.nvidia.com/cuda/cublas/index.html">NVIDIA cuBLAS</a>.</p>
    <p>The cuBlas binding provides a simpler interface to use NumPy arrays and device
    arrays.  We don&#8217;t need special naming convention to identify the array types.
    Type information are inferred from the given arguments.
    Arguments for array storage information in cuBLAS C-API are not
    necessary since NumPy arrays and device arrays already contain the information.
    Whenever an array is required in an argument, user can pass in NumPy arrays
    or device arrays.  The binding will automatically transfer any NumPy arrays
    to the device as needed.</p>
    <dl class="class">
    <dt id="numbapro.cudalib.cublas.Blas">
    <em class="property">class </em><code class="descclassname">numbapro.cudalib.cublas.</code><code class="descname">Blas</code><span class="sig-paren">(</span><em>*args</em>, <em>**kws</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas" title="Permalink to this definition">¶</a></dt>
    <dd><dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.amax">
    <code class="descname">amax</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.amax" title="Permalink to this definition">¶</a></dt>
    <dd><p>Same as np.argmax(x)</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.amin">
    <code class="descname">amin</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.amin" title="Permalink to this definition">¶</a></dt>
    <dd><p>Same as np.argmin(x)</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.asum">
    <code class="descname">asum</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.asum" title="Permalink to this definition">¶</a></dt>
    <dd><p>Same as np.sum(x)</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.axpy">
    <code class="descname">axpy</code><span class="sig-paren">(</span><em>alpha</em>, <em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.axpy" title="Permalink to this definition">¶</a></dt>
    <dd><p>Same as y = alpha * x + y</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.dgmm">
    <code class="descname">dgmm</code><span class="sig-paren">(</span><em>side</em>, <em>m</em>, <em>n</em>, <em>A:r</em>, <em>x:r</em>, <em>C:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.dgmm" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.dot">
    <code class="descname">dot</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.dot" title="Permalink to this definition">¶</a></dt>
    <dd><p>Compute and return the vector dot product of x and y.</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.dotc">
    <code class="descname">dotc</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.dotc" title="Permalink to this definition">¶</a></dt>
    <dd><p>Same as np.vdot</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.gbmv">
    <code class="descname">gbmv</code><span class="sig-paren">(</span><em>trans</em>, <em>m</em>, <em>n</em>, <em>kl</em>, <em>ku</em>, <em>alpha</em>, <em>A:r</em>, <em>x:r</em>, <em>beta</em>, <em>y:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.gbmv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.geam">
    <code class="descname">geam</code><span class="sig-paren">(</span><em>transa</em>, <em>transb</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A:r</em>, <em>beta</em>, <em>B:r</em>, <em>C:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.geam" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.gemm">
    <code class="descname">gemm</code><span class="sig-paren">(</span><em>transa</em>, <em>transb</em>, <em>m</em>, <em>n</em>, <em>k</em>, <em>alpha</em>, <em>A:r</em>, <em>B:r</em>, <em>beta</em>, <em>C:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.gemm" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.gemv">
    <code class="descname">gemv</code><span class="sig-paren">(</span><em>trans</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A:r</em>, <em>x:r</em>, <em>beta</em>, <em>y:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.gemv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.ger">
    <code class="descname">ger</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>alpha</em>, <em>x:r</em>, <em>y:r</em>, <em>A:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.ger" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.gerc">
    <code class="descname">gerc</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>alpha</em>, <em>x:r</em>, <em>y:r</em>, <em>A:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.gerc" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.geru">
    <code class="descname">geru</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>alpha</em>, <em>x:r</em>, <em>y:r</em>, <em>A:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.geru" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.hbmv">
    <code class="descname">hbmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>k</em>, <em>alpha</em>, <em>A:r</em>, <em>x:r</em>, <em>beta</em>, <em>y:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.hbmv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.hemm">
    <code class="descname">hemm</code><span class="sig-paren">(</span><em>side</em>, <em>uplo</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A:r</em>, <em>B:r</em>, <em>beta</em>, <em>C:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.hemm" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.hemv">
    <code class="descname">hemv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>A:r</em>, <em>x:r</em>, <em>beta</em>, <em>y:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.hemv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.her">
    <code class="descname">her</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x:r</em>, <em>A:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.her" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.her2">
    <code class="descname">her2</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x:r</em>, <em>y:r</em>, <em>A:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.her2" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.herk">
    <code class="descname">herk</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>n</em>, <em>k</em>, <em>alpha</em>, <em>A:r</em>, <em>beta</em>, <em>C:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.herk" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.hpmv">
    <code class="descname">hpmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>AP:r</em>, <em>x:r</em>, <em>beta</em>, <em>y:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.hpmv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.hpr">
    <code class="descname">hpr</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x:r</em>, <em>AP:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.hpr" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.hpr2">
    <code class="descname">hpr2</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x:r</em>, <em>y:r</em>, <em>A:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.hpr2" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.nrm2">
    <code class="descname">nrm2</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.nrm2" title="Permalink to this definition">¶</a></dt>
    <dd><p>Same as np.linalg.norm</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.rot">
    <code class="descname">rot</code><span class="sig-paren">(</span><em>x</em>, <em>y</em>, <em>c</em>, <em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.rot" title="Permalink to this definition">¶</a></dt>
    <dd><p>Same as x, y = c * x + s * y, -s * x + c * y</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.rotg">
    <code class="descname">rotg</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.rotg" title="Permalink to this definition">¶</a></dt>
    <dd><p>Compute the given rotation matrix given a column vector (a, b).
    Returns r, z, c, s.</p>
    <p>r: r = a ** 2 + b ** 2.</p>
    <p>z: Use to recover c and s.</p>
    <dl class="docutils">
    <dt>if abs(z) &lt; 1:</dt>
    <dd>c, s = 1 - z ** 2, z</dd>
    <dt>elif abs(z) == 1:</dt>
    <dd>c, s = 0, 1</dd>
    <dt>else:</dt>
    <dd>c, s = 1 / z, 1 - z ** 2</dd>
    </dl>
    <p>c: Cosine element of the rotation matrix.</p>
    <p>s: Sine element of the rotation matrix.</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.rotm">
    <code class="descname">rotm</code><span class="sig-paren">(</span><em>x</em>, <em>y</em>, <em>param</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.rotm" title="Permalink to this definition">¶</a></dt>
    <dd><p>Applies the modified Givens transformation.</p>
    <p>x, y = h11 * x + h12 * y, h21 * x + h22 * y</p>
    <p>param &#8212; [flag, h11, h21, h12, h22]</p>
    <p>Refer to cuBLAS documentation for detail.</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.rotmg">
    <code class="descname">rotmg</code><span class="sig-paren">(</span><em>d1</em>, <em>d2</em>, <em>x1</em>, <em>y1</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.rotmg" title="Permalink to this definition">¶</a></dt>
    <dd><p>Constructs the modified Givens transformation.</p>
    <p>Returns param that is usable in rotm.</p>
    <p>Refer to cuBLAS documentation for detail.</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.sbmv">
    <code class="descname">sbmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>k</em>, <em>alpha</em>, <em>A:r</em>, <em>x:r</em>, <em>beta</em>, <em>y:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.sbmv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.scal">
    <code class="descname">scal</code><span class="sig-paren">(</span><em>alpha</em>, <em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.scal" title="Permalink to this definition">¶</a></dt>
    <dd><p>Same as x = alpha * x</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.spmv">
    <code class="descname">spmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>AP:r</em>, <em>x:r</em>, <em>beta</em>, <em>y:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.spmv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.spr">
    <code class="descname">spr</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x:r</em>, <em>AP:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.spr" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.spr2">
    <code class="descname">spr2</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x:r</em>, <em>y:r</em>, <em>A:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.spr2" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.symm">
    <code class="descname">symm</code><span class="sig-paren">(</span><em>side</em>, <em>uplo</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A:r</em>, <em>B:r</em>, <em>beta</em>, <em>C:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.symm" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.symv">
    <code class="descname">symv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>A:r</em>, <em>x:r</em>, <em>beta</em>, <em>y:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.symv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.syr">
    <code class="descname">syr</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x:r</em>, <em>A:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.syr" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.syr2">
    <code class="descname">syr2</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x:r</em>, <em>y:r</em>, <em>A:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.syr2" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.syrk">
    <code class="descname">syrk</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>n</em>, <em>k</em>, <em>alpha</em>, <em>A:r</em>, <em>beta</em>, <em>C:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.syrk" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.tbmv">
    <code class="descname">tbmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>k</em>, <em>A:r</em>, <em>x:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.tbmv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.tbsv">
    <code class="descname">tbsv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>k</em>, <em>A:r</em>, <em>x:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.tbsv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.tpmv">
    <code class="descname">tpmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>AP:r</em>, <em>x:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.tpmv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.tpsv">
    <code class="descname">tpsv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>AP:r</em>, <em>x:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.tpsv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.trmm">
    <code class="descname">trmm</code><span class="sig-paren">(</span><em>side</em>, <em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A:r</em>, <em>B:r</em>, <em>C:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.trmm" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.trmv">
    <code class="descname">trmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>A:r</em>, <em>x:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.trmv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.trsm">
    <code class="descname">trsm</code><span class="sig-paren">(</span><em>side</em>, <em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A:r</em>, <em>B:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.trsm" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.trsv">
    <code class="descname">trsv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>A:r</em>, <em>x:w</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.trsv" title="Permalink to this definition">¶</a></dt>
    <dd></dd></dl>

    </dd></dl>

    <div class="section" id="blas-level-1">
    <h3>BLAS Level 1<a class="headerlink" href="#blas-level-1" title="Permalink to this headline">¶</a></h3>
    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">nrm2</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>Computes the L2 norm for array <cite>x</cite>. Same as <cite>numpy.linalg.norm(x)</cite>.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> (<em>array</em>) &#8211; input vector</td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">resulting norm.</td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">dot</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>Compute the dot product of array <cite>x</cite> and array <cite>y</cite>.  Same as <cite>np.dot(x, y)</cite>.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>x</strong> (<em>array</em>) &#8211; vector</li>
    <li><strong>y</strong> (<em>array</em>) &#8211; vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">dot product of <cite>x</cite> and <cite>y</cite></p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cublas.Blas.dotu">
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">dotu</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cublas.Blas.dotu" title="Permalink to this definition">¶</a></dt>
    <dd><div class="deprecated">
    <p><span class="versionmodified">Deprecated since version 0.21.0: </span>Use <a class="reference internal" href="#numbapro.cudalib.cublas.Blas.dot" title="numbapro.cudalib.cublas.Blas.dot"><code class="xref py py-meth docutils literal"><span class="pre">dot()</span></code></a> instead.</p>
    </div>
    <p>Compute the dot product of array <cite>x</cite> and array <cite>y</cite> for complex dtype only.
    Same as <cite>np.dot(x, y)</cite>.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>x</strong> (<em>array</em>) &#8211; vector</li>
    <li><strong>y</strong> (<em>array</em>) &#8211; vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">dot product of <cite>x</cite> and <cite>y</cite></p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">dotc</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>Uses the conjugate of the element of the vectors to compute the dot product
    of array <cite>x</cite> and array <cite>y</cite> for complex dtype only.  Same as <cite>np.vdot(x, y)</cite>.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>x</strong> (<em>array</em>) &#8211; vector</li>
    <li><strong>y</strong> (<em>array</em>) &#8211; vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">dot product of <cite>x</cite> and <cite>y</cite></p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">scal</code><span class="sig-paren">(</span><em>alpha</em>, <em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>Scale <cite>x</cite> inplace by alpha.  Same as <cite>x = alpha * x</cite></p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>alpha</strong> &#8211; scalar</li>
    <li><strong>x</strong> (<em>array</em>) &#8211; vector</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">axpy</code><span class="sig-paren">(</span><em>alpha</em>, <em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>Compute <cite>y = alpha * x + y</cite> inplace.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>alpha</strong> &#8211; scalar</li>
    <li><strong>x</strong> (<em>array</em>) &#8211; vector</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">amax</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>Find the index of the first largest element in array <cite>x</cite>.
    Same as <cite>np.argmax(x)</cite></p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> (<em>array</em>) &#8211; vector</td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">index (start from 0).</td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">amin</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>Find the index of the first largest element in array <cite>x</cite>.
    Same as <cite>np.argmin(x)</cite></p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> (<em>array</em>) &#8211; vector</td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">index (start from 0).</td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">asum</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>Compute the sum of all element in array <cite>x</cite>.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> (<em>array</em>) &#8211; vector</td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><cite>x.sum()</cite></td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">rot</code><span class="sig-paren">(</span><em>x</em>, <em>y</em>, <em>c</em>, <em>s</em><span class="sig-paren">)</span></dt>
    <dd><p>Apply the Givens rotation matrix specified by the cosine element <cite>c</cite> and the
    sine element <cite>s</cite> inplace on vector element <cite>x</cite> and <cite>y</cite>.</p>
    <p>Same as <cite>x, y = c * x + s * y, -s * x + c * y</cite></p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>x</strong> (<em>array</em>) &#8211; vector</li>
    <li><strong>y</strong> (<em>array</em>) &#8211; vector</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">rotg</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span></dt>
    <dd><p>Constructs the Givens rotation matrix with the column vector (a, b).</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>a</strong> (<em>scalar</em>) &#8211; first element of the column vector</li>
    <li><strong>b</strong> (<em>scalar</em>) &#8211; second element of the column vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><p>a tuple (r, z, c, s)</p>
    <p>r &#8211; <cite>r = a**2 + b**2</cite></p>
    <dl class="docutils">
    <dt>z &#8211; Use to reconstruct <cite>c</cite> and <cite>s</cite>.</dt>
    <dd><p class="first last">Refer to cuBLAS documentation for detail.</p>
    </dd>
    </dl>
    <p>c &#8211; The consine element.</p>
    <p>s &#8211; The sine element.</p>
    </p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">rotm</code><span class="sig-paren">(</span><em>x</em>, <em>y</em>, <em>param</em><span class="sig-paren">)</span></dt>
    <dd><p>Applies the modified Givens transformation inplace.</p>
    <p>Same as:</p>
    <div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">param</span> <span class="o">=</span> <span class="n">flag</span><span class="p">,</span> <span class="n">h11</span><span class="p">,</span> <span class="n">h21</span><span class="p">,</span> <span class="n">h12</span><span class="p">,</span> <span class="n">h22</span>
    <span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">h11</span> <span class="o">*</span> <span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="n">h12</span> <span class="o">*</span> <span class="n">y</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
    <span class="n">y</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">h21</span> <span class="o">*</span> <span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="n">h22</span> <span class="o">*</span> <span class="n">y</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
    </pre></div>
    </div>
    <p>Refer to the cuBLAS documentation for the use of <cite>flag</cite>.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>x</strong> (<em>array</em>) &#8211; vector</li>
    <li><strong>y</strong> (<em>array</em>) &#8211; vector</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">rotmg</code><span class="sig-paren">(</span><em>d1</em>, <em>d2</em>, <em>x1</em>, <em>y1</em><span class="sig-paren">)</span></dt>
    <dd><p>Constructs the modified Givens transformation <cite>H</cite> that zeros out the second
    entry of a column vector <cite>(d1 * x1, d2 * y1)</cite>.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>d1</strong> (<em>scalar</em>) &#8211; </li>
    <li><strong>d2</strong> (<em>scalar</em>) &#8211; </li>
    <li><strong>x1</strong> (<em>scalar</em>) &#8211; </li>
    <li><strong>y1</strong> (<em>scalar</em>) &#8211; </li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A 1D array that is usable in <cite>rotm</cite>.
    The first element is the flag for <cite>rotm</cite>.
    The rest of the elements corresponds to the <cite>h11, h21, h12, h22</cite>
    elements of <cite>H</cite>.</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    </div>
    <div class="section" id="blas-level-2">
    <h3>BLAS Level 2<a class="headerlink" href="#blas-level-2" title="Permalink to this headline">¶</a></h3>
    <p>All level 2 routines follow the following naming convention for all arguments:</p>
    <ul>
    <li><dl class="first docutils">
    <dt>A, B, C, AP &#8211; (2D array) Matrix argument.</dt>
    <dd><p class="first last"><cite>AP</cite> implies packed storage for banded matrix.</p>
    </dd>
    </dl>
    </li>
    <li><p class="first">x, y, z &#8211; (1D arrays)  Vector argument.</p>
    </li>
    <li><p class="first">alpha, beta &#8211; (scalar) Can be floats or complex numbers depending.</p>
    </li>
    <li><p class="first">m &#8211; (scalar)  Number of rows of matrix <cite>A</cite>.</p>
    </li>
    <li><dl class="first docutils">
    <dt>n &#8211; (scalar)  Number of columns of matrix <cite>A</cite>.  If <cite>m</cite> is not needed,</dt>
    <dd><p class="first last"><cite>n</cite> also means the number of rows of the matrix <cite>A</cite>; thus,
    implying a square matrix.</p>
    </dd>
    </dl>
    </li>
    <li><dl class="first docutils">
    <dt>trans, transa, transb &#8211; (string)</dt>
    <dd><p class="first last">&#8216;N&#8217; means the non-transpose operation is selected;
    &#8216;T&#8217; means the transpose operation is selected;
    &#8216;C&#8217; means the conjugate transpose operation is selected.
    <cite>trans</cite> only applies to the only matrix argument.
    <cite>transa</cite> and <cite>transb</cite> apply to matrix <cite>A</cite> and matrix <cite>B</cite>,
    respectively.</p>
    </dd>
    </dl>
    </li>
    <li><dl class="first docutils">
    <dt>uplo &#8211; (string) Can be &#8216;U&#8217; for filling the upper trianglar matrix; or &#8216;L&#8217; for</dt>
    <dd><p class="first last">filling the lower trianglar matrix.</p>
    </dd>
    </dl>
    </li>
    <li><p class="first">diag &#8211; (boolean)  Whether the matrix diagonal has unit elements.</p>
    </li>
    <li><p class="first">trans &#8211; CUBLAS_OP_MAP</p>
    </li>
    <li><dl class="first docutils">
    <dt>mode &#8211; (string) &#8216;L&#8217; means the matrix is on the left side in the equation.</dt>
    <dd><p class="first last">&#8216;R&#8217; means the matrix is on the right side in the equation.</p>
    </dd>
    </dl>
    </li>
    </ul>
    <div class="admonition note">
    <p class="first admonition-title">Note</p>
    <p class="last">The last array argument is always overwritten with the result.</p>
    </div>
    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">gbmv</code><span class="sig-paren">(</span><em>trans</em>, <em>m</em>, <em>n</em>, <em>kl</em>, <em>ku</em>, <em>alpha</em>, <em>A</em>, <em>x</em>, <em>beta</em>, <em>y'</em><span class="sig-paren">)</span></dt>
    <dd><p>banded matrix-vector multiplication <cite>y = alpha * op(A) * x + beta * y</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">gemv</code><span class="sig-paren">(</span><em>trans</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A</em>, <em>x</em>, <em>beta</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>matrix-vector multiplication <cite>y = alpha * op(A) * x + beta * y</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">trmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>A</em>, <em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>triangular matrix-vector multiplication <cite>x = op(A) * x</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">tbmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>k</em>, <em>A</em>, <em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>triangular banded matrix-vector <cite>x = op(A) * x</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">tpmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>AP</em>, <em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>triangular packed matrix-vector multiplication <cite>x = op(A) * x</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">trsv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>A</em>, <em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>Solves the triangular linear system with a single right-hand-side.
    <cite>op(A) * x = b</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">tpsv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>AP</em>, <em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>Solves the packed triangular linear system with a single right-hand-side.
    <cite>op(A) * x = b</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">tbsv</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>n</em>, <em>k</em>, <em>A</em>, <em>x</em><span class="sig-paren">)</span></dt>
    <dd><p>Solves the triangular banded linear system with a single right-hand-side.
    <cite>op(A) * x = b</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">symv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>A</em>, <em>x</em>, <em>beta</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>symmetric matrix-vector multiplication <cite>y = alpha * A * x + beta * y</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">hemv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>A</em>, <em>x</em>, <em>beta</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>Hermitian matrix-vector multiplication <cite>y = alpha * A * x + beta * y</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">sbmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>k</em>, <em>alpha</em>, <em>A</em>, <em>x</em>, <em>beta</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>symmetric banded matrix-vector multiplication  <cite>y = alpha * A * x + beta * y</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">hbmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>k</em>, <em>alpha</em>, <em>A</em>, <em>x</em>, <em>beta</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>Hermitian banded matrix-vector multiplication  <cite>y = alpha * A * x + beta * y</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">spmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>AP</em>, <em>x</em>, <em>beta</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>symmetric packed matrix-vector multiplication <cite>y = alpha * A * x + beta * y</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">hpmv</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>AP</em>, <em>x</em>, <em>beta</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>Hermitian packed matrix-vector multiplication <cite>y = alpha * A * x + beta * y</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">ger</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>alpha</em>, <em>x</em>, <em>y</em>, <em>A</em><span class="sig-paren">)</span></dt>
    <dd><p>the rank-1 update <cite>A := alpha * x * y ** T + A</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">geru</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>alpha</em>, <em>x</em>, <em>y</em>, <em>A</em><span class="sig-paren">)</span></dt>
    <dd><p>the rank-1 update <cite>A := alpha * x * y ** T + A</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">gerc</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>alpha</em>, <em>x</em>, <em>y</em>, <em>A</em><span class="sig-paren">)</span></dt>
    <dd><p>the rank-1 update <cite>A := alpha * x * y ** H + A</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">syr</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x</em>, <em>A</em><span class="sig-paren">)</span></dt>
    <dd><p>symmetric rank 1 operation <cite>A := alpha * x * x ** T + A</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">her</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x</em>, <em>A</em><span class="sig-paren">)</span></dt>
    <dd><p>hermitian rank 1 operation  <cite>A := alpha * x * x ** H + A</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">spr</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x</em>, <em>AP</em><span class="sig-paren">)</span></dt>
    <dd><p>the symmetric rank 1 operation <cite>A := alpha * x * x ** T + A</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">hpr</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x</em>, <em>AP</em><span class="sig-paren">)</span></dt>
    <dd><p>hermitian rank 1 operation <cite>A := alpha * x * x ** H + A</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">syr2</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x</em>, <em>y</em>, <em>A</em><span class="sig-paren">)</span></dt>
    <dd><p>symmetric rank-2 update <cite>A = alpha * x * y ** T + y * x ** T + A</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">her2</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x</em>, <em>y</em>, <em>A</em><span class="sig-paren">)</span></dt>
    <dd><p>Hermitian rank-2 update <cite>A = alpha * x * y ** H + alpha * y * x ** H + A</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">spr2</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x</em>, <em>y</em>, <em>A</em><span class="sig-paren">)</span></dt>
    <dd><p>packed symmetric rank-2 update <cite>A = alpha * x * y ** T + y * x ** T + A</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">hpr2</code><span class="sig-paren">(</span><em>uplo</em>, <em>n</em>, <em>alpha</em>, <em>x</em>, <em>y</em>, <em>A</em><span class="sig-paren">)</span></dt>
    <dd><p>packed Hermitian rank-2 update <cite>A = alpha * x * y ** H + alpha * y * x ** H + A</cite></p>
    </dd></dl>

    </div>
    <div class="section" id="blas-level-3">
    <h3>BLAS Level 3<a class="headerlink" href="#blas-level-3" title="Permalink to this headline">¶</a></h3>
    <p>All level 3 routines follow the same naming convention for arguments as in
    level 2 routines.</p>
    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">gemm</code><span class="sig-paren">(</span><em>transa</em>, <em>transb</em>, <em>m</em>, <em>n</em>, <em>k</em>, <em>alpha</em>, <em>A</em>, <em>B</em>, <em>beta</em>, <em>C</em><span class="sig-paren">)</span></dt>
    <dd><p>matrix-matrix multiplication <cite>C = alpha * op(A) * op(B) + beta * C</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">syrk</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>n</em>, <em>k</em>, <em>alpha</em>, <em>A</em>, <em>beta</em>, <em>C</em><span class="sig-paren">)</span></dt>
    <dd><p>symmetric rank- k update <cite>C = alpha * op(A) * op(A) ** T + beta * C</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">herk</code><span class="sig-paren">(</span><em>uplo</em>, <em>trans</em>, <em>n</em>, <em>k</em>, <em>alpha</em>, <em>A</em>, <em>beta</em>, <em>C</em><span class="sig-paren">)</span></dt>
    <dd><p>Hermitian rank- k update <cite>C = alpha * op(A) * op(A) ** H + beta * C</cite></p>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">symm</code><span class="sig-paren">(</span><em>side</em>, <em>uplo</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A</em>, <em>B</em>, <em>beta</em>, <em>C</em><span class="sig-paren">)</span></dt>
    <dd><p>symmetric matrix-matrix multiplication:</p>
    <div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">if</span>  <span class="n">side</span> <span class="o">==</span> <span class="s1">&#39;L&#39;</span><span class="p">:</span>
        <span class="n">C</span> <span class="o">=</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">A</span> <span class="o">*</span> <span class="n">B</span> <span class="o">+</span> <span class="n">beta</span> <span class="o">*</span> <span class="n">C</span>
    <span class="k">else</span><span class="p">:</span>  <span class="c1"># side == &#39;R&#39;</span>
        <span class="n">C</span> <span class="o">=</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">B</span> <span class="o">*</span> <span class="n">A</span> <span class="o">+</span> <span class="n">beta</span> <span class="o">*</span> <span class="n">C</span>
    </pre></div>
    </div>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">hemm</code><span class="sig-paren">(</span><em>side</em>, <em>uplo</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A</em>, <em>B</em>, <em>beta</em>, <em>C</em><span class="sig-paren">)</span></dt>
    <dd><p>Hermitian matrix-matrix multiplication:</p>
    <div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">if</span>  <span class="n">side</span> <span class="o">==</span> <span class="s1">&#39;L&#39;</span><span class="p">:</span>
        <span class="n">C</span> <span class="o">=</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">A</span> <span class="o">*</span> <span class="n">B</span> <span class="o">+</span> <span class="n">beta</span> <span class="o">*</span> <span class="n">C</span>
    <span class="k">else</span><span class="p">:</span>   <span class="c1">#  side == &#39;R&#39;:</span>
        <span class="n">C</span> <span class="o">=</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">B</span> <span class="o">*</span> <span class="n">A</span> <span class="o">+</span> <span class="n">beta</span> <span class="o">*</span> <span class="n">C</span>
    </pre></div>
    </div>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">trsm</code><span class="sig-paren">(</span><em>side</em>, <em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A</em>, <em>B</em><span class="sig-paren">)</span></dt>
    <dd><p>Solves the triangular linear system with multiple right-hand-sides:</p>
    <div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">if</span>  <span class="n">side</span> <span class="o">==</span> <span class="s1">&#39;L&#39;</span><span class="p">:</span>
        <span class="n">op</span><span class="p">(</span><span class="n">A</span><span class="p">)</span> <span class="o">*</span> <span class="n">X</span> <span class="o">=</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">B</span>
    <span class="k">else</span><span class="p">:</span>       <span class="c1"># side == &#39;R&#39;</span>
        <span class="n">X</span> <span class="o">*</span> <span class="n">op</span><span class="p">(</span><span class="n">A</span><span class="p">)</span> <span class="o">=</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">B</span>
    </pre></div>
    </div>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">trmm</code><span class="sig-paren">(</span><em>side</em>, <em>uplo</em>, <em>trans</em>, <em>diag</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A</em>, <em>B</em>, <em>C</em><span class="sig-paren">)</span></dt>
    <dd><p>triangular matrix-matrix multiplication:</p>
    <div class="highlight-python"><div class="highlight"><pre><span></span>if  side == &#39;:&#39;
        C = alpha * op(A) * B
    else:   # side == &#39;R&#39;
        C = alpha * B * op(A)
    </pre></div>
    </div>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">dgmm</code><span class="sig-paren">(</span><em>side</em>, <em>m</em>, <em>n</em>, <em>A</em>, <em>x</em>, <em>C</em><span class="sig-paren">)</span></dt>
    <dd><p>matrix-matrix multiplication:</p>
    <div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">if</span>  <span class="n">mode</span> <span class="o">==</span> <span class="s1">&#39;R&#39;</span><span class="p">:</span>
        <span class="n">C</span> <span class="o">=</span> <span class="n">A</span> <span class="o">*</span> <span class="n">x</span> <span class="o">*</span> <span class="n">diag</span><span class="p">(</span><span class="n">X</span><span class="p">)</span>
    <span class="k">else</span><span class="p">:</span>       <span class="c1"># mode == &#39;L&#39;</span>
        <span class="n">C</span> <span class="o">=</span> <span class="n">diag</span><span class="p">(</span><span class="n">X</span><span class="p">)</span> <span class="o">*</span> <span class="n">x</span> <span class="o">*</span> <span class="n">A</span>
    </pre></div>
    </div>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">numbapro.cudalib.cublas.Blas.</code><code class="descname">geam</code><span class="sig-paren">(</span><em>transa</em>, <em>transb</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>A</em>, <em>beta</em>, <em>B</em>, <em>C</em><span class="sig-paren">)</span></dt>
    <dd><p>matrix-matrix addition/transposition <cite>C = alpha * op(A) + beta * op(B)</cite></p>
    </dd></dl>

    </div>
    </div>
    <div class="section" id="cusparse">
    <h2>cuSPARSE<a class="headerlink" href="#cusparse" title="Permalink to this headline">¶</a></h2>
    <dl class="class">
    <dt id="numbapro.cudalib.cusparse.Sparse">
    <em class="property">class </em><code class="descclassname">numbapro.cudalib.cusparse.</code><code class="descname">Sparse</code><span class="sig-paren">(</span><em>*args</em>, <em>**kws</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse" title="Permalink to this definition">¶</a></dt>
    <dd><p>All cuSPARSE functions are available under the Sparse object.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>idxbase</strong> &#8211; The base for indexing, either 0 or 1. Optional, defaults
    to 0.</td>
    </tr>
    </tbody>
    </table>
    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.Xcoo2csr">
    <code class="descname">Xcoo2csr</code><span class="sig-paren">(</span><em>cooRowInd</em>, <em>nnz</em>, <em>m</em>, <em>csrRowPtr</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.Xcoo2csr" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-bsr2csr">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-bsr2csr</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.Xcsr2bsrNnz">
    <code class="descname">Xcsr2bsrNnz</code><span class="sig-paren">(</span><em>dirA</em>, <em>m</em>, <em>n</em>, <em>descrA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>blockDim</em>, <em>descrC</em>, <em>bsrRowPtrC</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.Xcsr2bsrNnz" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csr2bsr">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csr2bsr</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.Xcsr2coo">
    <code class="descname">Xcsr2coo</code><span class="sig-paren">(</span><em>csrRowPtr</em>, <em>nnz</em>, <em>m</em>, <em>cooRowInd</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.Xcsr2coo" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csr2coo">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csr2coo</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.XcsrgeamNnz">
    <code class="descname">XcsrgeamNnz</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>descrA</em>, <em>nnzA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>descrB</em>, <em>nnzB</em>, <em>csrRowPtrB</em>, <em>csrColIndB</em>, <em>descrC</em>, <em>csrRowPtrC</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.XcsrgeamNnz" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrgeam">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrgeam</a></p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">nnzC</td>
    </tr>
    <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">int</td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.XcsrgemmNnz">
    <code class="descname">XcsrgemmNnz</code><span class="sig-paren">(</span><em>transA</em>, <em>transB</em>, <em>m</em>, <em>n</em>, <em>k</em>, <em>descrA</em>, <em>nnzA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>descrB</em>, <em>nnzB</em>, <em>csrRowPtrB</em>, <em>csrColIndB</em>, <em>descrC</em>, <em>csrRowPtrC</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.XcsrgemmNnz" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrgemm">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrgemm</a></p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">nnzC</td>
    </tr>
    <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">int</td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.axpyi">
    <code class="descname">axpyi</code><span class="sig-paren">(</span><em>alpha</em>, <em>xVal</em>, <em>xInd</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.axpyi" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-axpyi">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-axpyi</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.bsrmv">
    <code class="descname">bsrmv</code><span class="sig-paren">(</span><em>dir</em>, <em>trans</em>, <em>mb</em>, <em>nb</em>, <em>nnzb</em>, <em>alpha</em>, <em>descr</em>, <em>bsrVal</em>, <em>bsrRowPtr</em>, <em>bsrColInd</em>, <em>blockDim</em>, <em>x</em>, <em>beta</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.bsrmv" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-bsrmv">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-bsrmv</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.bsrxmv">
    <code class="descname">bsrxmv</code><span class="sig-paren">(</span><em>dir</em>, <em>trans</em>, <em>sizeOfMask</em>, <em>mb</em>, <em>nb</em>, <em>nnzb</em>, <em>alpha</em>, <em>descr</em>, <em>bsrVal</em>, <em>bsrMaskPtr</em>, <em>bsrRowPtr</em>, <em>bsrEndPtr</em>, <em>bsrColInd</em>, <em>blockDim</em>, <em>x</em>, <em>beta</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.bsrxmv" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-bsrxmv">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-bsrxmv</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csc2dense">
    <code class="descname">csc2dense</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>descrA</em>, <em>cscValA</em>, <em>cscRowIndA</em>, <em>cscColPtrA</em>, <em>A</em>, <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csc2dense" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csc2dense">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csc2dense</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csr2bsr">
    <code class="descname">csr2bsr</code><span class="sig-paren">(</span><em>dirA</em>, <em>m</em>, <em>n</em>, <em>descrA</em>, <em>csrValA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>blockDim</em>, <em>descrC</em>, <em>bsrValC</em>, <em>bsrRowPtrC</em>, <em>bsrColIndC</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csr2bsr" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csr2bsr">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csr2bsr</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csr2csc">
    <code class="descname">csr2csc</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>nnz</em>, <em>csrVal</em>, <em>csrRowPtr</em>, <em>csrColInd</em>, <em>cscVal</em>, <em>cscRowInd</em>, <em>cscColPtr</em>, <em>copyValues</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csr2csc" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csr2csc">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csr2csc</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csr2dense">
    <code class="descname">csr2dense</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>descrA</em>, <em>csrValA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>A</em>, <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csr2dense" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csr2dense">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csr2dense</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csrgeam">
    <code class="descname">csrgeam</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>alpha</em>, <em>descrA</em>, <em>nnzA</em>, <em>csrValA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>beta</em>, <em>descrB</em>, <em>nnzB</em>, <em>csrValB</em>, <em>csrRowPtrB</em>, <em>csrColIndB</em>, <em>descrC</em>, <em>csrValC</em>, <em>csrRowPtrC</em>, <em>csrColIndC</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csrgeam" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrgeam">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrgeam</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csrgemm">
    <code class="descname">csrgemm</code><span class="sig-paren">(</span><em>transA</em>, <em>transB</em>, <em>m</em>, <em>n</em>, <em>k</em>, <em>descrA</em>, <em>nnzA</em>, <em>csrValA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>descrB</em>, <em>nnzB</em>, <em>csrValB</em>, <em>csrRowPtrB</em>, <em>csrColIndB</em>, <em>descrC</em>, <em>csrValC</em>, <em>csrRowPtrC</em>, <em>csrColIndC</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csrgemm" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrgemm">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrgemm</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csrgemm_ez">
    <code class="descname">csrgemm_ez</code><span class="sig-paren">(</span><em>matA</em>, <em>matB</em>, <em>transA='N'</em>, <em>transB='N'</em>, <em>descrA=None</em>, <em>descrB=None</em>, <em>descrC=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csrgemm_ez" title="Permalink to this definition">¶</a></dt>
    <dd><p>Raises ValueError if the result is entirely zero.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a csr matrix of the matrix product (matA * matB).</td>
    </tr>
    <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="../accelerate/cusparse.html#accelerate.cuda.sparse.CudaSparseMatrix" title="accelerate.cuda.sparse.CudaSparseMatrix">CudaSparseMatrix</a></td>
    </tr>
    </tbody>
    </table>
    <p class="rubric">Notes</p>
    <p>Calls XcsrgemmNnz and csrgemm</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csric0">
    <code class="descname">csric0</code><span class="sig-paren">(</span><em>trans</em>, <em>m</em>, <em>descr</em>, <em>csrValM</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>info</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csric0" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csric0">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csric0</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csrilu0">
    <code class="descname">csrilu0</code><span class="sig-paren">(</span><em>trans</em>, <em>m</em>, <em>descr</em>, <em>csrValM</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>info</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csrilu0" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrilu0">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrilu0</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csrmm">
    <code class="descname">csrmm</code><span class="sig-paren">(</span><em>transA</em>, <em>m</em>, <em>n</em>, <em>k</em>, <em>nnz</em>, <em>alpha</em>, <em>descrA</em>, <em>csrValA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>B</em>, <em>ldb</em>, <em>beta</em>, <em>C</em>, <em>ldc</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csrmm" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrmm">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrmm</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csrmm2">
    <code class="descname">csrmm2</code><span class="sig-paren">(</span><em>transA</em>, <em>transB</em>, <em>m</em>, <em>n</em>, <em>k</em>, <em>nnz</em>, <em>alpha</em>, <em>descrA</em>, <em>csrValA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>B</em>, <em>ldb</em>, <em>beta</em>, <em>C</em>, <em>ldc</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csrmm2" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrmm2">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrmm2</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csrmv">
    <code class="descname">csrmv</code><span class="sig-paren">(</span><em>trans</em>, <em>m</em>, <em>n</em>, <em>nnz</em>, <em>alpha</em>, <em>descr</em>, <em>csrVal</em>, <em>csrRowPtr</em>, <em>csrColInd</em>, <em>x</em>, <em>beta</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csrmv" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrmv">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrmv</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csrsm_analysis">
    <code class="descname">csrsm_analysis</code><span class="sig-paren">(</span><em>transA</em>, <em>m</em>, <em>nnz</em>, <em>descrA</em>, <em>csrValA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csrsm_analysis" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrsmanalysis">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrsmanalysis</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csrsm_solve">
    <code class="descname">csrsm_solve</code><span class="sig-paren">(</span><em>transA</em>, <em>m</em>, <em>n</em>, <em>alpha</em>, <em>descrA</em>, <em>csrValA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>info</em>, <em>X</em>, <em>ldx</em>, <em>Y</em>, <em>ldy</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csrsm_solve" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrsmsolve">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrsmsolve</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csrsv_analysis">
    <code class="descname">csrsv_analysis</code><span class="sig-paren">(</span><em>trans</em>, <em>m</em>, <em>nnz</em>, <em>descr</em>, <em>csrVal</em>, <em>csrRowPtr</em>, <em>csrColInd</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csrsv_analysis" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrsvanalysis">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrsvanalysis</a></p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"></td>
    </tr>
    <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">SolveAnalysisInfo</td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.csrsv_solve">
    <code class="descname">csrsv_solve</code><span class="sig-paren">(</span><em>trans</em>, <em>m</em>, <em>alpha</em>, <em>descr</em>, <em>csrVal</em>, <em>csrRowPtr</em>, <em>csrColInd</em>, <em>info</em>, <em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.csrsv_solve" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrsvsolve">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrsvsolve</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.dense2csc">
    <code class="descname">dense2csc</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>descrA</em>, <em>A</em>, <em>lda</em>, <em>nnzPerCol</em>, <em>cscValA</em>, <em>cscRowIndA</em>, <em>cscColPtrA</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.dense2csc" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-dense2csc">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-dense2csc</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.dense2csr">
    <code class="descname">dense2csr</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>descrA</em>, <em>A</em>, <em>lda</em>, <em>nnzPerRow</em>, <em>csrValA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.dense2csr" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-dense2csr">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-dense2csr</a></p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">nnzTotalDevHostPtr</td>
    </tr>
    <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">int</td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.dotci">
    <code class="descname">dotci</code><span class="sig-paren">(</span><em>xVal</em>, <em>xInd</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.dotci" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-dotci">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-dotci</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.doti">
    <code class="descname">doti</code><span class="sig-paren">(</span><em>xVal</em>, <em>xInd</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.doti" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-doti">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-doti</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.gthr">
    <code class="descname">gthr</code><span class="sig-paren">(</span><em>y</em>, <em>xVal</em>, <em>xInd</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.gthr" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-gthr">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-gthr</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.gthrz">
    <code class="descname">gthrz</code><span class="sig-paren">(</span><em>y</em>, <em>xVal</em>, <em>xInd</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.gthrz" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-gthrz">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-gthrz</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.gtsv">
    <code class="descname">gtsv</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>dl</em>, <em>d</em>, <em>du</em>, <em>B</em>, <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.gtsv" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-gtsv">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-gtsv</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.gtsvStridedBatch">
    <code class="descname">gtsvStridedBatch</code><span class="sig-paren">(</span><em>m</em>, <em>dl</em>, <em>d</em>, <em>du</em>, <em>x</em>, <em>batchCount</em>, <em>batchStride</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.gtsvStridedBatch" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-gtsvstridedbatch">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-gtsvstridedbatch</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.gtsv_nopivot">
    <code class="descname">gtsv_nopivot</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>dl</em>, <em>d</em>, <em>du</em>, <em>B</em>, <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.gtsv_nopivot" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-gtsv_nopivot">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-gtsv_nopivot</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.nnz">
    <code class="descname">nnz</code><span class="sig-paren">(</span><em>dirA</em>, <em>m</em>, <em>n</em>, <em>descrA</em>, <em>A</em>, <em>lda</em>, <em>nnzPerRowCol</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.nnz" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-nnz">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-nnz</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.roti">
    <code class="descname">roti</code><span class="sig-paren">(</span><em>xVal</em>, <em>xInd</em>, <em>y</em>, <em>c</em>, <em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.roti" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-roti">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-roti</a></p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.cusparse.Sparse.sctr">
    <code class="descname">sctr</code><span class="sig-paren">(</span><em>xVal</em>, <em>xInd</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.cusparse.Sparse.sctr" title="Permalink to this definition">¶</a></dt>
    <dd><p><a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-sctr">http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-sctr</a></p>
    </dd></dl>

    </dd></dl>

    </div>
    <div class="section" id="sorting">
    <h2>Sorting<a class="headerlink" href="#sorting" title="Permalink to this headline">¶</a></h2>
    <p>NumbaPro provides host-side sorting routines.</p>
    <div class="section" id="sorting-large-arrays">
    <h3>Sorting Large Arrays<a class="headerlink" href="#sorting-large-arrays" title="Permalink to this headline">¶</a></h3>
    <p>The <code class="docutils literal"><span class="pre">RadixSort</span></code> class is recommended for sorting large (approx. more than 1
    million items) arrays of numeric  types.</p>
    <dl class="class">
    <dt id="numbapro.cudalib.sorting.RadixSort">
    <em class="property">class </em><code class="descclassname">numbapro.cudalib.sorting.</code><code class="descname">RadixSort</code><span class="sig-paren">(</span><em>maxcount</em>, <em>dtype</em>, <em>descending=False</em>, <em>stream=0</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.sorting.RadixSort" title="Permalink to this definition">¶</a></dt>
    <dd><p>Provides radix sort and radix select.</p>
    <p>The algorithm implemented here is best for large arrays (<code class="docutils literal"><span class="pre">N</span> <span class="pre">&gt;</span> <span class="pre">1e6</span></code>) due to
    the latency introduced by its use of multiple kernel launches. It is
    recommended to use <code class="docutils literal"><span class="pre">segmented_sort</span></code> instead for batches of smaller arrays.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>maxcount</strong> (<em>int</em>) &#8211; Maximum number of items to sort</li>
    <li><strong>dtype</strong> (<em>numpy.dtype</em>) &#8211; The element type to sort</li>
    <li><strong>descending</strong> (<em>bool</em>) &#8211; Sort in descending order?</li>
    <li><strong>stream</strong> &#8211; The CUDA stream to run the kernels in</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    <dl class="method">
    <dt id="numbapro.cudalib.sorting.RadixSort.argselect">
    <code class="descname">argselect</code><span class="sig-paren">(</span><em>k</em>, <em>keys</em>, <em>begin_bit=0</em>, <em>end_bit=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.sorting.RadixSort.argselect" title="Permalink to this definition">¶</a></dt>
    <dd><p>Similar to <code class="docutils literal"><span class="pre">RadixSort.select</span></code> but returns the new sorted indices.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>keys</strong> (<em>numpy.ndarray</em>) &#8211; Keys to sort inplace</li>
    <li><strong>begin_bit</strong> (<em>int</em>) &#8211; The first bit to sort</li>
    <li><strong>end_bit</strong> (<em>int</em>) &#8211; Optional. The last bit to sort</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">The indices indicating the new ordering as an array on the CUDA
    device or on the host.</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.sorting.RadixSort.argsort">
    <code class="descname">argsort</code><span class="sig-paren">(</span><em>keys</em>, <em>begin_bit=0</em>, <em>end_bit=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.sorting.RadixSort.argsort" title="Permalink to this definition">¶</a></dt>
    <dd><p>Similar to <code class="docutils literal"><span class="pre">RadixSort.sort</span></code> but returns the new sorted indices.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>keys</strong> (<em>numpy.ndarray</em>) &#8211; Keys to sort inplace</li>
    <li><strong>begin_bit</strong> (<em>int</em>) &#8211; The first bit to sort</li>
    <li><strong>end_bit</strong> (<em>int</em>) &#8211; Optional. The last bit to sort</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">The indices indicating the new ordering as an array on the CUDA
    device or on the host.</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.sorting.RadixSort.close">
    <code class="descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.sorting.RadixSort.close" title="Permalink to this definition">¶</a></dt>
    <dd><p>Explicitly release internal resources</p>
    <p>Called automatically when the object is deleted.</p>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.sorting.RadixSort.init_arg">
    <code class="descname">init_arg</code><span class="sig-paren">(</span><em>size</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.sorting.RadixSort.init_arg" title="Permalink to this definition">¶</a></dt>
    <dd><p>Initialize an empty CUDA ndarray of uint32 with ascending integers
    starting from zero</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>size</strong> (<em>int</em>) &#8211; Number of elements for the output array</td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">An array with values <code class="docutils literal"><span class="pre">[0,</span> <span class="pre">1,</span> <span class="pre">2,</span> <span class="pre">...m</span> <span class="pre">size</span> <span class="pre">-</span> <span class="pre">1</span> <span class="pre">]</span></code></td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.sorting.RadixSort.select">
    <code class="descname">select</code><span class="sig-paren">(</span><em>k</em>, <em>keys</em>, <em>vals=None</em>, <em>begin_bit=0</em>, <em>end_bit=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.sorting.RadixSort.select" title="Permalink to this definition">¶</a></dt>
    <dd><p>Perform a inplace k-select on <code class="docutils literal"><span class="pre">keys</span></code>.</p>
    <p>Memory transfer is performed automatically.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>keys</strong> (<em>numpy.ndarray</em>) &#8211; Keys to sort inplace</li>
    <li><strong>vals</strong> (<em>numpy.ndarray</em>) &#8211; Optional. Additional values to be reordered along the sort.
    It is modified in place. Only the <code class="docutils literal"><span class="pre">uint32</span></code> dtype is
    supported in this version.</li>
    <li><strong>begin_bit</strong> (<em>int</em>) &#8211; The first bit to sort</li>
    <li><strong>end_bit</strong> (<em>int</em>) &#8211; Optional. The last bit to sort</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt id="numbapro.cudalib.sorting.RadixSort.sort">
    <code class="descname">sort</code><span class="sig-paren">(</span><em>keys</em>, <em>vals=None</em>, <em>begin_bit=0</em>, <em>end_bit=None</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.sorting.RadixSort.sort" title="Permalink to this definition">¶</a></dt>
    <dd><p>Perform a inplace sort on <code class="docutils literal"><span class="pre">keys</span></code>.  Memory transfer is performed
    automatically.</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>keys</strong> (<em>numpy.ndarray</em>) &#8211; Keys to sort inplace</li>
    <li><strong>vals</strong> (<em>numpy.ndarray</em>) &#8211; Optional. Additional values to be reordered along the sort.
    It is modified in place. Only the <code class="docutils literal"><span class="pre">uint32</span></code> dtype is
    supported in this version.</li>
    <li><strong>begin_bit</strong> (<em>int</em>) &#8211; The first bit to sort</li>
    <li><strong>end_bit</strong> (<em>int</em>) &#8211; Optional. The last bit to sort</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    </dd></dl>

    </div>
    <div class="section" id="sorting-many-small-arrays">
    <h3>Sorting Many Small Arrays<a class="headerlink" href="#sorting-many-small-arrays" title="Permalink to this headline">¶</a></h3>
    <p>Using <code class="docutils literal"><span class="pre">RadixSort</span></code> on small (approx. less than 1 million items) arrays has
    significant overhead due to multiple kernel launch.  A better alternative
    is to use the <code class="docutils literal"><span class="pre">segmented_sort()</span></code> which uses a single kernel to sort many
    of small arrays in one batch.</p>
    <dl class="function">
    <dt id="numbapro.cudalib.sorting.segmented_sort">
    <code class="descclassname">numbapro.cudalib.sorting.</code><code class="descname">segmented_sort</code><span class="sig-paren">(</span><em>keys</em>, <em>vals</em>, <em>segments</em>, <em>stream=0</em><span class="sig-paren">)</span><a class="headerlink" href="#numbapro.cudalib.sorting.segmented_sort" title="Permalink to this definition">¶</a></dt>
    <dd><p>Performs an inplace sort on small segments (N &lt; 1e6).</p>
    <table class="docutils field-list" frame="void" rules="none">
    <col class="field-name" />
    <col class="field-body" />
    <tbody valign="top">
    <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
    <li><strong>keys</strong> (<em>numpy.ndarray</em>) &#8211; Keys to sort inplace.</li>
    <li><strong>vals</strong> (<em>numpy.ndarray</em>) &#8211; Values to be reordered inplace along the sort. Only the
    <code class="docutils literal"><span class="pre">uint32</span></code> dtype is supported in this implementation.</li>
    <li><strong>segments</strong> (<em>numpy.ndarray</em>) &#8211; Segment separation location. e.g. <code class="docutils literal"><span class="pre">array([3,</span> <span class="pre">6,</span> <span class="pre">8])</span></code> for
    segments of  <code class="docutils literal"><span class="pre">keys[:3]</span></code>, <code class="docutils literal"><span class="pre">keys[3:6]</span></code>, <code class="docutils literal"><span class="pre">keys[6:8]</span></code>,
    <code class="docutils literal"><span class="pre">keys[8:]</span></code>.</li>
    <li><strong>stream</strong> &#8211; Optional. A cuda stream in which the kernels are executed.</li>
    </ul>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>
