cuSPARSE
========

.. raw:: html

    <p>Provides basic linear algebra operations for sparse matrices. See <a class="reference external" href="http://docs.nvidia.com/cuda/cusparse/">NVIDIA
    cuSPARSE</a> for an in-depth description
    of the cuSPARSE library and its methods and data types. All functions are
    accessed through the <a class="reference internal" href="#accelerate.cuda.sparse.Sparse" title="accelerate.cuda.sparse.Sparse"><code class="xref py py-class docutils literal"><span class="pre">accelerate.cuda.sparse.Sparse</span></code></a> class:</p>
    <dl class="class">
    <dt id="accelerate.cuda.sparse.Sparse">
    <em class="property">class </em><code class="descclassname">accelerate.cuda.sparse.</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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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="accelerate.cuda.sparse.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="#accelerate.cuda.sparse.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>

    <p>Similarly to the cuBLAS interface, no special naming convention is used for
    functions to operate on different datatypes - all datatypes are handled by each
    function, and dispatch of the corresponding library function is handled by
    Accelerate. However, it is often necessary to provide a <em>matrix descriptor</em> to
    functions, which provides some information about the format and properties of a
    matrix. A matrix descriptor can be obtained from the
    <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.matdescr" title="accelerate.cuda.sparse.Sparse.matdescr"><code class="xref py py-meth docutils literal"><span class="pre">accelerate.cuda.sparse.Sparse.matdescr()</span></code></a> method:</p>
    <dl class="method">
    <dt id="accelerate.cuda.sparse.Sparse.matdescr">
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">matdescr</code><span class="sig-paren">(</span><em>indexbase</em>, <em>diagtype</em>, <em>fillmode</em>, <em>matrixtype</em><span class="sig-paren">)</span><a class="headerlink" href="#accelerate.cuda.sparse.Sparse.matdescr" title="Permalink to this definition">¶</a></dt>
    <dd><p>Creates a matrix descriptor that describes a matrix with the given
    <cite>indexbase</cite>, <cite>diagtype</cite>, <cite>fillmode</cite>, and <cite>matrixtype</cite>. Note that not all of
    these options are relevant to every matrix storage format.</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>indexbase</strong> &#8211; Optional. 0 for 0-based indexing, or 1 for 1-based
    indexing. If not specified, the default given to the
    <a class="reference internal" href="#accelerate.cuda.sparse.Sparse" title="accelerate.cuda.sparse.Sparse"><code class="xref py py-class docutils literal"><span class="pre">accelerate.cuda.sparse.Sparse</span></code></a> constructor is
    used instead.</li>
    <li><strong>diagtype</strong> &#8211; Optional. Defaults to <cite>&#8216;N&#8217;</cite>. <cite>&#8216;N&#8217;</cite> signifies that the matrix
    diagonal has non-unit elements. <cite>&#8216;U&#8217;</cite> signifies that the
    matrix diagonal only contains unit elements.</li>
    <li><strong>fillmode</strong> &#8211; Optional. Defaults to <cite>&#8216;L&#8217;</cite>. <cite>&#8216;L&#8217;</cite> indicates that the lower
    triangular part of the matrix is stored. <cite>&#8216;U&#8217;</cite> indicates
    that the upper triangular part of the matrix is stored.</li>
    <li><strong>matrixtype</strong> &#8211; Optional. Defaults to <cite>&#8216;G&#8217;</cite>. <cite>&#8216;S&#8217;</cite> indicates that the
    matrix is symmetric. <cite>&#8216;H&#8217;</cite> indicates that the matrix is
    Hermitian. <cite>&#8216;T&#8217;</cite> indicates that the matrix is triangular.
    <cite>&#8216;G&#8217;</cite> is used for a <em>general</em> matrix, which is not
    symmetric, Hermitian, or triangular.</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A matrix descriptor.</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <p>Many of the methods of the <a class="reference internal" href="#accelerate.cuda.sparse.Sparse" title="accelerate.cuda.sparse.Sparse"><code class="xref py py-class docutils literal"><span class="pre">accelerate.cuda.sparse.Sparse</span></code></a> class accept
    the individual data structures that make up a sparse representation of a matrix
    (for example the values, the row pointers and the column indices for a CSR
    format matrix). However, some methods (such as
    <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.csrgemm_ez" title="accelerate.cuda.sparse.Sparse.csrgemm_ez"><code class="xref py py-meth docutils literal"><span class="pre">accelerate.cuda.sparse.Sparse.csrgemm_ez()</span></code></a>), accept an instance of the
    <a class="reference internal" href="#accelerate.cuda.sparse.CudaSparseMatrix" title="accelerate.cuda.sparse.CudaSparseMatrix"><code class="xref py py-class docutils literal"><span class="pre">accelerate.cuda.sparse.CudaSparseMatrix</span></code></a> class:</p>
    <dl class="class">
    <dt id="accelerate.cuda.sparse.CudaSparseMatrix">
    <em class="property">class </em><code class="descclassname">accelerate.cuda.sparse.</code><code class="descname">CudaSparseMatrix</code><a class="headerlink" href="#accelerate.cuda.sparse.CudaSparseMatrix" title="Permalink to this definition">¶</a></dt>
    <dd><p>Base class for a representation of a sparse matrix on a CUDA device. The
    constructor takes no arguments.</p>
    <dl class="method">
    <dt id="accelerate.cuda.sparse.CudaSparseMatrix.from_host_matrix">
    <code class="descname">from_host_matrix</code><span class="sig-paren">(</span><em>matrix</em>, <em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#accelerate.cuda.sparse.CudaSparseMatrix.from_host_matrix" title="Permalink to this definition">¶</a></dt>
    <dd><p>Initialise the matrix structure and values from an instance of a matrix on
    the host. The host matrix must be of the corresponding host type, which is
    documented for each subclass below.</p>
    </dd></dl>

    <dl class="method">
    <dt id="accelerate.cuda.sparse.CudaSparseMatrix.copy_to_host">
    <code class="descname">copy_to_host</code><span class="sig-paren">(</span><em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#accelerate.cuda.sparse.CudaSparseMatrix.copy_to_host" title="Permalink to this definition">¶</a></dt>
    <dd><p>Create an instance of the corresponding host matrix type and copy the
    matrix structure and data into it from the device. See subclass
    documentation for an indication of the corresponding matrix type.</p>
    </dd></dl>

    </dd></dl>

    <p>Subclasses of the sparse matrix type are:</p>
    <dl class="class">
    <dt id="accelerate.cuda.sparse.CudaBSRMatrix">
    <em class="property">class </em><code class="descclassname">accelerate.cuda.sparse.</code><code class="descname">CudaBSRMatrix</code><a class="headerlink" href="#accelerate.cuda.sparse.CudaBSRMatrix" title="Permalink to this definition">¶</a></dt>
    <dd><p>CUDA sparse matrix for which the corresponding type is a
    <code class="xref py py-class docutils literal"><span class="pre">scipy.sparse.bsr_matrix</span></code>.</p>
    </dd></dl>

    <dl class="class">
    <dt id="accelerate.cuda.sparse.CudaCSRMatrix">
    <em class="property">class </em><code class="descclassname">accelerate.cuda.sparse.</code><code class="descname">CudaCSRMatrix</code><a class="headerlink" href="#accelerate.cuda.sparse.CudaCSRMatrix" title="Permalink to this definition">¶</a></dt>
    <dd><p>CUDA sparse matrix for which the corresponding type is a
    <code class="xref py py-class docutils literal"><span class="pre">scipy.sparse.csr_matrix</span></code>.</p>
    </dd></dl>

    <dl class="class">
    <dt id="accelerate.cuda.sparse.CudaCSCMatrix">
    <em class="property">class </em><code class="descclassname">accelerate.cuda.sparse.</code><code class="descname">CudaCSCMatrix</code><a class="headerlink" href="#accelerate.cuda.sparse.CudaCSCMatrix" title="Permalink to this definition">¶</a></dt>
    <dd><p>CUDA sparse matrix for which the corresponding type is a
    <code class="xref py py-class docutils literal"><span class="pre">scipy.sparse.csc_matrix</span></code>.</p>
    </dd></dl>

    <p>There are also some convenience methods for constructing CUDA sparse matrices in
    a similar manner to Scipy sparse matrices:</p>
    <dl class="method">
    <dt id="accelerate.cuda.sparse.bsr_matrix">
    <code class="descclassname">sparse.</code><code class="descname">bsr_matrix</code><span class="sig-paren">(</span><em>*args</em>, <em>**kws</em><span class="sig-paren">)</span><a class="headerlink" href="#accelerate.cuda.sparse.bsr_matrix" title="Permalink to this definition">¶</a></dt>
    <dd><p>Takes the same arguments as <code class="docutils literal"><span class="pre">scipy.sparse.bsr_matrix</span></code>.</p>
    <p>Returns a BSR CUDA matrix.</p>
    </dd></dl>

    <dl class="method">
    <dt id="accelerate.cuda.sparse.csr_matrix">
    <code class="descclassname">sparse.</code><code class="descname">csr_matrix</code><span class="sig-paren">(</span><em>*args</em>, <em>**kws</em><span class="sig-paren">)</span><a class="headerlink" href="#accelerate.cuda.sparse.csr_matrix" title="Permalink to this definition">¶</a></dt>
    <dd><p>Takes the same arguments as <code class="docutils literal"><span class="pre">scipy.sparse.csr_matrix</span></code>.</p>
    <p>Returns a CSR CUDA matrix.</p>
    </dd></dl>

    <dl class="method">
    <dt id="accelerate.cuda.sparse.csc_matrix">
    <code class="descclassname">sparse.</code><code class="descname">csc_matrix</code><span class="sig-paren">(</span><em>*args</em>, <em>**kws</em><span class="sig-paren">)</span><a class="headerlink" href="#accelerate.cuda.sparse.csc_matrix" title="Permalink to this definition">¶</a></dt>
    <dd><p>Takes the same arguments as <code class="docutils literal"><span class="pre">scipy.sparse.csc_matrix</span></code>.</p>
    <p>Returns a CSC CUDA matrix.</p>
    </dd></dl>

    <div class="section" id="blas-level-1">
    <h2>BLAS Level 1<a class="headerlink" href="#blas-level-1" title="Permalink to this headline">¶</a></h2>
    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Multiplies the sparse vector <cite>x</cite> by <cite>alpha</cite> and adds the result to the dense
    vector <cite>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>alpha</strong> &#8211; scalar</li>
    <li><strong>xVal</strong> &#8211; vector of non-zero values of <cite>x</cite></li>
    <li><strong>xInd</strong> &#8211; vector of indices of non-zero values of <cite>x</cite></li>
    <li><strong>y</strong> &#8211; dense vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">dense vector</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">doti</code><span class="sig-paren">(</span><em>xVal</em>, <em>xInd</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>Computes the dot product of the sparse vector <cite>x</cite> and dense vector <cite>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>xVal</strong> &#8211; vector of non-zero values of <cite>x</cite></li>
    <li><strong>xInd</strong> &#8211; vector of indices of non-zero values of <cite>x</cite></li>
    <li><strong>y</strong> &#8211; dense vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">scalar</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">dotci</code><span class="sig-paren">(</span><em>xVal</em>, <em>xInd</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>Computes the dot product of the complex conjugate of the sparse vector <cite>x</cite>
    and the dense vector <cite>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>xVal</strong> &#8211; vector of non-zero values of <cite>x</cite></li>
    <li><strong>xInd</strong> &#8211; vector of indices of non-zero values of <cite>x</cite></li>
    <li><strong>y</strong> &#8211; dense vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">scalar</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">gthr</code><span class="sig-paren">(</span><em>y</em>, <em>xVal</em>, <em>xInd</em><span class="sig-paren">)</span></dt>
    <dd><p>Gathers the elements of <cite>y</cite> at the indices <cite>xInd</cite> into the array <cite>xVal</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>xVal</strong> &#8211; vector of non-zero values of <cite>x</cite></li>
    <li><strong>xInd</strong> &#8211; vector of indices of non-zero values of <cite>x</cite></li>
    <li><strong>y</strong> &#8211; dense vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">gthrz</code><span class="sig-paren">(</span><em>y</em>, <em>xVal</em>, <em>xInd</em><span class="sig-paren">)</span></dt>
    <dd><p>Gathers the elements of <cite>y</cite> at the indices <cite>xInd</cite> into the array <cite>xVal</cite> and
    zeroes out the gathered elements of <cite>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>xVal</strong> &#8211; vector of non-zero values of <cite>x</cite></li>
    <li><strong>xInd</strong> &#8211; vector of indices of non-zero values of <cite>x</cite></li>
    <li><strong>y</strong> &#8211; dense vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Applies the Givens rotation matrix, <cite>G</cite>:</p>
    <div class="math">
    \[\begin{split}G = \left( \begin{array}{cc}
    C  &amp; S \\
    -S &amp; C
    \end{array}\right)\end{split}\]</div>
    <p>to the sparse vector <cite>x</cite> and dense vector
    <cite>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>xVal</strong> &#8211; vector of non-zero values of <cite>x</cite></li>
    <li><strong>xInd</strong> &#8211; vector of indices of non-zero values of <cite>x</cite></li>
    <li><strong>y</strong> &#8211; dense vector</li>
    <li><strong>c</strong> &#8211; cosine element of the rotation matrix</li>
    <li><strong>s</strong> &#8211; sine element of the rotation matrix</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">sctr</code><span class="sig-paren">(</span><em>xVal</em>, <em>xInd</em>, <em>y</em><span class="sig-paren">)</span></dt>
    <dd><p>Scatters the elements of the sparse vector <cite>x</cite> into the dense vector <cite>y</cite>.
    Elements of <cite>y</cite> whose indices are not listed in <cite>xInd</cite> are unmodified.</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>xVal</strong> &#8211; vector of non-zero values of <cite>x</cite></li>
    <li><strong>xInd</strong> &#8211; vector of indices of non-zero values of <cite>x</cite></li>
    <li><strong>y</strong> &#8211; dense vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    </div>
    <div class="section" id="blas-level-2">
    <h2>BLAS Level 2<a class="headerlink" href="#blas-level-2" title="Permalink to this headline">¶</a></h2>
    <p>All level 2 routines follow the following naming convention for the following
    arguments:</p>
    <ul>
    <li><p class="first">alpha, beta &#8211; (scalar) Can be real or complex numbers.</p>
    </li>
    <li><p class="first">descr, descrA, descrB &#8211; (descriptor) Matrix descriptor. An appropriate
    descriptor may be obtained by calling
    <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.matdescr" title="accelerate.cuda.sparse.Sparse.matdescr"><code class="xref py py-meth docutils literal"><span class="pre">accelerate.cuda.sparse.Sparse.matdescr()</span></code></a>. <cite>descr</cite> only applies to the
    only matrix argument. <cite>descrA</cite> and <cite>descrB</cite> apply to matrix <cite>A</cite> and matrix
    <cite>B</cite>, respectively.</p>
    </li>
    <li><p class="first">dir &#8211; (string) Can be <cite>&#8216;C&#8217;</cite> to indicate column-major block storage or <cite>&#8216;R&#8217;</cite>
    to indicate row-major block storage.</p>
    </li>
    <li><dl class="first docutils">
    <dt>trans, transa, transb &#8211; (string)</dt>
    <dd><p class="first">Select the operation <cite>op</cite> to apply to a matrix:</p>
    <ul class="simple">
    <li><cite>&#8216;N&#8217;</cite>: <cite>op(X) = X</cite>, the identity operation;</li>
    <li><cite>&#8216;T&#8217;</cite>: <cite>op(X) = X**T</cite>, the transpose;</li>
    <li><cite>&#8216;C&#8217;</cite>: <cite>op(X) = X**H</cite>, the conjugate transpose.</li>
    </ul>
    <p class="last"><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>
    </ul>
    <dl class="method">
    <dt id="accelerate.cuda.sparse.Sparse.bsrmv_matrix">
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">bsrmv_matrix</code><span class="sig-paren">(</span><em>dir</em>, <em>trans</em>, <em>alpha</em>, <em>descr</em>, <em>bsrmat</em>, <em>x</em>, <em>beta</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#accelerate.cuda.sparse.Sparse.bsrmv_matrix" title="Permalink to this definition">¶</a></dt>
    <dd><p>Matrix-vector multiplication <cite>y = alpha * op(A) * x + beta * y</cite> with a
    BSR-format matrix.</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>dir</strong> &#8211; block storage direction</li>
    <li><strong>trans</strong> &#8211; operation to apply to the matrix</li>
    <li><strong>alpha</strong> &#8211; scalar</li>
    <li><strong>descr</strong> &#8211; matrix descriptor</li>
    <li><strong>bsrmat</strong> &#8211; the matrix <cite>A</cite></li>
    <li><strong>x</strong> &#8211; dense vector</li>
    <li><strong>beta</strong> &#8211; scalar</li>
    <li><strong>y</strong> &#8211; dense vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Matrix-vector multiplication <cite>y = alpha * op(A) * x + beta * y</cite> with a
    BSR-format matrix. This function accepts the individual arrays that make up
    the structure of a BSR matrix - if a
    <a class="reference internal" href="#accelerate.cuda.sparse.CudaBSRMatrix" title="accelerate.cuda.sparse.CudaBSRMatrix"><code class="xref py py-class docutils literal"><span class="pre">accelerate.cuda.sparse.CudaBSRMatrix</span></code></a> instance is to hand, it is
    recommended to use the <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.bsrmv_matrix" title="accelerate.cuda.sparse.Sparse.bsrmv_matrix"><code class="xref py py-meth docutils literal"><span class="pre">bsrmv_matrix()</span></code></a> method instead.</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>dir</strong> &#8211; block storage direction</li>
    <li><strong>trans</strong> &#8211; operation to apply to the matrix</li>
    <li><strong>mb</strong> &#8211; Number of block rows of the matrix</li>
    <li><strong>nb</strong> &#8211; Number of block columns of the matrix</li>
    <li><strong>nnzb</strong> &#8211; Number of nonzero blocks of the matrix</li>
    <li><strong>alpha</strong> &#8211; scalar</li>
    <li><strong>descr</strong> &#8211; matrix descriptor</li>
    <li><strong>bsrVal</strong> &#8211; vector of nonzero values of the matrix</li>
    <li><strong>bsrRowPtr</strong> &#8211; vector of block row pointers of the matrix</li>
    <li><strong>bsrColInd</strong> &#8211; vector of block column indices of the matrix</li>
    <li><strong>blockDim</strong> &#8211; block dimension of the matrix</li>
    <li><strong>x</strong> &#8211; dense vector</li>
    <li><strong>beta</strong> &#8211; scalar</li>
    <li><strong>y</strong> &#8211; dense vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Matrix-vector multiplication similar to <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.bsrmv" title="accelerate.cuda.sparse.Sparse.bsrmv"><code class="xref py py-meth docutils literal"><span class="pre">bsrmv()</span></code></a>, but including a
    mask operation: <cite>y(mask) = (alpha * op(A) * x + beta * y)(mask)</cite>. The blocks
    of y to be updated are specified in <cite>bsrMaskPtr</cite>. Blocks whose indices are
    not specified in <cite>bsrMaskPtr</cite> are left unmodified.</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>dir</strong> &#8211; block storage direction</li>
    <li><strong>trans</strong> &#8211; operation to apply to the matrix</li>
    <li><strong>sizeOfMask</strong> &#8211; number of updated blocks of rows of <cite>y</cite></li>
    <li><strong>mb</strong> &#8211; Number of block rows of the matrix</li>
    <li><strong>nb</strong> &#8211; Number of block columns of the matrix</li>
    <li><strong>nnzb</strong> &#8211; Number of nonzero blocks of the matrix</li>
    <li><strong>alpha</strong> &#8211; scalar</li>
    <li><strong>descr</strong> &#8211; matrix descriptor</li>
    <li><strong>bsrVal</strong> &#8211; vector of nonzero values of the matrix</li>
    <li><strong>bsrMaskPtr</strong> &#8211; vector of indices of the block elements to be updated</li>
    <li><strong>bsrRowPtr</strong> &#8211; vector of block row pointers of the matrix</li>
    <li><strong>bsrEndPtr</strong> &#8211; vector of pointers to the end of every block row plus one</li>
    <li><strong>bsrColInd</strong> &#8211; vector of block column indices of the matrix</li>
    <li><strong>blockDim</strong> &#8211; block dimension of the matrix</li>
    <li><strong>x</strong> &#8211; dense vector</li>
    <li><strong>beta</strong> &#8211; scalar</li>
    <li><strong>y</strong> &#8211; dense vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Matrix-vector multiplication <cite>y = alpha * op(A) * x + beta * y</cite> with a
    CSR-format matrix.</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>trans</strong> &#8211; operation to apply to the matrix</li>
    <li><strong>m</strong> &#8211; Number of rows of the matrix</li>
    <li><strong>n</strong> &#8211; Number of columns of the matrix</li>
    <li><strong>nnz</strong> &#8211; Number of nonzeroes of the matrix</li>
    <li><strong>alpha</strong> &#8211; scalar</li>
    <li><strong>descr</strong> &#8211; matrix descriptor</li>
    <li><strong>csrVal</strong> &#8211; vector of nonzero values of the matrix</li>
    <li><strong>csrRowPtr</strong> &#8211; vector of row pointers of the matrix</li>
    <li><strong>csrColInd</strong> &#8211; vector of column indices of the matrix</li>
    <li><strong>x</strong> &#8211; dense vector</li>
    <li><strong>beta</strong> &#8211; scalar</li>
    <li><strong>y</strong> &#8211; dense vector</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Performs the analysis phase of the solution of the sparse triangular linear
    system <cite>op(A) * y = alpha * x</cite>. This needs to be executed only once for a
    given matrix and operation 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>trans</strong> &#8211; operation to apply to the matrix</li>
    <li><strong>m</strong> &#8211; number of rows of the matrix</li>
    <li><strong>nnz</strong> &#8211; number of nonzeroes of the matrix</li>
    <li><strong>descr</strong> &#8211; matrix descriptor</li>
    <li><strong>csrVal</strong> &#8211; vector of nonzero values of the matrix</li>
    <li><strong>csrRowPtr</strong> &#8211; vector of row pointers of the matrix</li>
    <li><strong>csrColInd</strong> &#8211; vector of column indices of the matrix</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the analysis result, which can be used as input to the solve phase</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Performs the analysis phase of the solution of the sparse triangular linear
    system <cite>op(A) * y = 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 simple">
    <li><strong>trans</strong> &#8211; operation to apply to the matrix</li>
    <li><strong>m</strong> &#8211; number of rows of the matrix</li>
    <li><strong>alpha</strong> &#8211; scalar</li>
    <li><strong>descr</strong> &#8211; matrix descriptor</li>
    <li><strong>csrVal</strong> &#8211; vector of nonzero values of the matrix</li>
    <li><strong>csrRowPtr</strong> &#8211; vector of row pointers of the matrix</li>
    <li><strong>csrColInd</strong> &#8211; vector of column indices of the matrix</li>
    <li><strong>info</strong> &#8211; the analysis result from <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.csrsv_analysis" title="accelerate.cuda.sparse.Sparse.csrsv_analysis"><code class="xref py py-meth docutils literal"><span class="pre">csrsv_analysis()</span></code></a></li>
    <li><strong>x</strong> &#8211; dense vector</li>
    <li><strong>y</strong> &#8211; dense vector into which the solve result is stored</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    </div>
    <div class="section" id="blas-level-3">
    <h2>BLAS Level 3<a class="headerlink" href="#blas-level-3" title="Permalink to this headline">¶</a></h2>
    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Matrix-matrix multiplication <cite>C = alpha * op(A) * B + beta * C</cite> where <cite>A</cite> is
    a sparse matrix in CSR format and <cite>B</cite> and <cite>C</cite> are dense matrices.</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>transA</strong> &#8211; operation to apply to <cite>A</cite></li>
    <li><strong>m</strong> &#8211; number of rows of <cite>A</cite></li>
    <li><strong>n</strong> &#8211; number of columns of <cite>B</cite> and <cite>C</cite></li>
    <li><strong>k</strong> &#8211; number of columns of <cite>A</cite></li>
    <li><strong>nnz</strong> &#8211; number of nonzeroes in <cite>A</cite></li>
    <li><strong>alpha</strong> &#8211; scalar</li>
    <li><strong>descrA</strong> &#8211; matrix descriptor</li>
    <li><strong>csrValA</strong> &#8211; vector of nonzero values of <cite>A</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; vector of row pointers of <cite>A</cite></li>
    <li><strong>csrColIndA</strong> &#8211; vector of column indices of <cite>A</cite></li>
    <li><strong>B</strong> &#8211; dense matrix</li>
    <li><strong>ldb</strong> &#8211; leading dimension of <cite>B</cite></li>
    <li><strong>beta</strong> &#8211; scalar</li>
    <li><strong>C</strong> &#8211; dense matrix</li>
    <li><strong>ldc</strong> &#8211; leading dimension of <cite>C</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Matrix-matrix multiplication <cite>C = alpha * op(A) * op(B) + beta * C</cite> where <cite>A</cite> is
    a sparse matrix in CSR format and <cite>B</cite> and <cite>C</cite> are dense matrices.</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>transA</strong> &#8211; operation to apply to <cite>A</cite></li>
    <li><strong>transB</strong> &#8211; operation to apply to <cite>B</cite></li>
    <li><strong>m</strong> &#8211; number of rows of <cite>A</cite></li>
    <li><strong>n</strong> &#8211; number of columns of <cite>B</cite> and <cite>C</cite></li>
    <li><strong>k</strong> &#8211; number of columns of <cite>A</cite></li>
    <li><strong>nnz</strong> &#8211; number of nonzeroes in <cite>A</cite></li>
    <li><strong>alpha</strong> &#8211; scalar</li>
    <li><strong>descrA</strong> &#8211; matrix descriptor</li>
    <li><strong>csrValA</strong> &#8211; vector of nonzero values of <cite>A</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; vector of row pointers of <cite>A</cite></li>
    <li><strong>csrColIndA</strong> &#8211; vector of column indices of <cite>A</cite></li>
    <li><strong>B</strong> &#8211; dense matrix</li>
    <li><strong>ldb</strong> &#8211; leading dimension of <cite>B</cite></li>
    <li><strong>beta</strong> &#8211; scalar</li>
    <li><strong>C</strong> &#8211; dense matrix</li>
    <li><strong>ldc</strong> &#8211; leading dimension of <cite>C</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Performs the analysis phase of the solution of a sparse triangular linear
    system <cite>op(A) * Y = alpha * X</cite> with multiple right-hand sides where <cite>A</cite> is a
    sparse matrix in CSR format, and <cite>X</cite> and <cite>Y</cite> are dense matrices.</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>transA</strong> &#8211; operation to apply to <cite>A</cite></li>
    <li><strong>m</strong> &#8211; number of rows of <cite>A</cite></li>
    <li><strong>nnz</strong> &#8211; number of nonzeroes in <cite>A</cite></li>
    <li><strong>descrA</strong> &#8211; matrix descriptor</li>
    <li><strong>csrValA</strong> &#8211; vector of nonzero values of <cite>A</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; vector of row pointers of <cite>A</cite></li>
    <li><strong>csrColIndA</strong> &#8211; vector of column indices of <cite>A</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the analysis result</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Performs the analysis phase of the solution of a sparse triangular linear
    system <cite>op(A) * Y = alpha * X</cite> with multiple right-hand sides where <cite>A</cite> is a
    sparse matrix in CSR format, and <cite>X</cite> and <cite>Y</cite> are dense matrices.</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>transA</strong> &#8211; operation to apply to <cite>A</cite></li>
    <li><strong>m</strong> &#8211; number of rows of <cite>A</cite></li>
    <li><strong>n</strong> &#8211; number of columns of <cite>B</cite> and <cite>C</cite></li>
    <li><strong>alpha</strong> &#8211; scalar</li>
    <li><strong>descrA</strong> &#8211; matrix descriptor</li>
    <li><strong>csrValA</strong> &#8211; vector of nonzero values of <cite>A</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; vector of row pointers of <cite>A</cite></li>
    <li><strong>csrColIndA</strong> &#8211; vector of column indices of <cite>A</cite></li>
    <li><strong>info</strong> &#8211; the analysis result from <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.csrsm_analysis" title="accelerate.cuda.sparse.Sparse.csrsm_analysis"><code class="xref py py-meth docutils literal"><span class="pre">csrsm_analysis()</span></code></a></li>
    <li><strong>X</strong> &#8211; dense matrix</li>
    <li><strong>ldx</strong> &#8211; leading dimension of <cite>X</cite></li>
    <li><strong>Y</strong> &#8211; dense matrix</li>
    <li><strong>ldy</strong> &#8211; leading dimension of <cite>Y</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    </div>
    <div class="section" id="extra-functions">
    <h2>Extra Functions<a class="headerlink" href="#extra-functions" title="Permalink to this headline">¶</a></h2>
    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Set up the sparsity pattern for the matrix operation <cite>C = alpha * A + beta *
    B</cite> where <cite>A</cite>, <cite>B</cite>, and <cite>C</cite> are all sparse matrices in CSR format.</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>m</strong> &#8211; number of rows of all matrices</li>
    <li><strong>n</strong> &#8211; number of columns of all matrices</li>
    <li><strong>descrA</strong> &#8211; matrix descriptor for <cite>A</cite></li>
    <li><strong>nnzA</strong> &#8211; number of nonzeroes in <cite>A</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; vector of row pointers of <cite>A</cite></li>
    <li><strong>csrColIndA</strong> &#8211; vector of column indices of <cite>A</cite></li>
    <li><strong>descrB</strong> &#8211; matrix descriptor for <cite>B</cite></li>
    <li><strong>nnzB</strong> &#8211; number of nonzeroes in <cite>B</cite></li>
    <li><strong>csrRowPtrB</strong> &#8211; vector of row pointers of <cite>B</cite></li>
    <li><strong>csrColIndB</strong> &#8211; vector of column indices of <cite>B</cite></li>
    <li><strong>descrC</strong> &#8211; matrix descriptor for <cite>B</cite></li>
    <li><strong>csrRowPtrC</strong> &#8211; vector of row pointers of <cite>C</cite>, written to by this method</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">number of nonzeroes in <cite>C</cite></p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Performs the the matrix operation <cite>C = alpha * A + beta * B</cite> where <cite>A</cite>, <cite>B</cite>,
    and <cite>C</cite> are all sparse matrices in CSR format.</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>m</strong> &#8211; number of rows of all matrices</li>
    <li><strong>n</strong> &#8211; number of columns of all matrices</li>
    <li><strong>alpha</strong> &#8211; scalar</li>
    <li><strong>descrA</strong> &#8211; matrix descriptor for <cite>A</cite></li>
    <li><strong>nnzA</strong> &#8211; number of nonzeroes in <cite>A</cite></li>
    <li><strong>csrValA</strong> &#8211; vector of nonzero values of <cite>A</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; vector of row pointers of <cite>A</cite></li>
    <li><strong>csrColIndA</strong> &#8211; vector of column indices of <cite>A</cite></li>
    <li><strong>beta</strong> &#8211; scalar</li>
    <li><strong>descrB</strong> &#8211; matrix descriptor for <cite>B</cite></li>
    <li><strong>nnzB</strong> &#8211; number of nonzeroes in <cite>B</cite></li>
    <li><strong>csrValB</strong> &#8211; vector of nonzero values of <cite>B</cite></li>
    <li><strong>csrRowPtrB</strong> &#8211; vector of row pointers of <cite>B</cite></li>
    <li><strong>csrColIndB</strong> &#8211; vector of column indices of <cite>B</cite></li>
    <li><strong>descrC</strong> &#8211; matrix descriptor for <cite>B</cite></li>
    <li><strong>csrValC</strong> &#8211; vector of nonzero values of <cite>C</cite></li>
    <li><strong>csrRowPtrC</strong> &#8211; vector of row pointers of <cite>C</cite></li>
    <li><strong>csrColIndC</strong> &#8211; vector of column indices of <cite>C</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Set up the sparsity pattern for the matrix operation <cite>C = op(A) * op(B)</cite>
    where <cite>A</cite>, <cite>B</cite>, and <cite>C</cite> are all sparse matrices in CSR format.</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>transA</strong> &#8211; operation to apply to <cite>A</cite></li>
    <li><strong>transB</strong> &#8211; operation to apply to <cite>B</cite></li>
    <li><strong>m</strong> &#8211; number of rows of <cite>A</cite> and <cite>C</cite></li>
    <li><strong>n</strong> &#8211; number of columns of <cite>B</cite> and <cite>C</cite></li>
    <li><strong>k</strong> &#8211; number of columns/rows of <cite>A</cite>/<cite>B</cite></li>
    <li><strong>descrA</strong> &#8211; matrix descriptor for <cite>A</cite></li>
    <li><strong>nnzA</strong> &#8211; number of nonzeroes in <cite>A</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; vector of row pointers of <cite>A</cite></li>
    <li><strong>csrColIndA</strong> &#8211; vector of column indices of <cite>A</cite></li>
    <li><strong>descrB</strong> &#8211; matrix descriptor for <cite>B</cite></li>
    <li><strong>nnzB</strong> &#8211; number of nonzeroes in <cite>B</cite></li>
    <li><strong>csrRowPtrB</strong> &#8211; vector of row pointers of <cite>B</cite></li>
    <li><strong>csrColIndB</strong> &#8211; vector of column indices of <cite>B</cite></li>
    <li><strong>descrC</strong> &#8211; matrix descriptor for <cite>C</cite></li>
    <li><strong>csrRowPtrC</strong> &#8211; vector of row pointers of <cite>C</cite>, written by this function</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">number of nonzeroes in <cite>C</cite></p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Perform the matrix operation <cite>C = op(A) * op(B)</cite> where <cite>A</cite>, <cite>B</cite>, and <cite>C</cite> are
    all sparse matrices in CSR format.</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>transA</strong> &#8211; operation to apply to <cite>A</cite></li>
    <li><strong>transB</strong> &#8211; operation to apply to <cite>B</cite></li>
    <li><strong>m</strong> &#8211; number of rows of <cite>A</cite> and <cite>C</cite></li>
    <li><strong>n</strong> &#8211; number of columns of <cite>B</cite> and <cite>C</cite></li>
    <li><strong>k</strong> &#8211; number of columns/rows of <cite>A</cite>/<cite>B</cite></li>
    <li><strong>descrA</strong> &#8211; matrix descriptor for <cite>A</cite></li>
    <li><strong>nnzA</strong> &#8211; number of nonzeroes in <cite>A</cite></li>
    <li><strong>csrValA</strong> &#8211; vector of nonzero values in <cite>A</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; vector of row pointers of <cite>A</cite></li>
    <li><strong>csrColIndA</strong> &#8211; vector of column indices of <cite>A</cite></li>
    <li><strong>descrB</strong> &#8211; matrix descriptor for <cite>B</cite></li>
    <li><strong>nnzB</strong> &#8211; number of nonzeroes in <cite>B</cite></li>
    <li><strong>csrValB</strong> &#8211; vector of nonzero values in <cite>B</cite></li>
    <li><strong>csrRowPtrB</strong> &#8211; vector of row pointers of <cite>B</cite></li>
    <li><strong>csrColIndB</strong> &#8211; vector of column indices of <cite>B</cite></li>
    <li><strong>descrC</strong> &#8211; matrix descriptor for <cite>C</cite></li>
    <li><strong>csrValC</strong> &#8211; vector of nonzero values in <cite>C</cite></li>
    <li><strong>csrRowPtrC</strong> &#8211; vector of row pointers of <cite>C</cite></li>
    <li><strong>csrColIndC</strong> &#8211; vector of column indices of <cite>C</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">csrgemm_ez</code><span class="sig-paren">(</span><em>A</em>, <em>B</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></dt>
    <dd><blockquote>
    <div>Performs the matrix operation <cite>C = op(A) * op(B)</cite> where <cite>A</cite>, <cite>B</cite> and <cite>C</cite>
    are all sparse matrices in CSR format. This function accepts and returns
    <a class="reference internal" href="#accelerate.cuda.sparse.CudaCSRMatrix" title="accelerate.cuda.sparse.CudaCSRMatrix"><code class="xref py py-class docutils literal"><span class="pre">accelerate.cuda.sparse.CudaCSRMatrix</span></code></a> matrices, and makes
    calls to <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.XcsrgemmNnz" title="accelerate.cuda.sparse.Sparse.XcsrgemmNnz"><code class="xref py py-meth docutils literal"><span class="pre">XcsrgemmNnz()</span></code></a> and <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.csrgemm" title="accelerate.cuda.sparse.Sparse.csrgemm"><code class="xref py py-meth docutils literal"><span class="pre">csrgemm()</span></code></a>.</div></blockquote>
    <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> &#8211; <a class="reference internal" href="#accelerate.cuda.sparse.CudaCSRMatrix" title="accelerate.cuda.sparse.CudaCSRMatrix"><code class="xref py py-class docutils literal"><span class="pre">accelerate.cuda.sparse.CudaCSRMatrix</span></code></a></li>
    <li><strong>B</strong> &#8211; <a class="reference internal" href="#accelerate.cuda.sparse.CudaCSRMatrix" title="accelerate.cuda.sparse.CudaCSRMatrix"><code class="xref py py-class docutils literal"><span class="pre">accelerate.cuda.sparse.CudaCSRMatrix</span></code></a></li>
    <li><strong>transA</strong> &#8211; optional, operation to apply to <cite>A</cite></li>
    <li><strong>transB</strong> &#8211; optional, operation to apply to <cite>B</cite></li>
    <li><strong>descrA</strong> &#8211; optional, matrix descriptor for <cite>A</cite></li>
    <li><strong>descrB</strong> &#8211; optional, matrix descriptor for <cite>B</cite></li>
    <li><strong>descrC</strong> &#8211; optional, matrix descriptor for <cite>C</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#accelerate.cuda.sparse.CudaCSRMatrix" title="accelerate.cuda.sparse.CudaCSRMatrix"><code class="xref py py-class docutils literal"><span class="pre">accelerate.cuda.sparse.CudaCSRMatrix</span></code></a></p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    </div>
    <div class="section" id="preconditioners">
    <h2>Preconditioners<a class="headerlink" href="#preconditioners" title="Permalink to this headline">¶</a></h2>
    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">csric0</code><span class="sig-paren">(</span><em>trans</em>, <em>m</em>, <em>descr</em>, <em>csrValA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>info</em><span class="sig-paren">)</span></dt>
    <dd><p>Computes incomplete Cholesky factorization of a sparse matrix in CSR format
    with 0 fill-in and no pivoting: <cite>op(A) = R**T * R</cite>. This method must follow a
    call to <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.csrsv_analysis" title="accelerate.cuda.sparse.Sparse.csrsv_analysis"><code class="xref py py-meth docutils literal"><span class="pre">csrsv_analysis()</span></code></a>. The matrix <cite>A</cite> is overwritten with the
    upper or lower triangular factors <cite>R</cite> or <cite>R**T</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>trans</strong> &#8211; operation to apply to the matrix</li>
    <li><strong>m</strong> &#8211; number of rows and columns of the matrix</li>
    <li><strong>descr</strong> &#8211; matrix descriptor</li>
    <li><strong>csrValA</strong> &#8211; vector of nonzero values in <cite>A</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; vector of row pointers of <cite>A</cite></li>
    <li><strong>csrColIndA</strong> &#8211; vector of column indices of <cite>A</cite></li>
    <li><strong>info</strong> &#8211; analysis result</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">csrilu0</code><span class="sig-paren">(</span><em>trans</em>, <em>m</em>, <em>descr</em>, <em>csrValA</em>, <em>csrRowPtrA</em>, <em>csrColIndA</em>, <em>info</em><span class="sig-paren">)</span></dt>
    <dd><p>Computes incomplete-LU factorization of a sparse matrix in CSR format with 0
    fill-in and no pivoting: <cite>op(A) = L * U</cite>. This method must follow a call to
    <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.csrsv_analysis" title="accelerate.cuda.sparse.Sparse.csrsv_analysis"><code class="xref py py-meth docutils literal"><span class="pre">csrsv_analysis()</span></code></a>. The matrix <cite>A</cite> is overwritten with the lower and
    upper triangular factors <cite>L</cite> and <cite>U</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>trans</strong> &#8211; operation to apply to the matrix</li>
    <li><strong>m</strong> &#8211; number of rows and columns of the matrix</li>
    <li><strong>descr</strong> &#8211; matrix descriptor</li>
    <li><strong>csrValA</strong> &#8211; vector of nonzero values in <cite>A</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; vector of row pointers of <cite>A</cite></li>
    <li><strong>csrColIndA</strong> &#8211; vector of column indices of <cite>A</cite></li>
    <li><strong>info</strong> &#8211; analysis result</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Computes the solution of a tridiagonal linear system with multiple right-hand
    sides: <cite>A * Y = 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 simple">
    <li><strong>m</strong> &#8211; the size of the linear system</li>
    <li><strong>n</strong> &#8211; the number of right-hand sides in the system</li>
    <li><strong>dl</strong> &#8211; dense vector storing the lower-diagonal elements</li>
    <li><strong>d</strong> &#8211; dense vector storing the diagonal elements</li>
    <li><strong>du</strong> &#8211; dense vector storing the upper-diagonal elements</li>
    <li><strong>B</strong> &#8211; dense matrix holding the right-hand sides of the system</li>
    <li><strong>ldb</strong> &#8211; the leading dimension of <cite>B</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Similar to <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.gtsv" title="accelerate.cuda.sparse.Sparse.gtsv"><code class="xref py py-meth docutils literal"><span class="pre">gtsv()</span></code></a>, but computes the solution without performing any
    pivoting.</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>m</strong> &#8211; the size of the linear system</li>
    <li><strong>n</strong> &#8211; the number of right-hand sides in the system</li>
    <li><strong>dl</strong> &#8211; dense vector storing the lower-diagonal elements</li>
    <li><strong>d</strong> &#8211; dense vector storing the diagonal elements</li>
    <li><strong>du</strong> &#8211; dense vector storing the upper-diagonal elements</li>
    <li><strong>B</strong> &#8211; dense matrix holding the right-hand sides of the system</li>
    <li><strong>ldb</strong> &#8211; the leading dimension of <cite>B</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Computes the solution of <cite>i</cite> tridiagonal linear systems: <cite>A(i) * y(i) = alpha
    * x(i)</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>m</strong> &#8211; the size of the linear systems</li>
    <li><strong>dl</strong> &#8211; stacked dense vector storing the lower-diagonal elements of each
    system</li>
    <li><strong>d</strong> &#8211; stacked dense vector storing the diagonal elements of each system</li>
    <li><strong>du</strong> &#8211; stacked dense vector storing the upper-diagonal elements of each
    system</li>
    <li><strong>x</strong> &#8211; dense matrix holding the right-hand sides of the systems</li>
    <li><strong>batchCount</strong> &#8211; number of systems to solve</li>
    <li><strong>batchStride</strong> &#8211; number of elements separating the vectors of each system</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    </div>
    <div class="section" id="format-conversion">
    <h2>Format Conversion<a class="headerlink" href="#format-conversion" title="Permalink to this headline">¶</a></h2>
    <dl class="method">
    <dt id="accelerate.cuda.sparse.Sparse.bsr2csr">
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">bsr2csr</code><span class="sig-paren">(</span><em>dirA</em>, <em>mb</em>, <em>nb</em>, <em>descrA</em>, <em>bsrValA</em>, <em>bsrRowPtrA</em>, <em>bsrColIndA</em>, <em>blockDim</em>, <em>descrC</em>, <em>csrValC</em>, <em>csrRowPtrC</em>, <em>csrColIndC</em><span class="sig-paren">)</span><a class="headerlink" href="#accelerate.cuda.sparse.Sparse.bsr2csr" title="Permalink to this definition">¶</a></dt>
    <dd><p>Convert the sparse matrix <cite>A</cite> in BSR format to CSR format, stored in <cite>C</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>dirA</strong> &#8211; row (&#8216;R&#8217;) or column (&#8216;C&#8217;) orientation of block storage</li>
    <li><strong>mb</strong> &#8211; number of block rows of <cite>A</cite></li>
    <li><strong>nb</strong> &#8211; number of block columns of <cite>A</cite></li>
    <li><strong>descrA</strong> &#8211; matrix descriptor for <cite>A</cite></li>
    <li><strong>bsrValA</strong> &#8211; vector of nonzero values of <cite>A</cite></li>
    <li><strong>bsrRowPtrA</strong> &#8211; vector of block row pointers of <cite>A</cite></li>
    <li><strong>bsrColIndA</strong> &#8211; vector of block column indices of <cite>A</cite></li>
    <li><strong>blockDim</strong> &#8211; block dimension of <cite>A</cite></li>
    <li><strong>descrC</strong> &#8211; matrix descriptor for <cite>C</cite></li>
    <li><strong>csrValA</strong> &#8211; vector of nonzero values in <cite>C</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; vector of row pointers of <cite>C</cite></li>
    <li><strong>csrColIndA</strong> &#8211; vector of column indices of <cite>C</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Converts an array containing uncompressed row indices corresponding to the
    COO format into into an array of compressed row pointers corresponding to the
    CSR format.</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>cooRowInd</strong> &#8211; integer array of uncompressed row indices</li>
    <li><strong>nnz</strong> &#8211; number of nonzeroes</li>
    <li><strong>m</strong> &#8211; number of matrix rows</li>
    <li><strong>csrRowPtr</strong> &#8211; vector of row pointers to be written to</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Convert the sparse matrix <cite>A</cite> in CSC format into a dense matrix.</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>m</strong> &#8211; number of rows of <cite>A</cite></li>
    <li><strong>n</strong> &#8211; number of columns of <cite>A</cite></li>
    <li><strong>descrA</strong> &#8211; matrix descriptor for <cite>A</cite></li>
    <li><strong>cscValA</strong> &#8211; values in the CSC representation of <cite>A</cite></li>
    <li><strong>cscRowIndA</strong> &#8211; row indices in the CSC representation of <cite>A</cite></li>
    <li><strong>cscColPtrA</strong> &#8211; column pointers in the CSC representation of <cite>A</cite></li>
    <li><strong>A</strong> &#8211; dense matrix representation of <cite>A</cite> to be written by this function.</li>
    <li><strong>lda</strong> &#8211; leading dimension of <cite>A</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Performs the analysis necessary for converting a matrix in CSR format into
    BSR format.</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>dirA</strong> &#8211; row (&#8216;R&#8217;) or column (&#8216;C&#8217;) orientation of block storage</li>
    <li><strong>m</strong> &#8211; number of rows of matrix</li>
    <li><strong>n</strong> &#8211; number of columns of matrix</li>
    <li><strong>descrA</strong> &#8211; matrix descriptor for input matrix <cite>A</cite></li>
    <li><strong>csrRowPtrA</strong> &#8211; row pointers of matrix</li>
    <li><strong>csrColIndA</strong> &#8211; column indices of matrix</li>
    <li><strong>blockDim</strong> &#8211; block dimension of output matrix <cite>C</cite></li>
    <li><strong>descrC</strong> &#8211; matrix descriptor for output matrix <cite>C</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">number of nonzeroes of matrix</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Performs conversion of a matrix from CSR format into BSR format.</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>dirA</strong> &#8211; row (&#8216;R&#8217;) or column (&#8216;C&#8217;) orientation of block storage</li>
    <li><strong>m</strong> &#8211; number of rows of matrix</li>
    <li><strong>n</strong> &#8211; number of columns of matrix</li>
    <li><strong>descrA</strong> &#8211; matrix descriptor for input matrix <cite>A</cite></li>
    <li><strong>csrValA</strong> &#8211; nonzero values of matrix</li>
    <li><strong>csrRowPtrA</strong> &#8211; row pointers of matrix</li>
    <li><strong>csrColIndA</strong> &#8211; column indices of matrix</li>
    <li><strong>blockDim</strong> &#8211; block dimension of output matrix <cite>C</cite></li>
    <li><strong>descrC</strong> &#8211; matrix descriptor for output matrix <cite>C</cite></li>
    <li><strong>bsrValC</strong> &#8211; nonzero values of output matrix <cite>C</cite></li>
    <li><strong>bsrRowPtrC</strong> &#8211; block row pointers of output matrix <cite>C</cite></li>
    <li><strong>bsrColIndC</strong> &#8211; block column indices of output matrix <cite>C</cite></li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">number of nonzeroes of matrix</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Converts an array of compressed row pointers corresponding to the CSR format
    into an array of uncompressed row indices corresponding to the COO format.</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>csrRowPtr</strong> &#8211; vector of row pointers</li>
    <li><strong>nnz</strong> &#8211; number of nonzeroes</li>
    <li><strong>m</strong> &#8211; number of rows of matrix</li>
    <li><strong>cooRowInd</strong> &#8211; vector of uncompressed row indices written by this function</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Converts a sparse matrix in CSR format into a sparse matrix in CSC format.</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>m</strong> &#8211; number of rows of matrix</li>
    <li><strong>n</strong> &#8211; number of columns of matrix</li>
    <li><strong>nnz</strong> &#8211; number of nonzeroes of the matrix</li>
    <li><strong>csrVal</strong> &#8211; values in the CSR representation</li>
    <li><strong>csrRowPtr</strong> &#8211; row indices in the CSR representation</li>
    <li><strong>csrColInd</strong> &#8211; column pointers in the CSR representation</li>
    <li><strong>cscVal</strong> &#8211; values in the CSC representation</li>
    <li><strong>cscRowInd</strong> &#8211; row indices in the CSC representation</li>
    <li><strong>cscColPtr</strong> &#8211; column pointers in the CSC representation</li>
    <li><strong>copyValues</strong> &#8211; <cite>&#8216;N&#8217;</cite> or <cite>&#8216;S&#8217;</cite> for symbolic or numeric copy of values</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><code class="descname">csr2dense</code><span class="sig-paren">(</span><em>m</em>, <em>n</em>, <em>descr</em>, <em>csrVal</em>, <em>csrRowPtr</em>, <em>csrColInd</em>, <em>A</em>, <em>lda</em><span class="sig-paren">)</span></dt>
    <dd><p>Convert a sparse matrix in CSR format into dense format.</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>m</strong> &#8211; number of rows of matrix</li>
    <li><strong>n</strong> &#8211; number of columns of matrix</li>
    <li><strong>descr</strong> &#8211; matrix descriptor</li>
    <li><strong>csrVal</strong> &#8211; values in the CSR representation</li>
    <li><strong>csrRowPtr</strong> &#8211; row indices in the CSR representation</li>
    <li><strong>csrColInd</strong> &#8211; column pointers in the CSR representation</li>
    <li><strong>A</strong> &#8211; the dense representation, written to by this function</li>
    <li><strong>lda</strong> &#8211; leading dimension of the matrix</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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>cscVal</em>, <em>cscRowInd</em>, <em>cscColPtr</em><span class="sig-paren">)</span></dt>
    <dd><p>Convert a dense matrix into a sparse matrix in CSC format. The <cite>nnzPerCol</cite>
    parameter may be computed with a call to <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.nnz" title="accelerate.cuda.sparse.Sparse.nnz"><code class="xref py py-meth docutils literal"><span class="pre">nnz()</span></code></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">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>m</strong> &#8211; number of rows of matrix</li>
    <li><strong>n</strong> &#8211; number of columns of matrix</li>
    <li><strong>descrA</strong> &#8211; matrix descriptor</li>
    <li><strong>A</strong> &#8211; the matrix in dense format</li>
    <li><strong>lda</strong> &#8211; leading dimension of the matrix</li>
    <li><strong>nnzPerCol</strong> &#8211; array containing the number of nonzero elements per column</li>
    <li><strong>cscVal</strong> &#8211; values in the CSC representation</li>
    <li><strong>cscRowInd</strong> &#8211; row indices in the CSC representation</li>
    <li><strong>cscColPtr</strong> &#8211; column pointers in the CSC representation</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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>csrVal</em>, <em>csrRowPtr</em>, <em>csrColInd</em><span class="sig-paren">)</span></dt>
    <dd><p>Convert a dense matrix into a sparse matrix in CSR format. The <cite>nnzPerRow</cite>
    parameter may be computed with a call to <a class="reference internal" href="#accelerate.cuda.sparse.Sparse.nnz" title="accelerate.cuda.sparse.Sparse.nnz"><code class="xref py py-meth docutils literal"><span class="pre">nnz()</span></code></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">Parameters:</th><td class="field-body"><ul class="first simple">
    <li><strong>m</strong> &#8211; number of rows of matrix</li>
    <li><strong>n</strong> &#8211; number of columns of matrix</li>
    <li><strong>descrA</strong> &#8211; matrix descriptor</li>
    <li><strong>A</strong> &#8211; the matrix in dense format</li>
    <li><strong>lda</strong> &#8211; leading dimension of the matrix</li>
    <li><strong>nnzPerRow</strong> &#8211; array containing the number of nonzero elements per row</li>
    <li><strong>csrVal</strong> &#8211; values in the CSR representation</li>
    <li><strong>csrRowPtr</strong> &#8211; row indices in the CSR representation</li>
    <li><strong>csrColInd</strong> &#8211; column pointers in the CSR representation</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>

    <dl class="method">
    <dt>
    <code class="descclassname">accelerate.cuda.sparse.Sparse.</code><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></dt>
    <dd><p>Computes the number of nonzero elements per row or column of a dense matrix,
    and the total number of nonzero elements in the matrix.</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>dirA</strong> &#8211; <cite>&#8216;R&#8217;</cite> for the number of nonzeroes per row, or <cite>&#8216;C&#8217;</cite> for per
    column.</li>
    <li><strong>m</strong> &#8211; number of rows of matrix</li>
    <li><strong>n</strong> &#8211; number of columns of matrix</li>
    <li><strong>descrA</strong> &#8211; matrix descriptor</li>
    <li><strong>A</strong> &#8211; the matrix</li>
    <li><strong>lda</strong> &#8211; leading dimension of the matrix</li>
    <li><strong>nnzPerRowCol</strong> &#8211; array to contain the number of nonzeroes per row or
    column</li>
    </ul>
    </td>
    </tr>
    <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">total number of nonzeroes in the matrix</p>
    </td>
    </tr>
    </tbody>
    </table>
    </dd></dl>
