matrix.html 177.3 KB
Newer Older
1 2


Y
Yu Yang 已提交
3 4 5 6 7 8 9 10
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
11
    <title>Matrix &#8212; PaddlePaddle  documentation</title>
Y
Yu Yang 已提交
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    
    <link rel="stylesheet" href="../../../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../../',
        VERSION:     '',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../../_static/doctools.js"></script>
    <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
29 30
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />
Y
Yu Yang 已提交
31 32 33 34
    <link rel="top" title="PaddlePaddle  documentation" href="../../../index.html" />
    <link rel="up" title="Matrix" href="index.html" />
    <link rel="next" title="RNN" href="../rnn/index.html" />
    <link rel="prev" title="Matrix" href="index.html" /> 
35 36 37 38 39 40 41 42 43 44
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?b9a314ab40d04d805655aab1deee08ba";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

Y
Yu Yang 已提交
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../rnn/index.html" title="RNN"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Matrix"
             accesskey="P">previous</a> |</li>
62 63 64
        <li class="nav-item nav-item-0"><a href="../../../index.html">PaddlePaddle  documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >Source Code Documents</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Matrix</a> &#187;</li> 
Y
Yu Yang 已提交
65 66 67 68 69 70 71 72 73 74 75 76 77 78
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="matrix">
<h1>Matrix<a class="headerlink" href="#matrix" title="Permalink to this headline"></a></h1>
<div class="section" id="base-matrix">
<h2>Base Matrix<a class="headerlink" href="#base-matrix" title="Permalink to this headline"></a></h2>
<div class="section" id="hl-matrix-h">
<h3>hl_matrix.h<a class="headerlink" href="#hl-matrix-h" title="Permalink to this headline"></a></h3>
79
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
80 81 82 83
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt id="_CPPv213hl_matrix_addP4realP4realP4realii4real4real">
<span id="hl_matrix_add__realP.realP.realP.i.i.real.real"></span><span class="target" id="paddlehl__matrix_8h_1af94d961cf435d03578d9cd4525ba48ab"></span>void <code class="descname">hl_matrix_add</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>B_d</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em>, real <em>alpha</em>, real <em>beta</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv213hl_matrix_addP4realP4realP4realii4real4real" title="Permalink to this definition"></a></dt>
84
<dd><p><a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> addition: C_d[i] = alpha * A_d[i] + beta * B_d[i]. </p>
Y
Yu Yang 已提交
85 86
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
87 88 89 90 91 92 93 94
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: output matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">alpha</span></code>: scalar used for addition. </li>
<li><code class="docutils literal"><span class="pre">beta</span></code>: scalar used for addition. </li>
Y
Yu Yang 已提交
95 96 97 98 99 100 101 102 103
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv217hl_matrix_softmaxP4realP4realii">
<span id="hl_matrix_softmax__realP.realP.i.i"></span><span class="target" id="paddlehl__matrix_8h_1a2a24521b6ff44734fe1252f830ad62da"></span>void <code class="descname">hl_matrix_softmax</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv217hl_matrix_softmaxP4realP4realii" title="Permalink to this definition"></a></dt>
104
<dd><p><a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> Softmax. </p>
Y
Yu Yang 已提交
105 106
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
107 108 109 110 111
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input maxtrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: output matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
Y
Yu Yang 已提交
112 113 114 115 116 117 118 119 120
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv228hl_matrix_softmax_derivativeP4realP4realP4realii">
<span id="hl_matrix_softmax_derivative__realP.realP.realP.i.i"></span><span class="target" id="paddlehl__matrix_8h_1a91ba07275a39ea52fd01e958d3da769e"></span>void <code class="descname">hl_matrix_softmax_derivative</code><span class="sig-paren">(</span>real *<em>grad_d</em>, real *<em>output_d</em>, real *<em>sftmaxSum_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv228hl_matrix_softmax_derivativeP4realP4realP4realii" title="Permalink to this definition"></a></dt>
121
<dd><p><a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> softmax derivative. </p>
Y
Yu Yang 已提交
122 123
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
124 125 126 127 128 129
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">grad_d</span></code>: intput matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">output_d</span></code>: output matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">sftmaxSum_d</span></code>: softmax sum (M * 1). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
Y
Yu Yang 已提交
130 131 132 133 134 135 136 137 138 139 140 141
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv227hl_sequence_softmax_forwardP4realP4realPKii">
<span id="hl_sequence_softmax_forward__realP.realP.iCP.i"></span><span class="target" id="paddlehl__matrix_8h_1ab9159e66b013a2578094a6271ee627ca"></span>void <code class="descname">hl_sequence_softmax_forward</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>C_d</em>, <em class="property">const</em> int *<em>index</em>, int <em>numSequence</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv227hl_sequence_softmax_forwardP4realP4realPKii" title="Permalink to this definition"></a></dt>
<dd><p>Sequence softmax. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
142 143 144 145 146
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input vector. </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: output vector. </li>
<li><code class="docutils literal"><span class="pre">index</span></code>: start positions of sequence. </li>
<li><code class="docutils literal"><span class="pre">numSequence</span></code>: sequence number. </li>
Y
Yu Yang 已提交
147 148 149 150 151 152 153 154 155
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv230hl_matrix_classification_errorP4realPiP4realii">
<span id="hl_matrix_classification_error__realP.iP.realP.i.i"></span><span class="target" id="paddlehl__matrix_8h_1ae51647412d85b1676662207accec9e65"></span>void <code class="descname">hl_matrix_classification_error</code><span class="sig-paren">(</span>real *<em>A_d</em>, int *<em>B_d</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv230hl_matrix_classification_errorP4realPiP4realii" title="Permalink to this definition"></a></dt>
156
<dd><p><a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> classification error. </p>
Y
Yu Yang 已提交
157 158
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
159 160 161 162 163 164
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: input vector (M x 1). </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: output vector (M x 1). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
Y
Yu Yang 已提交
165 166 167 168 169 170 171 172 173
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv223hl_matrix_cross_entropyP4realP4realPiii">
<span id="hl_matrix_cross_entropy__realP.realP.iP.i.i"></span><span class="target" id="paddlehl__matrix_8h_1ac59db01b598326e81f8bc0f08deefdd0"></span>void <code class="descname">hl_matrix_cross_entropy</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>C_d</em>, int *<em>label_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_matrix_cross_entropyP4realP4realPiii" title="Permalink to this definition"></a></dt>
174
<dd><p><a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> cross entropy. </p>
Y
Yu Yang 已提交
175 176
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
177 178 179 180 181 182
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: output matrix (M X 1). </li>
<li><code class="docutils literal"><span class="pre">label_d</span></code>: input matrix (M x 1). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
Y
Yu Yang 已提交
183 184 185 186 187 188 189 190 191
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv226hl_matrix_cross_entropy_bpP4realP4realPiii">
<span id="hl_matrix_cross_entropy_bp__realP.realP.iP.i.i"></span><span class="target" id="paddlehl__matrix_8h_1acfc9df2f26a804c51d84d48a1c8ec483"></span>void <code class="descname">hl_matrix_cross_entropy_bp</code><span class="sig-paren">(</span>real *<em>grad_d</em>, real *<em>output_d</em>, int *<em>label_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv226hl_matrix_cross_entropy_bpP4realP4realPiii" title="Permalink to this definition"></a></dt>
192
<dd><p><a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> cross entropy back propagation. </p>
Y
Yu Yang 已提交
193 194
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">grad_d</span></code>: output matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">output_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">label_d</span></code>: input vector (M x 1). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv236hl_matrix_multi_binary_cross_entropyP4realP4real18hl_sparse_matrix_sii">
<span id="hl_matrix_multi_binary_cross_entropy__realP.realP.hl_sparse_matrix_s.i.i"></span><span class="target" id="paddlehl__matrix_8h_1a7ffe6e6313b0e5b4ac0f36d6218932a8"></span>void <code class="descname">hl_matrix_multi_binary_cross_entropy</code><span class="sig-paren">(</span>real *<em>output</em>, real *<em>entropy</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>mat</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv236hl_matrix_multi_binary_cross_entropyP4realP4real18hl_sparse_matrix_sii" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> multi-binary label cross entropy. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">output</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">entropy</span></code>: output matrix (M x 1). </li>
<li><code class="docutils literal"><span class="pre">mat</span></code>: input sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv239hl_matrix_multi_binary_cross_entropy_bpP4realP4real18hl_sparse_matrix_sii">
<span id="hl_matrix_multi_binary_cross_entropy_bp__realP.realP.hl_sparse_matrix_s.i.i"></span><span class="target" id="paddlehl__matrix_8h_1affcd0e96a22a9368991dedd37d79f2c8"></span>void <code class="descname">hl_matrix_multi_binary_cross_entropy_bp</code><span class="sig-paren">(</span>real *<em>output</em>, real *<em>grad</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>mat</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv239hl_matrix_multi_binary_cross_entropy_bpP4realP4real18hl_sparse_matrix_sii" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> multi-binary label cross entropy backprop. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">output</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">grad</span></code>: output matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">mat</span></code>: input sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
Y
Yu Yang 已提交
237 238 239 240 241 242 243 244 245
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv218hl_matrix_zero_memP4reali">
<span id="hl_matrix_zero_mem__realP.i"></span><span class="target" id="paddlehl__matrix_8h_1ab6bcc5c7bfc0055ccfe9b57df29014ff"></span>void <code class="descname">hl_matrix_zero_mem</code><span class="sig-paren">(</span>real *<em>data</em>, int <em>num</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv218hl_matrix_zero_memP4reali" title="Permalink to this definition"></a></dt>
246
<dd><p><a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> zero memory. </p>
Y
Yu Yang 已提交
247 248
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
249 250 251
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">data</span></code>: input data. </li>
<li><code class="docutils literal"><span class="pre">num</span></code>: length of data. </li>
Y
Yu Yang 已提交
252 253 254 255 256 257 258 259 260 261 262 263
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv221hl_param_relu_forwardP4realP4realP4realiii">
<span id="hl_param_relu_forward__realP.realP.realP.i.i.i"></span><span class="target" id="paddlehl__matrix_8h_1a9877bf2ae81eb8cbba4b8cd097febebe"></span>void <code class="descname">hl_param_relu_forward</code><span class="sig-paren">(</span>real *<em>output</em>, real *<em>input</em>, real *<em>w</em>, int <em>width</em>, int <em>height</em>, int <em>partial_sum</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv221hl_param_relu_forwardP4realP4realP4realiii" title="Permalink to this definition"></a></dt>
<dd><p>parameter relu forward </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
264 265 266 267 268 269 270
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">output</span></code>: output data </li>
<li><code class="docutils literal"><span class="pre">input</span></code>: input data </li>
<li><code class="docutils literal"><span class="pre">w</span></code>: parameter data </li>
<li><code class="docutils literal"><span class="pre">width</span></code>: matrix width </li>
<li><code class="docutils literal"><span class="pre">height</span></code>: matrix height </li>
<li><code class="docutils literal"><span class="pre">partial_sum</span></code>: </li>
Y
Yu Yang 已提交
271 272 273 274 275 276 277 278 279 280 281 282
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv224hl_param_relu_backward_wP4realP4realP4realiii">
<span id="hl_param_relu_backward_w__realP.realP.realP.i.i.i"></span><span class="target" id="paddlehl__matrix_8h_1a1234a3260aaca39945315e97d6f3a58a"></span>void <code class="descname">hl_param_relu_backward_w</code><span class="sig-paren">(</span>real *<em>grad_w</em>, real *<em>grad_o</em>, real *<em>input</em>, int <em>width</em>, int <em>height</em>, int <em>partial_sum</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv224hl_param_relu_backward_wP4realP4realP4realiii" title="Permalink to this definition"></a></dt>
<dd><p>parameter relu backward w </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
283 284 285 286 287 288 289
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">grad_w</span></code>: w grad </li>
<li><code class="docutils literal"><span class="pre">grad_o</span></code>: output grad </li>
<li><code class="docutils literal"><span class="pre">input</span></code>: input data </li>
<li><code class="docutils literal"><span class="pre">width</span></code>: matrix width </li>
<li><code class="docutils literal"><span class="pre">height</span></code>: matrix height </li>
<li><code class="docutils literal"><span class="pre">partial_sum</span></code>: </li>
Y
Yu Yang 已提交
290 291 292 293 294 295 296 297 298 299 300 301
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv227hl_param_relu_backward_diffP4realP4realP4realP4realiii">
<span id="hl_param_relu_backward_diff__realP.realP.realP.realP.i.i.i"></span><span class="target" id="paddlehl__matrix_8h_1a2814e776063b7a0fbb02bbdd8773880e"></span>void <code class="descname">hl_param_relu_backward_diff</code><span class="sig-paren">(</span>real *<em>grad_o</em>, real *<em>input</em>, real *<em>w</em>, real *<em>diff</em>, int <em>width</em>, int <em>height</em>, int <em>partial_sum</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv227hl_param_relu_backward_diffP4realP4realP4realP4realiii" title="Permalink to this definition"></a></dt>
<dd><p>parameter relu backward diff </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
302 303 304 305 306 307 308 309
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">grad_o</span></code>: output grad </li>
<li><code class="docutils literal"><span class="pre">input</span></code>: input data </li>
<li><code class="docutils literal"><span class="pre">w</span></code>: parameter </li>
<li><code class="docutils literal"><span class="pre">diff</span></code>: diff </li>
<li><code class="docutils literal"><span class="pre">width</span></code>: matrix width </li>
<li><code class="docutils literal"><span class="pre">height</span></code>: matrix height </li>
<li><code class="docutils literal"><span class="pre">partial_sum</span></code>: </li>
Y
Yu Yang 已提交
310 311 312 313 314 315 316 317 318 319 320 321
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv29hl_cossimP4realP4realP4realiii4real">
<span id="hl_cossim__realP.realP.realP.i.i.i.real"></span><span class="target" id="paddlehl__matrix_8h_1aafcc4ab68e929b8ebe3c9e057a91d41e"></span>void <code class="descname">hl_cossim</code><span class="sig-paren">(</span>real *<em>output</em>, real *<em>input1</em>, real *<em>input2</em>, int <em>width</em>, int <em>input1_height</em>, int <em>input2_height</em>, real <em>scale</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv29hl_cossimP4realP4realP4realiii4real" title="Permalink to this definition"></a></dt>
<dd><p>cos sim forward </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
322 323 324 325 326 327 328 329
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">output</span></code>: output data </li>
<li><code class="docutils literal"><span class="pre">input1</span></code>: input1 data(matrix) </li>
<li><code class="docutils literal"><span class="pre">input2</span></code>: input2 data(matrix or vector) </li>
<li><code class="docutils literal"><span class="pre">width</span></code>: matrix width </li>
<li><code class="docutils literal"><span class="pre">input1_height</span></code>: input1_height </li>
<li><code class="docutils literal"><span class="pre">input2_height</span></code>: input2_height </li>
<li><code class="docutils literal"><span class="pre">scale</span></code>: scale factor </li>
Y
Yu Yang 已提交
330 331 332 333 334 335 336 337 338 339 340 341
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv220hl_cossim_derivativeP4realP4realP4realP4realP4realP4realiii4real">
<span id="hl_cossim_derivative__realP.realP.realP.realP.realP.realP.i.i.i.real"></span><span class="target" id="paddlehl__matrix_8h_1a87b6812bd6596ef31b4bbc88a3285f7b"></span>void <code class="descname">hl_cossim_derivative</code><span class="sig-paren">(</span>real *<em>grad</em>, real *<em>output</em>, real *<em>prevOutX</em>, real *<em>prevOutY</em>, real *<em>prevGradX</em>, real *<em>prevGradY</em>, int <em>width</em>, int <em>input1_height</em>, int <em>input2_height</em>, real <em>scale</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_cossim_derivativeP4realP4realP4realP4realP4realP4realiii4real" title="Permalink to this definition"></a></dt>
<dd><p>cos sim derivate </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">grad</span></code>: output grad </li>
<li><code class="docutils literal"><span class="pre">output</span></code>: output data </li>
<li><code class="docutils literal"><span class="pre">prevOutX</span></code>: input1 data </li>
<li><code class="docutils literal"><span class="pre">prevOutY</span></code>: input2 data </li>
<li><code class="docutils literal"><span class="pre">prevGradX</span></code>: input1 grad </li>
<li><code class="docutils literal"><span class="pre">prevGradY</span></code>: input2 grad </li>
<li><code class="docutils literal"><span class="pre">width</span></code>: matrix width </li>
<li><code class="docutils literal"><span class="pre">input1_height</span></code>: input1 height </li>
<li><code class="docutils literal"><span class="pre">input2_height</span></code>: input2 height </li>
<li><code class="docutils literal"><span class="pre">scale</span></code>: scale factor </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv225hl_matrix_add_shared_biasP4realP4realKiKiKi4real">
<span id="hl_matrix_add_shared_bias__realP.realP.iC.iC.iC.real"></span><span class="target" id="paddlehl__matrix_8h_1a3697ab4cbde222a0a4bcddd4f80eb758"></span>void <code class="descname">hl_matrix_add_shared_bias</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>B_d</em>, <em class="property">const</em> int <em>channel</em>, <em class="property">const</em> int <em>dimM</em>, <em class="property">const</em> int <em>dimN</em>, real <em>scale</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv225hl_matrix_add_shared_biasP4realP4realKiKiKi4real" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> addition: A_d[i][j] += scale * B_d[j/channel]. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: input matrix (1 x channel). </li>
<li><code class="docutils literal"><span class="pre">channel</span></code>: width of B. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: height of A. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: width of A. </li>
<li><code class="docutils literal"><span class="pre">scale</span></code>: scalar used for addition. </li>
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv229hl_matrix_collect_shared_biasP4realP4realKiKiKi4real">
<span id="hl_matrix_collect_shared_bias__realP.realP.iC.iC.iC.real"></span><span class="target" id="paddlehl__matrix_8h_1ac6de2fdf1034265b8cb464c83931faf1"></span>void <code class="descname">hl_matrix_collect_shared_bias</code><span class="sig-paren">(</span>real *<em>B_d</em>, real *<em>A_d</em>, <em class="property">const</em> int <em>channel</em>, <em class="property">const</em> int <em>dimM</em>, <em class="property">const</em> int <em>dimN</em>, real <em>scale</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv229hl_matrix_collect_shared_biasP4realP4realKiKiKi4real" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> addition: A_d[i][j] += scale * B_d[j/channel]. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">B_d</span></code>: input matrix (1 x channel). </li>
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">channel</span></code>: width of B. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: height of A. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: width of A. </li>
<li><code class="docutils literal"><span class="pre">scale</span></code>: scalar used for addition. </li>
Y
Yu Yang 已提交
391 392 393 394 395 396 397 398 399 400
</ul>
</dd>
</dl>
</p>
</dd></dl>

</div>
</div>
<div class="section" id="hl-matrix-base-h">
<h3>hl_matrix_base.h<a class="headerlink" href="#hl-matrix-base-h" title="Permalink to this headline"></a></h3>
401
<div class="breathe-sectiondef docutils container">
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427
<p class="breathe-sectiondef-title rubric">Defines</p>
<dl class="macro">
<dt id="c.HL_MATRIX_BASE_CUH_">
<span class="target" id="paddlehl__matrix__base_8cuh_1a67d8a477d7b5a74db2fa5dc0767e8075"></span><code class="descname">HL_MATRIX_BASE_CUH_</code><a class="headerlink" href="#c.HL_MATRIX_BASE_CUH_" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.INLINE">
<span class="target" id="paddlehl__matrix__base_8cuh_1a2eb6f9e0395b47b8d5e3eeae4fe0c116"></span><code class="descname">INLINE</code><a class="headerlink" href="#c.INLINE" title="Permalink to this definition"></a></dt>
<dd><p>CPP inline function </p>
</dd></dl>

<dl class="macro">
<dt id="c.DEVICE_FMAX">
<span class="target" id="paddlehl__matrix__base_8cuh_1ad6a9dc784cb0f4b86dd58e3999f1ae3f"></span><code class="descname">DEVICE_FMAX</code><a class="headerlink" href="#c.DEVICE_FMAX" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.DEVICE_FMIN">
<span class="target" id="paddlehl__matrix__base_8cuh_1a8db28c350e8fc2e3bd8caa9a01cbb8c2"></span><code class="descname">DEVICE_FMIN</code><a class="headerlink" href="#c.DEVICE_FMIN" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
<dl class="class">
<dt id="_CPPv26BaseOp">
<span id="BaseOp"></span><span class="target" id="paddleclassBaseOp"></span><em class="property">class </em><code class="descname">BaseOp</code><a class="headerlink" href="#_CPPv26BaseOp" title="Permalink to this definition"></a></dt>
428
<dd><div class="breathe-sectiondef docutils container">
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N6BaseOp6BaseOpEv">
<span id="BaseOp::BaseOp"></span><span class="target" id="paddleclassBaseOp_1aa44e127bf2530e8f59697522f6e5a8dd"></span><code class="descname">BaseOp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6BaseOp6BaseOpEv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6BaseOp6BaseOpEK4real">
<span id="BaseOp::BaseOp__realC"></span><span class="target" id="paddleclassBaseOp_1a3a8384e5959efd4eb4baca65440d4961"></span><code class="descname">BaseOp</code><span class="sig-paren">(</span><em class="property">const</em> real <em>s1</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6BaseOp6BaseOpEK4real" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv2N6BaseOp6BaseOpEK4realK4real">
<span id="BaseOp::BaseOp__realC.realC"></span><span class="target" id="paddleclassBaseOp_1a4ce9fa9425d60ffc3d21e49a218c0166"></span><code class="descname">BaseOp</code><span class="sig-paren">(</span><em class="property">const</em> real <em>s1</em>, <em class="property">const</em> real <em>s2</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N6BaseOp6BaseOpEK4realK4real" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
447
<span class="target" id="paddleclassBaseOp_1adbfbb3003cd1fcd9a07eefbb4548bab9"></span><code class="descname">INLINE vecType BaseOp::vecOp(const vecType a) const</code></dt>
448 449 450 451
<dd></dd></dl>

<dl class="function">
<dt>
452
<span class="target" id="paddleclassBaseOp_1ab0fde1eb4cb0abaea32a2b509ef7e81e"></span><code class="descname">INLINE vecType BaseOp::vecOp(const vecType a, const vecType b) const</code></dt>
453 454 455
<dd></dd></dl>

</div>
456
<div class="breathe-sectiondef docutils container">
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472
<p class="breathe-sectiondef-title rubric">Public Static Attributes</p>
<dl class="member">
<dt id="_CPPv2N6BaseOp3sseE">
<span id="BaseOp::sse__bC"></span><span class="target" id="paddleclassBaseOp_1a2a74e8dc6788c27bd137cf6d2ef3e10e"></span><em class="property">const</em> bool <code class="descname">sse</code><a class="headerlink" href="#_CPPv2N6BaseOp3sseE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="type">
<dt id="_CPPv29aggregate">
<span id="aggregate"></span><span class="target" id="paddlenamespaceaggregate"></span><em class="property">namespace </em><code class="descname">aggregate</code><a class="headerlink" href="#_CPPv29aggregate" title="Permalink to this definition"></a></dt>
<dd><dl class="class">
<dt id="_CPPv2N9aggregate3sumE">
<span id="aggregate::sum"></span><span class="target" id="paddleclassaggregate_1_1sum"></span><em class="property">class </em><code class="descname">sum</code><a class="headerlink" href="#_CPPv2N9aggregate3sumE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from aggregate::SSESum</p>
473
<div class="breathe-sectiondef docutils container">
474 475 476 477 478 479 480 481
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassaggregate_1_1sum_1a6e77f6a29a1f9886db6469a256a01c11"></span><code class="descname">INLINE real aggregate::sum::init()</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
482
<span class="target" id="paddleclassaggregate_1_1sum_1a5d3a33ea74be2e5d4202ff40b36285cd"></span><code class="descname">INLINE real aggregate::sum::operator()(const real a, const real b) const</code></dt>
483 484 485 486 487 488 489 490 491
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv2N9aggregate3maxE">
<span id="aggregate::max"></span><span class="target" id="paddleclassaggregate_1_1max"></span><em class="property">class </em><code class="descname">max</code><a class="headerlink" href="#_CPPv2N9aggregate3maxE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from aggregate::SSEMax</p>
492
<div class="breathe-sectiondef docutils container">
493 494 495 496 497 498 499 500
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassaggregate_1_1max_1a5a75b4206dda12f4b9dc2b627a9bf5f5"></span><code class="descname">INLINE real aggregate::max::init()</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
501
<span class="target" id="paddleclassaggregate_1_1max_1a235d15ae12ba7acdbf70c8a694c7177f"></span><code class="descname">INLINE real aggregate::max::operator()(const real a, const real b) const</code></dt>
502 503 504 505 506 507 508 509 510
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv2N9aggregate3minE">
<span id="aggregate::min"></span><span class="target" id="paddleclassaggregate_1_1min"></span><em class="property">class </em><code class="descname">min</code><a class="headerlink" href="#_CPPv2N9aggregate3minE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from aggregate::SSEMin</p>
511
<div class="breathe-sectiondef docutils container">
512 513 514 515 516 517 518 519
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt>
<span class="target" id="paddleclassaggregate_1_1min_1afbe36dd876775f7da9eb4621365e402b"></span><code class="descname">INLINE real aggregate::min::init()</code></dt>
<dd></dd></dl>

<dl class="function">
<dt>
520
<span class="target" id="paddleclassaggregate_1_1min_1a6c34bce3a2f92949caa5ed9842d20dc0"></span><code class="descname">INLINE real aggregate::min::operator()(const real a, const real b) const</code></dt>
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537
<dd></dd></dl>

</div>
</dd></dl>

</dd></dl>

<dl class="type">
<dt id="_CPPv24base">
<span id="base"></span><span class="target" id="paddlenamespacebase"></span><em class="property">namespace </em><code class="descname">base</code><a class="headerlink" href="#_CPPv24base" title="Permalink to this definition"></a></dt>
<dd><dl class="type">
<dt id="_CPPv2N4base6binaryE">
<span id="base::binary"></span><span class="target" id="paddlenamespacebase_1_1binary"></span><em class="property">namespace </em><code class="descname">binary</code><a class="headerlink" href="#_CPPv2N4base6binaryE" title="Permalink to this definition"></a></dt>
<dd><dl class="class">
<dt id="_CPPv2N4base6binary3addE">
<span id="base::binary::add"></span><span class="target" id="paddleclassbase_1_1binary_1_1add"></span><em class="property">class </em><code class="descname">add</code><a class="headerlink" href="#_CPPv2N4base6binary3addE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from base::binary::SSEAdd</p>
538
<div class="breathe-sectiondef docutils container">
539 540 541
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt>
542
<span class="target" id="paddleclassbase_1_1binary_1_1add_1afb93c269ec13b649a031b59c02fbc87d"></span><code class="descname">INLINE real base::binary::add::operator()(const real a, const real b) const</code></dt>
543 544 545 546 547 548 549 550 551
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv2N4base6binary4add2E">
<span id="base::binary::add2"></span><span class="target" id="paddleclassbase_1_1binary_1_1add2"></span><em class="property">class </em><code class="descname">add2</code><a class="headerlink" href="#_CPPv2N4base6binary4add2E" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from base::binary::SSEAdd2</p>
552
<div class="breathe-sectiondef docutils container">
553 554 555 556 557 558 559 560
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N4base6binary4add24add2EK4realK4real">
<span id="base::binary::add2::add2__realC.realC"></span><span class="target" id="paddleclassbase_1_1binary_1_1add2_1aa3ced688fc9a927755a2f2ae4133552c"></span><code class="descname">add2</code><span class="sig-paren">(</span><em class="property">const</em> real <em>s1</em>, <em class="property">const</em> real <em>s2</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N4base6binary4add24add2EK4realK4real" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
561
<span class="target" id="paddleclassbase_1_1binary_1_1add2_1a79d0bab49889882de19039c9bc63831f"></span><code class="descname">INLINE real base::binary::add2::operator()(const real a, const real b) const</code></dt>
562 563 564
<dd></dd></dl>

</div>
565
<div class="breathe-sectiondef docutils container">
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N4base6binary4add22p1E">
<span id="base::binary::add2::p1__realC"></span><span class="target" id="paddleclassbase_1_1binary_1_1add2_1aef0f8090e1522b6f3ac69324fda7902d"></span><em class="property">const</em> real <code class="descname">p1</code><a class="headerlink" href="#_CPPv2N4base6binary4add22p1E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N4base6binary4add22p2E">
<span id="base::binary::add2::p2__realC"></span><span class="target" id="paddleclassbase_1_1binary_1_1add2_1aea30f14b511695c50faa8ac2c90194ea"></span><em class="property">const</em> real <code class="descname">p2</code><a class="headerlink" href="#_CPPv2N4base6binary4add22p2E" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv2N4base6binary3subE">
<span id="base::binary::sub"></span><span class="target" id="paddleclassbase_1_1binary_1_1sub"></span><em class="property">class </em><code class="descname">sub</code><a class="headerlink" href="#_CPPv2N4base6binary3subE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from base::binary::SSESub</p>
584
<div class="breathe-sectiondef docutils container">
585 586 587
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt>
588
<span class="target" id="paddleclassbase_1_1binary_1_1sub_1aaa82db196fcf891fcce0256921e71fe7"></span><code class="descname">INLINE real base::binary::sub::operator()(const real a, const real b) const</code></dt>
589 590 591 592 593 594 595 596 597
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv2N4base6binary3mulE">
<span id="base::binary::mul"></span><span class="target" id="paddleclassbase_1_1binary_1_1mul"></span><em class="property">class </em><code class="descname">mul</code><a class="headerlink" href="#_CPPv2N4base6binary3mulE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from base::binary::SSEMul</p>
598
<div class="breathe-sectiondef docutils container">
599 600 601
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt>
602
<span class="target" id="paddleclassbase_1_1binary_1_1mul_1ae7b8048342c0ed7bf7d741f1b5407b90"></span><code class="descname">INLINE real base::binary::mul::operator()(const real a, const real b) const</code></dt>
603 604 605 606 607 608 609 610 611
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv2N4base6binary3divE">
<span id="base::binary::div"></span><span class="target" id="paddleclassbase_1_1binary_1_1div"></span><em class="property">class </em><code class="descname">div</code><a class="headerlink" href="#_CPPv2N4base6binary3divE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from base::binary::SSEDiv</p>
612
<div class="breathe-sectiondef docutils container">
613 614 615
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt>
616
<span class="target" id="paddleclassbase_1_1binary_1_1div_1a488a162fa6a360d8eb8b751bbaeb8118"></span><code class="descname">INLINE real base::binary::div::operator()(const real a, const real b) const</code></dt>
617 618 619 620 621 622 623 624 625
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv2N4base6binary11squaredDiffE">
<span id="base::binary::squaredDiff"></span><span class="target" id="paddleclassbase_1_1binary_1_1squaredDiff"></span><em class="property">class </em><code class="descname">squaredDiff</code><a class="headerlink" href="#_CPPv2N4base6binary11squaredDiffE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from base::binary::SSESquaredDiff</p>
626
<div class="breathe-sectiondef docutils container">
627 628 629
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt>
630
<span class="target" id="paddleclassbase_1_1binary_1_1squaredDiff_1a16dffb559330b1a33a3ae8146af5f335"></span><code class="descname">INLINE real base::binary::squaredDiff::operator()(const real a, const real b) const</code></dt>
631 632 633 634 635 636 637 638 639
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv2N4base6binary5firstE">
<span id="base::binary::first"></span><span class="target" id="paddleclassbase_1_1binary_1_1first"></span><em class="property">class </em><code class="descname">first</code><a class="headerlink" href="#_CPPv2N4base6binary5firstE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from base::binary::SSEFirst</p>
640
<div class="breathe-sectiondef docutils container">
641 642 643
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt>
644
<span class="target" id="paddleclassbase_1_1binary_1_1first_1a3071437ca14452cf99e37fb87ce82573"></span><code class="descname">INLINE real base::binary::first::operator()(const real a, const real b) const</code></dt>
645 646 647 648 649 650 651 652 653
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv2N4base6binary6secondE">
<span id="base::binary::second"></span><span class="target" id="paddleclassbase_1_1binary_1_1second"></span><em class="property">class </em><code class="descname">second</code><a class="headerlink" href="#_CPPv2N4base6binary6secondE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from base::binary::SSESecond</p>
654
<div class="breathe-sectiondef docutils container">
655 656 657
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt>
658
<span class="target" id="paddleclassbase_1_1binary_1_1second_1a4584cd58b199b2d0f6500ef21af20d8e"></span><code class="descname">INLINE real base::binary::second::operator()(const real a, const real b) const</code></dt>
659 660 661 662 663 664 665 666 667
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv2N4base6binary19classificationErrorE">
<span id="base::binary::classificationError"></span><span class="target" id="paddleclassbase_1_1binary_1_1classificationError"></span><em class="property">class </em><code class="descname">classificationError</code><a class="headerlink" href="#_CPPv2N4base6binary19classificationErrorE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from base::binary::SSEClassificationError</p>
668
<div class="breathe-sectiondef docutils container">
669 670 671 672 673 674 675 676
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt id="_CPPv2N4base6binary19classificationError19classificationErrorEK4real">
<span id="base::binary::classificationError::classificationError__realC"></span><span class="target" id="paddleclassbase_1_1binary_1_1classificationError_1afb4e217fff21a93ecbc65977dead3e76"></span><code class="descname">classificationError</code><span class="sig-paren">(</span><em class="property">const</em> real <em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv2N4base6binary19classificationError19classificationErrorEK4real" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
677
<span class="target" id="paddleclassbase_1_1binary_1_1classificationError_1a1455395fd5051187047c3efae4542f77"></span><code class="descname">INLINE real base::binary::classificationError::operator()(const real a, const real b) const</code></dt>
678 679 680
<dd></dd></dl>

</div>
681
<div class="breathe-sectiondef docutils container">
682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699
<p class="breathe-sectiondef-title rubric">Private Members</p>
<dl class="member">
<dt id="_CPPv2N4base6binary19classificationError1pE">
<span id="base::binary::classificationError::p__realC"></span><span class="target" id="paddleclassbase_1_1binary_1_1classificationError_1af9c569ea5ede37975c1661cbd3f92fe7"></span><em class="property">const</em> real <code class="descname">p</code><a class="headerlink" href="#_CPPv2N4base6binary19classificationError1pE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
</dd></dl>

</dd></dl>

<dl class="type">
<dt id="_CPPv2N4base5unaryE">
<span id="base::unary"></span><span class="target" id="paddlenamespacebase_1_1unary"></span><em class="property">namespace </em><code class="descname">unary</code><a class="headerlink" href="#_CPPv2N4base5unaryE" title="Permalink to this definition"></a></dt>
<dd><dl class="class">
<dt id="_CPPv2N4base5unary8identityE">
<span id="base::unary::identity"></span><span class="target" id="paddleclassbase_1_1unary_1_1identity"></span><em class="property">class </em><code class="descname">identity</code><a class="headerlink" href="#_CPPv2N4base5unary8identityE" title="Permalink to this definition"></a></dt>
<dd><p>Inherits from base::unary::SSEIdentity</p>
700
<div class="breathe-sectiondef docutils container">
701 702 703
<p class="breathe-sectiondef-title rubric">Public Functions</p>
<dl class="function">
<dt>
704
<span class="target" id="paddleclassbase_1_1unary_1_1identity_1a12efff20f534c8ee3cbd963daf6ba912"></span><code class="descname">INLINE real base::unary::identity::operator()(const real a) const</code></dt>
705 706 707 708 709 710 711 712 713 714 715 716
<dd></dd></dl>

</div>
</dd></dl>

</dd></dl>

</dd></dl>

</div>
<div class="section" id="hl-matrix-apply-cuh">
<h3>hl_matrix_apply.cuh<a class="headerlink" href="#hl-matrix-apply-cuh" title="Permalink to this headline"></a></h3>
717
<div class="breathe-sectiondef docutils container">
718 719 720 721 722 723 724
<p class="breathe-sectiondef-title rubric">Defines</p>
<dl class="macro">
<dt id="c.HL_MATRIX_APPLY_H_">
<span class="target" id="paddlehl__matrix__apply_8cuh_1ae417fc2af4bec7c409b0c30783b18793"></span><code class="descname">HL_MATRIX_APPLY_H_</code><a class="headerlink" href="#c.HL_MATRIX_APPLY_H_" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
725
<div class="breathe-sectiondef docutils container">
726 727 728 729 730 731 732 733 734 735 736
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> T, <em class="property">class</em> Op&gt;</dt>
<dt id="_CPPv221hl_cpu_apply_unary_op2OpP1Tiii">
<span id="hl_cpu_apply_unary_op__Op.TP.i.i.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1a08708ecf2ab986d0b6c6ffe1fdd4faf9"></span>void <code class="descname">hl_cpu_apply_unary_op</code><span class="sig-paren">(</span>Op <em>op</em>, T *<em>A_h</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv221hl_cpu_apply_unary_op2OpP1Tiii" title="Permalink to this definition"></a></dt>
<dd><p>CPU element wise unary operator. </p>
<p>element wise op(a) for 0 &lt;= i &lt; dimM &amp; for 0 &lt;= j &lt; dimN.</p>
<p>
CPU element wise unary operator. <dl class="docutils">
<dt><strong>Parameters</strong></dt>
737 738 739 740 741 742
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">op</span></code>: unary op. see namespace unary </li>
<li><code class="docutils literal"><span class="pre">A_h</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of A.</li>
743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> T, <em class="property">class</em> Op, bool <em>BAsRowVector</em>, bool <em>BAsColVector</em>&gt;</dt>
<dt id="_CPPv222hl_cpu_apply_binary_op2OpP1TP1Tiiii">
<span id="hl_cpu_apply_binary_op__Op.TP.TP.i.i.i.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1a380981873bce8f1101f4a142064871a3"></span>void <code class="descname">hl_cpu_apply_binary_op</code><span class="sig-paren">(</span>Op <em>op</em>, T *<em>A_h</em>, T *<em>B_h</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>lda</em>, int <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv222hl_cpu_apply_binary_op2OpP1TP1Tiiii" title="Permalink to this definition"></a></dt>
<dd><p>CPU element wise binary operator. </p>
<p>element wise op(a, b) for 0 &lt;= i &lt; dimM &amp; for 0 &lt;= j &lt; dimN.</p>
<p>if (BAsRowVector == 0 &amp;&amp; BAsColVector == 0) op(A[i * lda + j], B[i * ldb + j])</p>
<p>if (BAsRowVector == 1 &amp;&amp; BAsColVector == 0) op(A[i * lda + j], B[j])</p>
<p>if (BAsRowVector == 0 &amp;&amp; BAsColVector == 1) op(A[i * lda + j], B[i * ldb])</p>
<p>if (BAsRowVector == 1 &amp;&amp; BAsColVector == 1) op(A[i * lda + j], B[0])</p>
<p>
CPU element wise binary operator. <dl class="docutils">
<dt><strong>Parameters</strong></dt>
763 764 765 766 767 768 769 770
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">op</span></code>: binary op. see namespace binary. </li>
<li><code class="docutils literal"><span class="pre">A_h</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">B_h</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of A. </li>
<li><code class="docutils literal"><span class="pre">ldb</span></code>: leading dimension of B.</li>
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> T, <em class="property">class</em> Op, bool <em>CAsRowVector</em>, bool <em>CAsColVector</em>&gt;</dt>
<dt id="_CPPv223hl_cpu_apply_ternary_op2OpP1TP1TP1Tiiiii">
<span id="hl_cpu_apply_ternary_op__Op.TP.TP.TP.i.i.i.i.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1a9a9ba8b4a8d2b3ded5cf0a28f250440c"></span>void <code class="descname">hl_cpu_apply_ternary_op</code><span class="sig-paren">(</span>Op <em>op</em>, T *<em>A_h</em>, T *<em>B_h</em>, T *<em>C_h</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>lda</em>, int <em>ldb</em>, int <em>ldc</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_cpu_apply_ternary_op2OpP1TP1TP1Tiiiii" title="Permalink to this definition"></a></dt>
<dd><p>CPU element wise ternary operator. </p>
<p>element wise op(a, b, c) for 0 &lt;= i &lt; dimM &amp; for 0 &lt;= j &lt; dimN.</p>
<p>if (CAsRowVector == 0 &amp;&amp; CAsColVector == 0) op(A[i*lda + j], B[i*ldb + j], C[i*ldc + j])</p>
<p>if (CAsRowVector == 1 &amp;&amp; CAsColVector == 0) op(A[i*lda + j], B[i*ldb + j], C[j])</p>
<p>if (CAsRowVector == 0 &amp;&amp; CAsColVector == 1) op(A[i*lda + j], B[i*ldb + j], C[i*ldc])</p>
<p>if (CAsRowVector == 1 &amp;&amp; CAsColVector == 1) op(A[i*lda + j], B[i*ldb + j], C[0])</p>
<p>
CPU element wise ternary operator. <dl class="docutils">
<dt><strong>Parameters</strong></dt>
791 792 793 794 795 796 797 798 799 800
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">op</span></code>: ternary op. see namespace ternary. </li>
<li><code class="docutils literal"><span class="pre">A_h</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">B_h</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">C_h</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of A. </li>
<li><code class="docutils literal"><span class="pre">ldb</span></code>: leading dimension of B. </li>
<li><code class="docutils literal"><span class="pre">ldc</span></code>: leading dimension of C.</li>
801 802 803 804 805 806 807 808 809 810 811 812 813 814 815
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> T, <em class="property">class</em> Op&gt;</dt>
<dt id="_CPPv226hl_cpu_apply_quaternary_op2OpP1TP1TP1TP1Tiiiiii">
<span id="hl_cpu_apply_quaternary_op__Op.TP.TP.TP.TP.i.i.i.i.i.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1ab7e7a8c2a43a003b7ee8df7058be63aa"></span>void <code class="descname">hl_cpu_apply_quaternary_op</code><span class="sig-paren">(</span>Op <em>op</em>, T *<em>A_h</em>, T *<em>B_h</em>, T *<em>C_h</em>, T *<em>D_h</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>lda</em>, int <em>ldb</em>, int <em>ldc</em>, int <em>ldd</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv226hl_cpu_apply_quaternary_op2OpP1TP1TP1TP1Tiiiiii" title="Permalink to this definition"></a></dt>
<dd><p>CPU element wise quaternary operator. element wise op(a, b, c, d) for 0 &lt;= i &lt; dimM &amp; for 0 &lt;= j &lt; dimN. </p>
<p>
CPU element wise quaternary operator. element wise op(a, b, c, d) for 0 &lt;= i &lt; dimM &amp; for 0 &lt;= j &lt; dimN. <dl class="docutils">
<dt><strong>Parameters</strong></dt>
816 817 818 819 820 821 822 823 824 825 826 827
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">op</span></code>: quaternary op. see namespace ternary. </li>
<li><code class="docutils literal"><span class="pre">A_h</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">B_h</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">C_h</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">D_h</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of A. </li>
<li><code class="docutils literal"><span class="pre">ldb</span></code>: leading dimension of B. </li>
<li><code class="docutils literal"><span class="pre">ldc</span></code>: leading dimension of C. </li>
<li><code class="docutils literal"><span class="pre">ldd</span></code>: leading dimension of D.</li>
828 829 830 831 832 833 834 835 836 837 838 839 840 841
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> T, <em class="property">class</em> Op&gt;</dt>
<dt id="_CPPv221hl_gpu_apply_unary_op2OpP1Tiii">
<span id="hl_gpu_apply_unary_op__Op.TP.i.i.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1a19c1f2f06ff010f64d0f30b47508c586"></span>void <code class="descname">hl_gpu_apply_unary_op</code><span class="sig-paren">(</span>Op <em>op</em>, T *<em>A_d</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv221hl_gpu_apply_unary_op2OpP1Tiii" title="Permalink to this definition"></a></dt>
<dd><p>GPU element wise unary operator. element wise op(a) for 0 &lt;= i &lt; dimM &amp; for 0 &lt;= j &lt; dimN. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
842 843 844 845 846 847
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">op</span></code>: unary op. see namespace unary. </li>
<li><code class="docutils literal"><span class="pre">A_d</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of A. </li>
848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> T, <em class="property">class</em> Op, bool <em>BAsRowVector</em>, bool <em>BAsColVector</em>&gt;</dt>
<dt id="_CPPv222hl_gpu_apply_binary_op2OpP1TP1Tiiii">
<span id="hl_gpu_apply_binary_op__Op.TP.TP.i.i.i.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1aedbac51a05fcaf58d38ae8315e936b1d"></span>void <code class="descname">hl_gpu_apply_binary_op</code><span class="sig-paren">(</span>Op <em>op</em>, T *<em>A_d</em>, T *<em>B_d</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>lda</em>, int <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv222hl_gpu_apply_binary_op2OpP1TP1Tiiii" title="Permalink to this definition"></a></dt>
<dd><p>GPU element wise binary operator. </p>
<p>element wise op(a, b) for 0 &lt;= i &lt; dimM &amp; for 0 &lt;= j &lt; dimN</p>
<p>if (BAsRowVector == 0 &amp;&amp; BAsColVector == 0) op(A[i * lda + j], B[i * ldb + j])</p>
<p>if (BAsRowVector == 1 &amp;&amp; BAsColVector == 0) op(A[i * lda + j], B[j])</p>
<p>if (BAsRowVector == 0 &amp;&amp; BAsColVector == 1) op(A[i * lda + j], B[i * ldb])</p>
<p>if (BAsRowVector == 1 &amp;&amp; BAsColVector == 1) op(A[i * lda + j], B[0])</p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
867 868 869 870 871 872 873 874
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">op</span></code>: binary op. see namespace binary. </li>
<li><code class="docutils literal"><span class="pre">A_d</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of A. </li>
<li><code class="docutils literal"><span class="pre">ldb</span></code>: leading dimension of B. </li>
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> T, <em class="property">class</em> Op, bool <em>CAsRowVector</em>, bool <em>CAsColVector</em>&gt;</dt>
<dt id="_CPPv223hl_gpu_apply_ternary_op2OpP1TP1TP1Tiiiii">
<span id="hl_gpu_apply_ternary_op__Op.TP.TP.TP.i.i.i.i.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1a85f248ad2eea38030bfebb34ac375ca2"></span>void <code class="descname">hl_gpu_apply_ternary_op</code><span class="sig-paren">(</span>Op <em>op</em>, T *<em>A_d</em>, T *<em>B_d</em>, T *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>lda</em>, int <em>ldb</em>, int <em>ldc</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_gpu_apply_ternary_op2OpP1TP1TP1Tiiiii" title="Permalink to this definition"></a></dt>
<dd><p>GPU element wise ternary operator. </p>
<p>element wise op(a, b, c) for 0 &lt;= i &lt; dimM &amp; for 0 &lt;= j &lt; dimN.</p>
<p>if (CAsRowVector == 0 &amp;&amp; CAsColVector == 0) op(A[i*lda + j], B[i*ldb + j], C[i*ldc + j])</p>
<p>if (CAsRowVector == 1 &amp;&amp; CAsColVector == 0) op(A[i*lda + j], B[i*ldb + j], C[j])</p>
<p>if (CAsRowVector == 0 &amp;&amp; CAsColVector == 1) op(A[i*lda + j], B[i*ldb + j], C[i*ldc])</p>
<p>if (CAsRowVector == 1 &amp;&amp; CAsColVector == 1) op(A[i*lda + j], B[i*ldb + j], C[0])</p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
894 895 896 897 898 899 900 901 902 903
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">op</span></code>: ternary op. see namespace ternary. </li>
<li><code class="docutils literal"><span class="pre">A_d</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of A. </li>
<li><code class="docutils literal"><span class="pre">ldb</span></code>: leading dimension of B. </li>
<li><code class="docutils literal"><span class="pre">ldc</span></code>: leading dimension of C. </li>
904 905 906 907 908 909 910 911 912 913 914 915 916 917
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> T, <em class="property">class</em> Op&gt;</dt>
<dt id="_CPPv226hl_gpu_apply_quaternary_op2OpP1TP1TP1TP1Tiiiiii">
<span id="hl_gpu_apply_quaternary_op__Op.TP.TP.TP.TP.i.i.i.i.i.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1a7a6b1c4b61a003fc40be7ff96f9ecb83"></span>void <code class="descname">hl_gpu_apply_quaternary_op</code><span class="sig-paren">(</span>Op <em>op</em>, T *<em>A_d</em>, T *<em>B_d</em>, T *<em>C_d</em>, T *<em>D_d</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>lda</em>, int <em>ldb</em>, int <em>ldc</em>, int <em>ldd</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv226hl_gpu_apply_quaternary_op2OpP1TP1TP1TP1Tiiiiii" title="Permalink to this definition"></a></dt>
<dd><p>GPU element wise quaternary operator. element wise op(a, b, c, d) for 0 &lt;= i &lt; dimM &amp; for 0 &lt;= j &lt; dimN. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
918 919 920 921 922 923 924 925 926 927 928 929
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">op</span></code>: quaternary op. see namespace ternary. </li>
<li><code class="docutils literal"><span class="pre">A_d</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">D_d</span></code>: matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of A. </li>
<li><code class="docutils literal"><span class="pre">ldb</span></code>: leading dimension of B. </li>
<li><code class="docutils literal"><span class="pre">ldc</span></code>: leading dimension of C. </li>
<li><code class="docutils literal"><span class="pre">ldd</span></code>: leading dimension of D. </li>
930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv220hl_cpu_matrix_row_op3Agg2Op5SaveriiP4realiP4reali">
<span id="hl_cpu_matrix_row_op__Agg.Op.Saver.i.i.realP.i.realP.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1a4522bef0ce526c1594dd51cb83e4f455"></span>void <code class="descname">hl_cpu_matrix_row_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, int <em>ld</em>, real *<em>A</em>, int <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_cpu_matrix_row_op3Agg2Op5SaveriiP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd><p>CPU matrix row operator. </p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Saver, <em class="property">class</em> Agg, <em class="property">class</em> Op&gt;</dt>
<dt id="_CPPv220hl_cpu_matrix_row_op3Agg2OpiiP4realiP4realiP4reali">
<span id="hl_cpu_matrix_row_op__Agg.Op.i.i.realP.i.realP.i.realP.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1af327cf68ca1317fcdd234e5e22fe2075"></span>void <code class="descname">hl_cpu_matrix_row_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, int <em>ld</em>, real *<em>A</em>, int <em>lda</em>, real *<em>B</em>, int <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_cpu_matrix_row_op3Agg2OpiiP4realiP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd><p>CPU matrix row operator. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
952 953 954 955 956 957 958 959 960 961 962
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">agg</span></code>: aggregate operator expression. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">dst</span></code>: destination matrix. </li>
<li><code class="docutils literal"><span class="pre">ld</span></code>: leading dimension of dst matrix. </li>
<li><code class="docutils literal"><span class="pre">*A</span></code>: matrix A. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of matrix A. </li>
<li><code class="docutils literal"><span class="pre">*B</span></code>: matrix B. </li>
<li><code class="docutils literal"><span class="pre">ldb</span></code>: leading dimension of matrix B. </li>
963 964 965 966 967 968 969 970 971 972 973 974 975 976
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv223hl_cpu_matrix_column_op3Agg2Op5SaveriiP4realP4reali">
<span id="hl_cpu_matrix_column_op__Agg.Op.Saver.i.i.realP.realP.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1aa7e8fdebc7a0793cd141c5d340f0fc47"></span>void <code class="descname">hl_cpu_matrix_column_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_cpu_matrix_column_op3Agg2Op5SaveriiP4realP4reali" title="Permalink to this definition"></a></dt>
<dd><p>CPU matrix column operator. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
977 978 979 980 981 982 983 984 985
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">agg</span></code>: aggregate operator expression. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression. </li>
<li><code class="docutils literal"><span class="pre">sv</span></code>: assignment operator expression. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">dst</span></code>: destination matrix. </li>
<li><code class="docutils literal"><span class="pre">*A</span></code>: matrix A. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of matrix A. </li>
986 987 988 989 990 991 992 993 994 995 996 997 998 999
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv223hl_cpu_matrix_column_op3Agg2Op5SaveriiP4realP4realiP4reali">
<span id="hl_cpu_matrix_column_op__Agg.Op.Saver.i.i.realP.realP.i.realP.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1afdd81d4876da84e53bdac41456620fc7"></span>void <code class="descname">hl_cpu_matrix_column_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em>, real *<em>B</em>, int <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_cpu_matrix_column_op3Agg2Op5SaveriiP4realP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd><p>CPU matrix column operator. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">agg</span></code>: aggregate operator expression. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression. </li>
<li><code class="docutils literal"><span class="pre">sv</span></code>: assignment operator expression. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">dst</span></code>: destination matrix. </li>
<li><code class="docutils literal"><span class="pre">*A</span></code>: matrix A. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of matrix A. </li>
<li><code class="docutils literal"><span class="pre">*B</span></code>: matrix B. </li>
<li><code class="docutils literal"><span class="pre">ldb</span></code>: leading dimension of matrix B. </li>
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv220hl_gpu_matrix_row_op3Agg2Op5SaveriiP4realiP4reali">
<span id="hl_gpu_matrix_row_op__Agg.Op.Saver.i.i.realP.i.realP.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1afd959dca2a86b445fe1381a45a07b2e4"></span>void <code class="descname">hl_gpu_matrix_row_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, int <em>ld</em>, real *<em>A</em>, int <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_gpu_matrix_row_op3Agg2Op5SaveriiP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd><p>GPU matrix row operator. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">agg</span></code>: aggregate operator expression. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression. </li>
<li><code class="docutils literal"><span class="pre">sv</span></code>: assignment operator expression. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">dst</span></code>: destination matrix. </li>
<li><code class="docutils literal"><span class="pre">ld</span></code>: leading dimension of dst. </li>
<li><code class="docutils literal"><span class="pre">*A</span></code>: matrix A. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of matrix A. </li>
1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Saver, <em class="property">class</em> Agg, <em class="property">class</em> Op&gt;</dt>
<dt id="_CPPv220hl_gpu_matrix_row_op3Agg2OpiiP4realiP4realiP4reali">
<span id="hl_gpu_matrix_row_op__Agg.Op.i.i.realP.i.realP.i.realP.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1a2980a6c0fd701f920fa659d6963c24b2"></span>void <code class="descname">hl_gpu_matrix_row_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, int <em>ld</em>, real *<em>A</em>, int <em>lda</em>, real *<em>B</em>, int <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_gpu_matrix_row_op3Agg2OpiiP4realiP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd><p>GPU matrix row operator. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">agg</span></code>: aggregate operator expression. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">dst</span></code>: destination matrix. </li>
<li><code class="docutils literal"><span class="pre">ld</span></code>: leading dimension of dst matrix. </li>
<li><code class="docutils literal"><span class="pre">*A</span></code>: matrix A. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of matrix A. </li>
<li><code class="docutils literal"><span class="pre">*B</span></code>: matrix B. </li>
<li><code class="docutils literal"><span class="pre">ldb</span></code>: leading dimension of matrix B. </li>
1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv223hl_gpu_matrix_column_op3Agg2Op5SaveriiP4realP4reali">
<span id="hl_gpu_matrix_column_op__Agg.Op.Saver.i.i.realP.realP.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1a465f2d79baefdd62eb5b566c82904cd8"></span>void <code class="descname">hl_gpu_matrix_column_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_gpu_matrix_column_op3Agg2Op5SaveriiP4realP4reali" title="Permalink to this definition"></a></dt>
<dd><p>GPU matrix column operator. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1074 1075 1076 1077 1078 1079 1080 1081 1082
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">agg</span></code>: aggregate operator expression. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression. </li>
<li><code class="docutils literal"><span class="pre">sv</span></code>: assignment operator expression. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">dst</span></code>: destination matrix. </li>
<li><code class="docutils literal"><span class="pre">*A</span></code>: matrix A. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of matrix A. </li>
1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv223hl_gpu_matrix_column_op3Agg2Op5SaveriiP4realP4realiP4reali">
<span id="hl_gpu_matrix_column_op__Agg.Op.Saver.i.i.realP.realP.i.realP.i"></span><span class="target" id="paddlehl__matrix__apply_8cuh_1a25afe27a38f74c4f3257efbf89fb8bd5"></span>void <code class="descname">hl_gpu_matrix_column_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em>, real *<em>B</em>, int <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_gpu_matrix_column_op3Agg2Op5SaveriiP4realP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd><p>GPU matrix column operator. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">agg</span></code>: aggregate operator expression. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression. </li>
<li><code class="docutils literal"><span class="pre">sv</span></code>: assignment operator expression. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
<li><code class="docutils literal"><span class="pre">dst</span></code>: destination matrix. </li>
<li><code class="docutils literal"><span class="pre">*A</span></code>: matrix A. </li>
<li><code class="docutils literal"><span class="pre">lda</span></code>: leading dimension of matrix A. </li>
<li><code class="docutils literal"><span class="pre">*B</span></code>: matrix B. </li>
<li><code class="docutils literal"><span class="pre">ldb</span></code>: leading dimension of matrix B. </li>
1108 1109 1110 1111 1112 1113
</ul>
</dd>
</dl>
</p>
</dd></dl>

Y
Yu Yang 已提交
1114 1115 1116 1117
</div>
</div>
<div class="section" id="hl-matrix-ops-cuh">
<h3>hl_matrix_ops.cuh<a class="headerlink" href="#hl-matrix-ops-cuh" title="Permalink to this headline"></a></h3>
1118
<div class="breathe-sectiondef docutils container">
1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162
<p class="breathe-sectiondef-title rubric">Defines</p>
<dl class="macro">
<dt id="c.HL_MATRIX_OPS_CUH_">
<span class="target" id="paddlehl__matrix__ops_8cuh_1ab43c2cfeb337164ef156616ae3dfad96"></span><code class="descname">HL_MATRIX_OPS_CUH_</code><a class="headerlink" href="#c.HL_MATRIX_OPS_CUH_" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.HL_DEVICE">
<span class="target" id="paddlehl__matrix__ops_8cuh_1aa39cc03531ccd6da4e5ea7f64cae5730"></span><code class="descname">HL_DEVICE</code><a class="headerlink" href="#c.HL_DEVICE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.ONE_PARAMETER">
<span class="target" id="paddlehl__matrix__ops_8cuh_1acd0b43a2051cc9668f8fa6df14e63586"></span><code class="descname">ONE_PARAMETER</code><span class="sig-paren">(</span>name<span class="sig-paren">)</span><a class="headerlink" href="#c.ONE_PARAMETER" title="Permalink to this definition"></a></dt>
<dd><p>parameter macro. </p>
</dd></dl>

<dl class="macro">
<dt id="c.TWO_PARAMETER">
<span class="target" id="paddlehl__matrix__ops_8cuh_1ad98ccf41b643f78003b2a9e2d48457e8"></span><code class="descname">TWO_PARAMETER</code><span class="sig-paren">(</span>name<span class="sig-paren">)</span><a class="headerlink" href="#c.TWO_PARAMETER" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.THREE_PARAMETER">
<span class="target" id="paddlehl__matrix__ops_8cuh_1a49bac218909ee1ba63058e5ebd756adf"></span><code class="descname">THREE_PARAMETER</code><span class="sig-paren">(</span>name<span class="sig-paren">)</span><a class="headerlink" href="#c.THREE_PARAMETER" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.FOUR_PARAMETER">
<span class="target" id="paddlehl__matrix__ops_8cuh_1a10c6604cd248e023b5bb54cb5419fc38"></span><code class="descname">FOUR_PARAMETER</code><span class="sig-paren">(</span>name<span class="sig-paren">)</span><a class="headerlink" href="#c.FOUR_PARAMETER" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.DEFINE_MATRIX_UNARY_OP">
<span class="target" id="paddlehl__matrix__ops_8cuh_1a3e136c4e543adf853efb072121262156"></span><code class="descname">DEFINE_MATRIX_UNARY_OP</code><span class="sig-paren">(</span>name, op<span class="sig-paren">)</span><a class="headerlink" href="#c.DEFINE_MATRIX_UNARY_OP" title="Permalink to this definition"></a></dt>
<dd><p>unary operator macro. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>op format: op supports multiple expressions that are separated by a comma. e.g. a, b</dd>
<dt><strong>See</strong></dt>
<dd><p class="first">hl_gpu_apply_unary_op </p>
<p class="last">hl_cpu_apply_unary_op </p>
</dd>
<dt><strong>Parameters</strong></dt>
1163 1164 1165
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">name</span></code>: operator name. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression.</li>
1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="macro">
<dt id="c.DEFINE_MATRIX_UNARY_PARAMETER_OP">
<span class="target" id="paddlehl__matrix__ops_8cuh_1a50bef8590be3ed9203d25a5ec48b6346"></span><code class="descname">DEFINE_MATRIX_UNARY_PARAMETER_OP</code><span class="sig-paren">(</span>name, PARA_MACRO, op<span class="sig-paren">)</span><a class="headerlink" href="#c.DEFINE_MATRIX_UNARY_PARAMETER_OP" title="Permalink to this definition"></a></dt>
<dd><p>unary operator macro. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>op format: op supports multiple expressions that are separated by a comma. e.g. a, b</dd>
<dt><strong>See</strong></dt>
<dd><p class="first">hl_gpu_apply_unary_op </p>
<p class="last">hl_cpu_apply_unary_op </p>
</dd>
<dt><strong>Parameters</strong></dt>
1184 1185 1186 1187
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">name</span></code>: operator name. </li>
<li><code class="docutils literal"><span class="pre">PARA_MACRO</span></code>: parameter macro. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression.</li>
1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="macro">
<dt id="c.DEFINE_MATRIX_BINARY_OP">
<span class="target" id="paddlehl__matrix__ops_8cuh_1ad1180f1a47abbc3cb8a1bf08892f7f86"></span><code class="descname">DEFINE_MATRIX_BINARY_OP</code><span class="sig-paren">(</span>name, op<span class="sig-paren">)</span><a class="headerlink" href="#c.DEFINE_MATRIX_BINARY_OP" title="Permalink to this definition"></a></dt>
<dd><p>binary operator macro. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>op format: op supports multiple expressions that are separated by a comma. e.g. a, b</dd>
<dt><strong>See</strong></dt>
<dd><p class="first">hl_gpu_apply_unary_op </p>
<p class="last">hl_cpu_apply_unary_op </p>
</dd>
<dt><strong>Parameters</strong></dt>
1206 1207 1208
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">name</span></code>: operator name. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression.</li>
1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="macro">
<dt id="c.DEFINE_MATRIX_BINARY_PARAMETER_OP">
<span class="target" id="paddlehl__matrix__ops_8cuh_1acf496b33c502a2268b5a928d6098f49d"></span><code class="descname">DEFINE_MATRIX_BINARY_PARAMETER_OP</code><span class="sig-paren">(</span>name, PARA_MACRO, op<span class="sig-paren">)</span><a class="headerlink" href="#c.DEFINE_MATRIX_BINARY_PARAMETER_OP" title="Permalink to this definition"></a></dt>
<dd><p>binary operator macro. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>op format: op supports multiple expressions that are separated by a comma. e.g. a, b</dd>
<dt><strong>See</strong></dt>
<dd><p class="first">hl_gpu_apply_binary_op </p>
<p class="last">hl_cpu_apply_binary_op </p>
</dd>
<dt><strong>Parameters</strong></dt>
1227 1228 1229 1230
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">name</span></code>: operator name. </li>
<li><code class="docutils literal"><span class="pre">PARA_MACRO</span></code>: parameter macro. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression.</li>
1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="macro">
<dt id="c.DEFINE_MATRIX_TERNARY_OP">
<span class="target" id="paddlehl__matrix__ops_8cuh_1a2ff87c63486965147d82abe4720de8bf"></span><code class="descname">DEFINE_MATRIX_TERNARY_OP</code><span class="sig-paren">(</span>name, op<span class="sig-paren">)</span><a class="headerlink" href="#c.DEFINE_MATRIX_TERNARY_OP" title="Permalink to this definition"></a></dt>
<dd><p>ternary operator macro. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>op format: op supports multiple expressions that are separated by a comma. e.g. a, b, c</dd>
<dt><strong>See</strong></dt>
<dd><p class="first">hl_gpu_apply_ternary_op </p>
<p class="last">hl_cpu_apply_ternary_op </p>
</dd>
<dt><strong>Parameters</strong></dt>
1249 1250 1251
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">name</span></code>: operator name. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression.</li>
1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="macro">
<dt id="c.DEFINE_MATRIX_TERNARY_PARAMETER_OP">
<span class="target" id="paddlehl__matrix__ops_8cuh_1a79c36b780a296c534ee105cc8f4c17ff"></span><code class="descname">DEFINE_MATRIX_TERNARY_PARAMETER_OP</code><span class="sig-paren">(</span>name, PARA_MACRO, op<span class="sig-paren">)</span><a class="headerlink" href="#c.DEFINE_MATRIX_TERNARY_PARAMETER_OP" title="Permalink to this definition"></a></dt>
<dd><p>ternary operator macro. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>op format: op supports multiple expressions that are separated by a comma. e.g. a, b, c</dd>
<dt><strong>See</strong></dt>
<dd><p class="first">hl_gpu_apply_ternary_op </p>
<p class="last">hl_cpu_apply_ternary_op </p>
</dd>
<dt><strong>Parameters</strong></dt>
1270 1271 1272 1273
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">name</span></code>: operator name. </li>
<li><code class="docutils literal"><span class="pre">PARA_MACRO</span></code>: parameter macro. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression.</li>
1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="macro">
<dt id="c.DEFINE_MATRIX_QUATERNARY_OP">
<span class="target" id="paddlehl__matrix__ops_8cuh_1a35680a1cf6e268c713b66d25eb8a9d9f"></span><code class="descname">DEFINE_MATRIX_QUATERNARY_OP</code><span class="sig-paren">(</span>name, op<span class="sig-paren">)</span><a class="headerlink" href="#c.DEFINE_MATRIX_QUATERNARY_OP" title="Permalink to this definition"></a></dt>
<dd><p>quaternary operator macro. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>op format: op supports multiple expressions that are separated by a comma. e.g. a, b, c, d</dd>
<dt><strong>See</strong></dt>
<dd><p class="first">hl_gpu_apply_quaternary_op </p>
<p class="last">hl_cpu_apply_quaternary_op </p>
</dd>
<dt><strong>Parameters</strong></dt>
1292 1293 1294
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">name</span></code>: operator name. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression.</li>
1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="macro">
<dt id="c.DEFINE_MATRIX_QUATERNARY_PARAMETER_OP">
<span class="target" id="paddlehl__matrix__ops_8cuh_1ac4bbbf9b7387ced7783d24e1fd224740"></span><code class="descname">DEFINE_MATRIX_QUATERNARY_PARAMETER_OP</code><span class="sig-paren">(</span>name, PARA_MACRO, op<span class="sig-paren">)</span><a class="headerlink" href="#c.DEFINE_MATRIX_QUATERNARY_PARAMETER_OP" title="Permalink to this definition"></a></dt>
<dd><p>quaternary operator macro. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>op format: op supports multiple expressions that are separated by a comma. e.g. a, b, c, d</dd>
<dt><strong>See</strong></dt>
<dd><p class="first">hl_gpu_apply_quaternary_op </p>
<p class="last">hl_cpu_apply_quaternary_op </p>
</dd>
<dt><strong>Parameters</strong></dt>
1313 1314 1315 1316
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">name</span></code>: operator name. </li>
<li><code class="docutils literal"><span class="pre">PARA_MACRO</span></code>: parameter macro. </li>
<li><code class="docutils literal"><span class="pre">op</span></code>: operator expression.</li>
1317 1318 1319 1320 1321 1322 1323
</ul>
</dd>
</dl>
</p>
</dd></dl>

</div>
Y
Yu Yang 已提交
1324 1325 1326
</div>
<div class="section" id="hl-matrix-type-cuh">
<h3>hl_matrix_type.cuh<a class="headerlink" href="#hl-matrix-type-cuh" title="Permalink to this headline"></a></h3>
1327
<div class="breathe-sectiondef docutils container">
1328 1329 1330 1331 1332 1333 1334
<p class="breathe-sectiondef-title rubric">Defines</p>
<dl class="macro">
<dt id="c.HL_MATRIX_TYPE_CUH_">
<span class="target" id="paddlehl__matrix__type_8cuh_1a7820e8ae9e190ec675acc08cfc40dc1f"></span><code class="descname">HL_MATRIX_TYPE_CUH_</code><a class="headerlink" href="#c.HL_MATRIX_TYPE_CUH_" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1335
<div class="breathe-sectiondef docutils container">
1336 1337 1338 1339 1340 1341 1342
<p class="breathe-sectiondef-title rubric">Typedefs</p>
<dl class="type">
<dt id="_CPPv27vecType">
<span id="vecType"></span><span class="target" id="paddlehl__matrix__type_8cuh_1a59a07de96043f22413b08c0cb9b58238"></span><em class="property">typedef </em>__m128 <code class="descname">vecType</code><a class="headerlink" href="#_CPPv27vecType" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
Y
Yu Yang 已提交
1343 1344 1345
</div>
<div class="section" id="hl-sse-matrix-kernel-cuh">
<h3>hl_sse_matrix_kernel.cuh<a class="headerlink" href="#hl-sse-matrix-kernel-cuh" title="Permalink to this headline"></a></h3>
1346
<div class="breathe-sectiondef docutils container">
1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368
<p class="breathe-sectiondef-title rubric">Defines</p>
<dl class="macro">
<dt id="c.HL_SSE_MATRIX_KERNEL_CUH_">
<span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1aef148f0f94befc5ccf15279c17a15652"></span><code class="descname">HL_SSE_MATRIX_KERNEL_CUH_</code><a class="headerlink" href="#c.HL_SSE_MATRIX_KERNEL_CUH_" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.VECTOR_SIZE">
<span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1a7c78836761fa3b5b124efea237dac70f"></span><code class="descname">VECTOR_SIZE</code><a class="headerlink" href="#c.VECTOR_SIZE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.VECTOR_LEN">
<span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1a284a559c86d6f59eee2f24baa146a77b"></span><code class="descname">VECTOR_LEN</code><a class="headerlink" href="#c.VECTOR_LEN" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.VECTOR_SET">
<span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1a3f5858a833ecd29dc8296a4a58c99206"></span><code class="descname">VECTOR_SET</code><a class="headerlink" href="#c.VECTOR_SET" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
1369
<div class="breathe-sectiondef docutils container">
1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt id="_CPPv214hl_check_align6size_t">
<span id="hl_check_align__s"></span><span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1af6476bd2248ed114b29a29741280733a"></span>bool <code class="descname">hl_check_align</code><span class="sig-paren">(</span>size_t <em>size</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv214hl_check_align6size_t" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="_CPPv214hl_check_alignPv">
<span id="hl_check_align__voidP"></span><span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1ad98bddff356145daa7318445c7d7a577"></span>bool <code class="descname">hl_check_align</code><span class="sig-paren">(</span>void *<em>ptr</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv214hl_check_alignPv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg&gt;</dt>
<dt id="_CPPv29hl_agg_op3Agg7vecType">
<span id="hl_agg_op__Agg.vecType"></span><span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1a1fec08815dfe6b8612622773a209266a"></span>real <code class="descname">hl_agg_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, <a class="reference internal" href="#_CPPv27vecType" title="vecType">vecType</a> <em>mm</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv29hl_agg_op3Agg7vecType" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv220hl_sse_matrix_row_op3Agg2Op5SaveriiP4realiP4reali">
<span id="hl_sse_matrix_row_op__Agg.Op.Saver.i.i.realP.i.realP.i"></span><span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1a09638a36987fae320f558b2cfad88a24"></span>void <code class="descname">hl_sse_matrix_row_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, int <em>ld</em>, real *<em>A</em>, int <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_sse_matrix_row_op3Agg2Op5SaveriiP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv220hl_sse_matrix_row_op3Agg2Op5SaveriiP4realiP4realiP4reali">
<span id="hl_sse_matrix_row_op__Agg.Op.Saver.i.i.realP.i.realP.i.realP.i"></span><span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1a13bae79511e742a36a828969376b02ff"></span>void <code class="descname">hl_sse_matrix_row_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, int <em>ld</em>, real *<em>A</em>, int <em>lda</em>, real *<em>B</em>, int <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_sse_matrix_row_op3Agg2Op5SaveriiP4realiP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv219hl_matrix_column_op3Agg2Op5SaveriiP4realP4reali">
<span id="hl_matrix_column_op__Agg.Op.Saver.i.i.realP.realP.i"></span><span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1ae3ef8f1e0fa012efea29a7dafbef5d1f"></span>void <code class="descname">hl_matrix_column_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv219hl_matrix_column_op3Agg2Op5SaveriiP4realP4reali" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv219hl_matrix_column_op3Agg2Op5SaveriiP4realP4realiP4reali">
<span id="hl_matrix_column_op__Agg.Op.Saver.i.i.realP.realP.i.realP.i"></span><span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1added5025336c4a6770e24973bc535938"></span>void <code class="descname">hl_matrix_column_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em>, real *<em>B</em>, int <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv219hl_matrix_column_op3Agg2Op5SaveriiP4realP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;int <em>MaxRow</em>, <em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv225hl_sse_column_op_with_rem3Agg2Op5SaveriiP4realP4reali">
<span id="hl_sse_column_op_with_rem__Agg.Op.Saver.i.i.realP.realP.i"></span><span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1aca0c8aebbdb76aa63a930fdc82b96e35"></span>void <code class="descname">hl_sse_column_op_with_rem</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv225hl_sse_column_op_with_rem3Agg2Op5SaveriiP4realP4reali" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;int <em>Step</em>, <em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv223hl_sse_matrix_column_op3Agg2Op5SaveriiP4realP4reali">
<span id="hl_sse_matrix_column_op__Agg.Op.Saver.i.i.realP.realP.i"></span><span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1ae2ef119eb57535e8d4835f141697586a"></span>void <code class="descname">hl_sse_matrix_column_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_sse_matrix_column_op3Agg2Op5SaveriiP4realP4reali" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv223hl_sse_matrix_column_op3Agg2Op5SaveriiP4realP4reali">
<span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1a0cbcf70cfa0fcb873190210d22a14832"></span>void <code class="descname">hl_sse_matrix_column_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_sse_matrix_column_op3Agg2Op5SaveriiP4realP4reali" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;int <em>MaxRow</em>, <em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv225hl_sse_column_op_with_rem3Agg2Op5SaveriiP4realP4realiP4reali">
<span id="hl_sse_column_op_with_rem__Agg.Op.Saver.i.i.realP.realP.i.realP.i"></span><span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1ad9de7e07fadd510774d1eea3ec5edc99"></span>void <code class="descname">hl_sse_column_op_with_rem</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em>, real *<em>B</em>, int <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv225hl_sse_column_op_with_rem3Agg2Op5SaveriiP4realP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;int <em>Step</em>, <em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv223hl_sse_matrix_column_op3Agg2Op5SaveriiP4realP4realiP4reali">
<span id="hl_sse_matrix_column_op__Agg.Op.Saver.i.i.realP.realP.i.realP.i"></span><span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1acb12ba175fe1e0bd4dbe1173a28688da"></span>void <code class="descname">hl_sse_matrix_column_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em>, real *<em>B</em>, int <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_sse_matrix_column_op3Agg2Op5SaveriiP4realP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> Agg, <em class="property">class</em> Op, <em class="property">class</em> Saver&gt;</dt>
<dt id="_CPPv223hl_sse_matrix_column_op3Agg2Op5SaveriiP4realP4realiP4reali">
<span class="target" id="paddlehl__sse__matrix__kernel_8cuh_1a2d4bbbb874e2299bbcd548ecda4e85b7"></span>void <code class="descname">hl_sse_matrix_column_op</code><span class="sig-paren">(</span>Agg <em>agg</em>, Op <em>op</em>, Saver <em>sv</em>, int <em>dimM</em>, int <em>dimN</em>, real *<em>dst</em>, real *<em>A</em>, int <em>lda</em>, real *<em>B</em>, int <em>ldb</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_sse_matrix_column_op3Agg2Op5SaveriiP4realP4realiP4reali" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
Y
Yu Yang 已提交
1459 1460 1461
</div>
<div class="section" id="hl-batch-transpose-h">
<h3>hl_batch_transpose.h<a class="headerlink" href="#hl-batch-transpose-h" title="Permalink to this headline"></a></h3>
1462
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1463 1464 1465 1466 1467 1468 1469 1470 1471
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt id="_CPPv214batchTransposePK4realP4realiii">
<span id="batchTranspose__realCP.realP.i.i.i"></span><span class="target" id="paddlehl__batch__transpose_8h_1a3feeb496742f560bf15738c5d83b4c0d"></span>void <code class="descname">batchTranspose</code><span class="sig-paren">(</span><em class="property">const</em> real *<em>input</em>, real *<em>output</em>, int <em>width</em>, int <em>height</em>, int <em>batchSize</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv214batchTransposePK4realP4realiii" title="Permalink to this definition"></a></dt>
<dd><p>Perform matrix transpose for each data in the batch. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>Both the inpt and output are arranged in batch-first order. Each batch has height * width data, which are arranged in height-first (or row-first) manner. </dd>
<dt><strong>Parameters</strong></dt>
1472 1473 1474 1475 1476 1477
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">input</span></code>: height * width elements in batch. </li>
<li><code class="docutils literal"><span class="pre">output</span></code>: height * width elements in batch. </li>
<li><code class="docutils literal"><span class="pre">width</span></code>: width of batch data. </li>
<li><code class="docutils literal"><span class="pre">height</span></code>: height of batch data. </li>
<li><code class="docutils literal"><span class="pre">batchSize</span></code>: batch size</li>
Y
Yu Yang 已提交
1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490
</ul>
</dd>
</dl>
</p>
</dd></dl>

</div>
</div>
</div>
<div class="section" id="sparse-matrix">
<h2>Sparse Matrix<a class="headerlink" href="#sparse-matrix" title="Permalink to this headline"></a></h2>
<div class="section" id="hl-sparse-h">
<h3>hl_sparse.h<a class="headerlink" href="#hl-sparse-h" title="Permalink to this headline"></a></h3>
1491
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
1492 1493 1494 1495 1496 1497 1498
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt id="_CPPv223hl_malloc_sparse_matrixP18hl_sparse_matrix_s18hl_matrix_format_t17hl_matrix_value_tiii">
<span id="hl_malloc_sparse_matrix__hl_sparse_matrix_sP.hl_matrix_format_t.hl_matrix_value_t.i.i.i"></span><span class="target" id="paddlehl__sparse_8h_1aa544f3a16041c569402bf8952ddd6419"></span>void <code class="descname">hl_malloc_sparse_matrix</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> *<em>A_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_matrix_format_t" title="hl_matrix_format_t">hl_matrix_format_t</a> <em>format</em>, <a class="reference internal" href="../utils/utils.html#_CPPv217hl_matrix_value_t" title="hl_matrix_value_t">hl_matrix_value_t</a> <em>value_type</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>nnz</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_malloc_sparse_matrixP18hl_sparse_matrix_s18hl_matrix_format_t17hl_matrix_value_tiii" title="Permalink to this definition"></a></dt>
<dd><p>Malloc a sparse matrix. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1499 1500 1501 1502 1503 1504 1505
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">format</span></code>: format. </li>
<li><code class="docutils literal"><span class="pre">value_type</span></code>: valueType. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: width. </li>
<li><code class="docutils literal"><span class="pre">nnz</span></code>: number of none zero element. </li>
Y
Yu Yang 已提交
1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv221hl_free_sparse_matrix18hl_sparse_matrix_s">
<span id="hl_free_sparse_matrix__hl_sparse_matrix_s"></span><span class="target" id="paddlehl__sparse_8h_1a9ceb0188b80ee35328804ae065836c53"></span>void <code class="descname">hl_free_sparse_matrix</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>A_d</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv221hl_free_sparse_matrix18hl_sparse_matrix_s" title="Permalink to this definition"></a></dt>
<dd><p>Free a sparse matrix. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1518 1519
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: GPU sparse matrix. </li>
Y
Yu Yang 已提交
1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv226hl_construct_sparse_matrixP18hl_sparse_matrix_sPv6size_t18hl_matrix_format_t17hl_matrix_value_tiii">
<span id="hl_construct_sparse_matrix__hl_sparse_matrix_sP.voidP.s.hl_matrix_format_t.hl_matrix_value_t.i.i.i"></span><span class="target" id="paddlehl__sparse_8h_1a844d23d56595e789c95e554b1d85289e"></span>void <code class="descname">hl_construct_sparse_matrix</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> *<em>A_d</em>, void *<em>dest_d</em>, size_t <em>size</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_matrix_format_t" title="hl_matrix_format_t">hl_matrix_format_t</a> <em>format</em>, <a class="reference internal" href="../utils/utils.html#_CPPv217hl_matrix_value_t" title="hl_matrix_value_t">hl_matrix_value_t</a> <em>value_type</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>nnz</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv226hl_construct_sparse_matrixP18hl_sparse_matrix_sPv6size_t18hl_matrix_format_t17hl_matrix_value_tiii" title="Permalink to this definition"></a></dt>
<dd><p>Construct a sparse matrix use input gpu memory. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>Destruct api is hl_destruct_sparse_matrix. </dd>
<dt><strong>Parameters</strong></dt>
1534 1535 1536 1537 1538 1539 1540 1541 1542
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">dest_d</span></code>: gpu memory. </li>
<li><code class="docutils literal"><span class="pre">size</span></code>: size of dest_d. </li>
<li><code class="docutils literal"><span class="pre">format</span></code>: format. </li>
<li><code class="docutils literal"><span class="pre">value_type</span></code>: valueType. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: width. </li>
<li><code class="docutils literal"><span class="pre">nnz</span></code>: number of none zero element.</li>
Y
Yu Yang 已提交
1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv226hl_construct_sparse_matrixP18hl_sparse_matrix_sP4realPiPi18hl_matrix_format_t17hl_matrix_value_tiii">
<span id="hl_construct_sparse_matrix__hl_sparse_matrix_sP.realP.iP.iP.hl_matrix_format_t.hl_matrix_value_t.i.i.i"></span><span class="target" id="paddlehl__sparse_8h_1a0f6f4ace485ce5a894101bd664b9213e"></span>void <code class="descname">hl_construct_sparse_matrix</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> *<em>A_d</em>, real *<em>value_d</em>, int *<em>rows_d</em>, int *<em>cols_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_matrix_format_t" title="hl_matrix_format_t">hl_matrix_format_t</a> <em>format</em>, <a class="reference internal" href="../utils/utils.html#_CPPv217hl_matrix_value_t" title="hl_matrix_value_t">hl_matrix_value_t</a> <em>value_type</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>nnz</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv226hl_construct_sparse_matrixP18hl_sparse_matrix_sP4realPiPi18hl_matrix_format_t17hl_matrix_value_tiii" title="Permalink to this definition"></a></dt>
<dd><p>Use three arrays to construct sparse matrix. </p>
<p>if format is HL_SPARSE_CSR, size of rows_d is dimM + 1, and size of cols_d is nnz;</p>
<p>if format is HL_SPARSE_CSC, size of rows_d is nnz, and size of cols_d is dimN + 1.</p>
<p>if valueType is HL_NO_VALUE, size of value_d is zero, else size of value_d is nnz.</p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>The corresponding destructor interface is hl_destruct_sparse_matrix. </dd>
<dt><strong>Parameters</strong></dt>
1560 1561 1562 1563 1564 1565 1566 1567 1568 1569
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">value_d</span></code>: value. </li>
<li><code class="docutils literal"><span class="pre">rows_d</span></code>: row. </li>
<li><code class="docutils literal"><span class="pre">cols_d</span></code>: col. </li>
<li><code class="docutils literal"><span class="pre">format</span></code>: format. </li>
<li><code class="docutils literal"><span class="pre">value_type</span></code>: valueType. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: width. </li>
<li><code class="docutils literal"><span class="pre">nnz</span></code>: number of none zero element.</li>
Y
Yu Yang 已提交
1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv225hl_destruct_sparse_matrix18hl_sparse_matrix_s">
<span id="hl_destruct_sparse_matrix__hl_sparse_matrix_s"></span><span class="target" id="paddlehl__sparse_8h_1acf2df4bbc22f2777696214a8adc26fc6"></span>void <code class="descname">hl_destruct_sparse_matrix</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>A_d</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv225hl_destruct_sparse_matrix18hl_sparse_matrix_s" title="Permalink to this definition"></a></dt>
<dd><p>Destruct sparse matrix. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1582 1583
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: sparse matrix. </li>
Y
Yu Yang 已提交
1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv220hl_memcpy_csr_matrix18hl_sparse_matrix_sP4realPiPi11hl_stream_t">
<span id="hl_memcpy_csr_matrix__hl_sparse_matrix_s.realP.iP.iP.hl_stream_t"></span><span class="target" id="paddlehl__sparse_8h_1a19e4d815ad564f053e2e429a58e0df0a"></span>void <code class="descname">hl_memcpy_csr_matrix</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>csr_matrix</em>, real *<em>csr_val</em>, int *<em>csr_row</em>, int *<em>csr_col</em>, <a class="reference internal" href="../utils/utils.html#_CPPv211hl_stream_t" title="hl_stream_t">hl_stream_t</a> <em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_memcpy_csr_matrix18hl_sparse_matrix_sP4realPiPi11hl_stream_t" title="Permalink to this definition"></a></dt>
<dd><p>Copy value &amp; index to sparse matrix. </p>
<p>if csr_matrix is HL_FLOAT_VALUE.</p>
<p><ol class="arabic simple">
<li>csr_val, csr_row, csr_col three pointers are not null.</li>
<li>csr_val is not null, csr_row adn csr_col are null.</li>
</ol>
</p>
<p>if csr_matrix is HL_NO_VALUE.</p>
<p><ol class="arabic simple">
<li>csr_val will be ignore, csr_row and csr_col are not null.</li>
</ol>
</p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1607 1608 1609 1610 1611 1612
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">csr_matrix</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">csr_val</span></code>: point to csr value array(nnz). </li>
<li><code class="docutils literal"><span class="pre">csr_row</span></code>: point to csr row indices array(dimM+1). </li>
<li><code class="docutils literal"><span class="pre">csr_col</span></code>: point to csr col indices array(nnz). </li>
<li><code class="docutils literal"><span class="pre">stream</span></code>: hl_stream_t type. </li>
Y
Yu Yang 已提交
1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv220hl_memcpy_csc_matrix18hl_sparse_matrix_sP4realPiPi11hl_stream_t">
<span id="hl_memcpy_csc_matrix__hl_sparse_matrix_s.realP.iP.iP.hl_stream_t"></span><span class="target" id="paddlehl__sparse_8h_1a3077840238758df81c60effdf68d52b2"></span>void <code class="descname">hl_memcpy_csc_matrix</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>csc_matrix</em>, real *<em>csc_val</em>, int *<em>csc_row</em>, int *<em>csc_col</em>, <a class="reference internal" href="../utils/utils.html#_CPPv211hl_stream_t" title="hl_stream_t">hl_stream_t</a> <em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_memcpy_csc_matrix18hl_sparse_matrix_sP4realPiPi11hl_stream_t" title="Permalink to this definition"></a></dt>
<dd><p>Copy value &amp; index to sparse matrix. </p>
<p>if csr_matrix is HL_FLOAT_VALUE.</p>
<p><ol class="arabic simple">
<li>csc_val, csc_row, csc_col three pointers are not null.</li>
<li>csc_val is not null, csc_row and csc_col are null.</li>
</ol>
</p>
<p>if csr_matrix is HL_NO_VALUE.</p>
<p><ol class="arabic simple">
<li>csc_val will be ignore, csc_row and csc_col are not null.</li>
</ol>
</p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1636 1637 1638 1639 1640 1641
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">csc_matrix</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">csc_val</span></code>: point to csc value array(nnz). </li>
<li><code class="docutils literal"><span class="pre">csc_row</span></code>: point to csc row indices array(nnz). </li>
<li><code class="docutils literal"><span class="pre">csc_col</span></code>: point to csc col indices array(dimN+1). </li>
<li><code class="docutils literal"><span class="pre">stream</span></code>: hl_stream_t type. </li>
Y
Yu Yang 已提交
1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv223hl_memcpy_sparse_matrix18hl_sparse_matrix_s18hl_sparse_matrix_s11hl_stream_t">
<span id="hl_memcpy_sparse_matrix__hl_sparse_matrix_s.hl_sparse_matrix_s.hl_stream_t"></span><span class="target" id="paddlehl__sparse_8h_1a6a20b0ac3985729fefb7a33c18fa9eea"></span>void <code class="descname">hl_memcpy_sparse_matrix</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>dst</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>src</em>, <a class="reference internal" href="../utils/utils.html#_CPPv211hl_stream_t" title="hl_stream_t">hl_stream_t</a> <em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_memcpy_sparse_matrix18hl_sparse_matrix_s18hl_sparse_matrix_s11hl_stream_t" title="Permalink to this definition"></a></dt>
<dd><p>Copy sparse matrix to sparse matrix. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>1. Format of the src matrix and dst matrix needs to be consistent.<ol class="arabic simple">
<li>Source matrix has value, the destination matrix has value or no value can be; the source matrix is no value, then the destination matrix must also be no value; </li>
</ol>
</dd>
<dt><strong>Parameters</strong></dt>
1659 1660 1661 1662
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">dst</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">src</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">stream</span></code>: hl_stream_t type.</li>
Y
Yu Yang 已提交
1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv219hl_matrix_csr2dense18hl_sparse_matrix_sP4realii">
<span id="hl_matrix_csr2dense__hl_sparse_matrix_s.realP.i.i"></span><span class="target" id="paddlehl__sparse_8h_1ad053f3c2cb45ac6ea87e2c915258b35e"></span>void <code class="descname">hl_matrix_csr2dense</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>A_d</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv219hl_matrix_csr2dense18hl_sparse_matrix_sP4realii" title="Permalink to this definition"></a></dt>
<dd><p>csr matrix to dense matrix. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1675 1676 1677 1678 1679
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: csr matrix. </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: width. </li>
Y
Yu Yang 已提交
1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv219hl_matrix_csc2dense18hl_sparse_matrix_sP4realii">
<span id="hl_matrix_csc2dense__hl_sparse_matrix_s.realP.i.i"></span><span class="target" id="paddlehl__sparse_8h_1a1ffbf18752d64f063fcd614639a06e1f"></span>void <code class="descname">hl_matrix_csc2dense</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>A_d</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv219hl_matrix_csc2dense18hl_sparse_matrix_sP4realii" title="Permalink to this definition"></a></dt>
<dd><p>csc matrix to dense matrix. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1692 1693 1694 1695 1696
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: csc matrix. </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: width. </li>
Y
Yu Yang 已提交
1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv223hl_matrix_csr_mul_dense18hl_sparse_matrix_s13hl_trans_op_tP4real13hl_trans_op_tP4realiii4real4real">
<span id="hl_matrix_csr_mul_dense__hl_sparse_matrix_s.hl_trans_op_t.realP.hl_trans_op_t.realP.i.i.i.real.real"></span><span class="target" id="paddlehl__sparse_8h_1aafdfc7333b17388c78b5dd5b72517ddb"></span>void <code class="descname">hl_matrix_csr_mul_dense</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>A_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv213hl_trans_op_t" title="hl_trans_op_t">hl_trans_op_t</a> <em>transa</em>, real *<em>B_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv213hl_trans_op_t" title="hl_trans_op_t">hl_trans_op_t</a> <em>transb</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>dimK</em>, real <em>alpha</em>, real <em>beta</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_matrix_csr_mul_dense18hl_sparse_matrix_s13hl_trans_op_tP4real13hl_trans_op_tP4realiii4real4real" title="Permalink to this definition"></a></dt>
<dd><p>C_d = alpha*(op(A_d) * op(B_d)) + beta*C_d. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>transb is not support HPPL_OP_T. </dd>
<dt><strong>Parameters</strong></dt>
1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: csr sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">transa</span></code>: operation op(A) that is non-or transpose. </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">transb</span></code>: operation op(B) that is non-or transpose. </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height of op(A) &amp; C </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width of op(B) &amp; C </li>
<li><code class="docutils literal"><span class="pre">dimK</span></code>: width of op(A) &amp; height of op(B) </li>
<li><code class="docutils literal"><span class="pre">alpha</span></code>: scalar used for multiplication. </li>
<li><code class="docutils literal"><span class="pre">beta</span></code>: scalar used for multiplication. If beta is zero, C does not have to be a valid input.</li>
Y
Yu Yang 已提交
1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv223hl_matrix_csc_mul_dense18hl_sparse_matrix_s13hl_trans_op_tP4real13hl_trans_op_tP4realiii4real4real">
<span id="hl_matrix_csc_mul_dense__hl_sparse_matrix_s.hl_trans_op_t.realP.hl_trans_op_t.realP.i.i.i.real.real"></span><span class="target" id="paddlehl__sparse_8h_1ae66cd04cb80a69d770f445bd90e849b9"></span>void <code class="descname">hl_matrix_csc_mul_dense</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>A_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv213hl_trans_op_t" title="hl_trans_op_t">hl_trans_op_t</a> <em>transa</em>, real *<em>B_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv213hl_trans_op_t" title="hl_trans_op_t">hl_trans_op_t</a> <em>transb</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>dimK</em>, real <em>alpha</em>, real <em>beta</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_matrix_csc_mul_dense18hl_sparse_matrix_s13hl_trans_op_tP4real13hl_trans_op_tP4realiii4real4real" title="Permalink to this definition"></a></dt>
<dd><p>C_d = alpha*(op(A_d) * op(B_d)) + beta*C_d. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>transb is not support HPPL_OP_T. </dd>
<dt><strong>Parameters</strong></dt>
1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">transa</span></code>: operation op(A) that is non-or transpose. </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">transb</span></code>: operation op(B) that is non-or transpose. </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height of op(A) &amp; C </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width of op(B) &amp; C </li>
<li><code class="docutils literal"><span class="pre">dimK</span></code>: width of op(A) &amp; height of op(B) </li>
<li><code class="docutils literal"><span class="pre">alpha</span></code>: scalar used for multiplication. </li>
<li><code class="docutils literal"><span class="pre">beta</span></code>: scalar used for multiplication. If beta is zero, C does not have to be a valid input.</li>
Y
Yu Yang 已提交
1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv223hl_matrix_dense_mul_cscP4real13hl_trans_op_t18hl_sparse_matrix_s13hl_trans_op_tP4realiii4real4real">
<span id="hl_matrix_dense_mul_csc__realP.hl_trans_op_t.hl_sparse_matrix_s.hl_trans_op_t.realP.i.i.i.real.real"></span><span class="target" id="paddlehl__sparse_8h_1a309418bd991805ebc324f2f2cf289128"></span>void <code class="descname">hl_matrix_dense_mul_csc</code><span class="sig-paren">(</span>real *<em>A_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv213hl_trans_op_t" title="hl_trans_op_t">hl_trans_op_t</a> <em>transa</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>B_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv213hl_trans_op_t" title="hl_trans_op_t">hl_trans_op_t</a> <em>transb</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>dimK</em>, real <em>alpha</em>, real <em>beta</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_matrix_dense_mul_cscP4real13hl_trans_op_t18hl_sparse_matrix_s13hl_trans_op_tP4realiii4real4real" title="Permalink to this definition"></a></dt>
<dd><p>C_d = alpha*(op(A_d) * op(B_d)) + beta*C_d. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>transa is not support HPPL_OP_T. </dd>
<dt><strong>Parameters</strong></dt>
1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">transa</span></code>: operation op(A) that is non-or transpose. </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: csc sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">transb</span></code>: operation op(B) that is non-or transpose. </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height of op(A) &amp; C </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width of op(B) &amp; C </li>
<li><code class="docutils literal"><span class="pre">dimK</span></code>: width of op(A) &amp; height of op(B) </li>
<li><code class="docutils literal"><span class="pre">alpha</span></code>: scalar used for multiplication. </li>
<li><code class="docutils literal"><span class="pre">beta</span></code>: scalar used for multiplication. If beta is zero, C does not have to be a valid input.</li>
Y
Yu Yang 已提交
1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv220hl_sparse_matrix_mulP4real13hl_trans_op_tP4real13hl_trans_op_t18hl_sparse_matrix_siii4real4real">
<span id="hl_sparse_matrix_mul__realP.hl_trans_op_t.realP.hl_trans_op_t.hl_sparse_matrix_s.i.i.i.real.real"></span><span class="target" id="paddlehl__sparse_8h_1abb4a9d1a801b6a915b5be5e8273a6a93"></span>void <code class="descname">hl_sparse_matrix_mul</code><span class="sig-paren">(</span>real *<em>A_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv213hl_trans_op_t" title="hl_trans_op_t">hl_trans_op_t</a> <em>transa</em>, real *<em>B_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv213hl_trans_op_t" title="hl_trans_op_t">hl_trans_op_t</a> <em>transb</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>C_d</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>dimK</em>, real <em>alpha</em>, real <em>beta</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_sparse_matrix_mulP4real13hl_trans_op_tP4real13hl_trans_op_t18hl_sparse_matrix_siii4real4real" title="Permalink to this definition"></a></dt>
<dd><p>C_d = alpha*(op(A_d) * op(B_d)) + beta*C_d. Calculated based on the non-zero elements of the matrix C. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>transb is not support HPPL_OP_T. </dd>
<dt><strong>Parameters</strong></dt>
1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">transa</span></code>: operation op(A) that is non-or transpose. </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">transb</span></code>: operation op(B) that is non-or transpose. </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height of op(A) &amp; C </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width of op(B) &amp; C </li>
<li><code class="docutils literal"><span class="pre">dimK</span></code>: width of op(A) &amp; height of op(B) </li>
<li><code class="docutils literal"><span class="pre">alpha</span></code>: scalar used for multiplication. </li>
<li><code class="docutils literal"><span class="pre">beta</span></code>: scalar used for multiplication.</li>
Y
Yu Yang 已提交
1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv223hl_matrix_dense_mul_csrP4real13hl_trans_op_t18hl_sparse_matrix_s13hl_trans_op_tP4realiii4real4real">
<span id="hl_matrix_dense_mul_csr__realP.hl_trans_op_t.hl_sparse_matrix_s.hl_trans_op_t.realP.i.i.i.real.real"></span><span class="target" id="paddlehl__sparse_8h_1a60b4369a31996fb6a44ee65a6ec12f1a"></span>void <code class="descname">hl_matrix_dense_mul_csr</code><span class="sig-paren">(</span>real *<em>A_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv213hl_trans_op_t" title="hl_trans_op_t">hl_trans_op_t</a> <em>transa</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>B_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv213hl_trans_op_t" title="hl_trans_op_t">hl_trans_op_t</a> <em>transb</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em>, int <em>dimK</em>, real <em>alpha</em>, real <em>beta</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_matrix_dense_mul_csrP4real13hl_trans_op_t18hl_sparse_matrix_s13hl_trans_op_tP4realiii4real4real" title="Permalink to this definition"></a></dt>
<dd><p>C_d = alpha*(op(A_d) * op(B_d)) + beta*C_d. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>transa is not support HPPL_OP_T. </dd>
<dt><strong>Parameters</strong></dt>
1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">transa</span></code>: operation op(A) that is non-or transpose. </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">transb</span></code>: operation op(B) that is non-or transpose. </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height of op(A) &amp; C </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width of op(B) &amp; C </li>
<li><code class="docutils literal"><span class="pre">dimK</span></code>: width of op(A) &amp; height of op(B) </li>
<li><code class="docutils literal"><span class="pre">alpha</span></code>: scalar used for multiplication. </li>
<li><code class="docutils literal"><span class="pre">beta</span></code>: scalar used for multiplication. If beta is zero, C does not have to be a valid input.</li>
Y
Yu Yang 已提交
1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv225hl_memcpy_from_csc_matrixP4real6size_tPi6size_tPi6size_t18hl_sparse_matrix_s11hl_stream_t">
<span id="hl_memcpy_from_csc_matrix__realP.s.iP.s.iP.s.hl_sparse_matrix_s.hl_stream_t"></span><span class="target" id="paddlehl__sparse_8h_1a27ff693d3630269554c6c9f693739ed6"></span>void <code class="descname">hl_memcpy_from_csc_matrix</code><span class="sig-paren">(</span>real *<em>csc_val</em>, size_t <em>val_size</em>, int *<em>csc_row</em>, size_t <em>row_size</em>, int *<em>csc_col</em>, size_t <em>col_size</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>csc_matrix</em>, <a class="reference internal" href="../utils/utils.html#_CPPv211hl_stream_t" title="hl_stream_t">hl_stream_t</a> <em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv225hl_memcpy_from_csc_matrixP4real6size_tPi6size_tPi6size_t18hl_sparse_matrix_s11hl_stream_t" title="Permalink to this definition"></a></dt>
<dd><p>Memcpy csc_matrix to host. </p>
<p>a. according to csc_matrix, update three arrays</p>
<p><ol class="arabic simple">
<li>csc_val, csc_row, csc_col are dest Address.</li>
<li>if type of csc_matrix is HL_NO_VALUE, update csc_row and csc_col</li>
<li>if type of csc_matrix is HL_FLOAT_VALUE, update csc_row, csc_col and csc_value.</li>
</ol>
</p>
<p>b. The interface is asynchronous copy. To ensure that the data is copied please call the synchronous interface;</p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1842 1843 1844 1845 1846 1847 1848 1849 1850
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">csc_val</span></code>: point to csc value array(nnz). </li>
<li><code class="docutils literal"><span class="pre">val_size</span></code>: csc value size. </li>
<li><code class="docutils literal"><span class="pre">csc_row</span></code>: point to csc row indices array(nnz). </li>
<li><code class="docutils literal"><span class="pre">row_size</span></code>: csc row size. </li>
<li><code class="docutils literal"><span class="pre">csc_col</span></code>: point to csc col indices array(dimN + 1). </li>
<li><code class="docutils literal"><span class="pre">col_size</span></code>: csc column size. </li>
<li><code class="docutils literal"><span class="pre">csc_matrix</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">stream</span></code>: hl_stream_t type. </li>
Y
Yu Yang 已提交
1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv225hl_memcpy_from_csr_matrixP4real6size_tPi6size_tPi6size_t18hl_sparse_matrix_s11hl_stream_t">
<span id="hl_memcpy_from_csr_matrix__realP.s.iP.s.iP.s.hl_sparse_matrix_s.hl_stream_t"></span><span class="target" id="paddlehl__sparse_8h_1a4e6e828efbf785a2ee1348ecc4685188"></span>void <code class="descname">hl_memcpy_from_csr_matrix</code><span class="sig-paren">(</span>real *<em>csr_val</em>, size_t <em>val_size</em>, int *<em>csr_row</em>, size_t <em>row_size</em>, int *<em>csr_col</em>, size_t <em>col_size</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>csr_matrix</em>, <a class="reference internal" href="../utils/utils.html#_CPPv211hl_stream_t" title="hl_stream_t">hl_stream_t</a> <em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv225hl_memcpy_from_csr_matrixP4real6size_tPi6size_tPi6size_t18hl_sparse_matrix_s11hl_stream_t" title="Permalink to this definition"></a></dt>
<dd><p>Memcpy sparse matrix to host. </p>
<p>a. according to csr_matrix, update three arrays</p>
<p><ol class="arabic simple">
<li>csr_val, csr_row, csr_col are dest Address.</li>
<li>if type of csr_matrix is HL_NO_VALUE, update csr_row and csr_col</li>
<li>if type of csr_matrix is HL_FLOAT_VALUE, update csr_row, csr_col and csr_value</li>
</ol>
</p>
<p>b. The interface is asynchronous copy. To ensure that the data is copied please call the synchronous interface;</p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1871 1872 1873 1874 1875 1876 1877 1878 1879
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">csr_val</span></code>: point to csr value array(nnz). </li>
<li><code class="docutils literal"><span class="pre">val_size</span></code>: csr value size. </li>
<li><code class="docutils literal"><span class="pre">csr_row</span></code>: point to csr row indices array(nnz). </li>
<li><code class="docutils literal"><span class="pre">row_size</span></code>: csr row size. </li>
<li><code class="docutils literal"><span class="pre">csr_col</span></code>: point to csr col indices array(dimN + 1). </li>
<li><code class="docutils literal"><span class="pre">col_size</span></code>: csr column size. </li>
<li><code class="docutils literal"><span class="pre">csr_matrix</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">stream</span></code>: hl_stream_t type. </li>
Y
Yu Yang 已提交
1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv227hl_sparse_matrix_column_sumP4real18hl_sparse_matrix_sii4real">
<span id="hl_sparse_matrix_column_sum__realP.hl_sparse_matrix_s.i.i.real"></span><span class="target" id="paddlehl__sparse_8h_1a58b93459f0b2f476786e111ea46aed9f"></span>void <code class="descname">hl_sparse_matrix_column_sum</code><span class="sig-paren">(</span>real *<em>A_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>B_d</em>, int <em>dimM</em>, int <em>dimN</em>, real <em>scale</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv227hl_sparse_matrix_column_sumP4real18hl_sparse_matrix_sii4real" title="Permalink to this definition"></a></dt>
<dd><p>A_d[j] += B_d[i,j] for i in range(height) </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1892 1893 1894 1895 1896 1897
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: vector, size = width. </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: width. </li>
<li><code class="docutils literal"><span class="pre">scale</span></code>: scale of B_d </li>
Y
Yu Yang 已提交
1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv224hl_matrix_csr_column_sumP4real18hl_sparse_matrix_sii4real">
<span id="hl_matrix_csr_column_sum__realP.hl_sparse_matrix_s.i.i.real"></span><span class="target" id="paddlehl__sparse_8h_1a79ddeb2dafbfd673c0b89e42eae1f70e"></span>void <code class="descname">hl_matrix_csr_column_sum</code><span class="sig-paren">(</span>real *<em>A_d</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>B_d</em>, int <em>dimM</em>, int <em>dimN</em>, real <em>scale</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv224hl_matrix_csr_column_sumP4real18hl_sparse_matrix_sii4real" title="Permalink to this definition"></a></dt>
<dd><p>implementation of csr sparse matrix in hl_sparse_matirx_column_sum </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv225hl_sparse_matrix_add_bias18hl_sparse_matrix_sP4real4real">
<span id="hl_sparse_matrix_add_bias__hl_sparse_matrix_s.realP.real"></span><span class="target" id="paddlehl__sparse_8h_1a5f6fd4c3f287da4cbcb31f7ca1a26494"></span>void <code class="descname">hl_sparse_matrix_add_bias</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>A_d</em>, real *<em>B_d</em>, real <em>scale</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv225hl_sparse_matrix_add_bias18hl_sparse_matrix_sP4real4real" title="Permalink to this definition"></a></dt>
<dd><p>A_d[i,j] += B_d[j]. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1916 1917 1918 1919
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: sprare matrix. </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: vector, size = A_d.width. </li>
<li><code class="docutils literal"><span class="pre">scale</span></code>: scale of B_d. </li>
Y
Yu Yang 已提交
1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv222hl_matrix_csr_add_bias18hl_sparse_matrix_sP4real4real">
<span id="hl_matrix_csr_add_bias__hl_sparse_matrix_s.realP.real"></span><span class="target" id="paddlehl__sparse_8h_1abce071fc6abaf0da81f8bf4edee027b0"></span>void <code class="descname">hl_matrix_csr_add_bias</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>A_d</em>, real *<em>B_d</em>, real <em>scale</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv222hl_matrix_csr_add_bias18hl_sparse_matrix_sP4real4real" title="Permalink to this definition"></a></dt>
<dd><p>implementation of csr sparse matrix in hl_sparse_matrix_add_bias </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv226hl_sparse_matrix_add_dense18hl_sparse_matrix_sP4realii4real4real">
<span id="hl_sparse_matrix_add_dense__hl_sparse_matrix_s.realP.i.i.real.real"></span><span class="target" id="paddlehl__sparse_8h_1ae055c0de8e180667fecacebc92bf0f3c"></span>void <code class="descname">hl_sparse_matrix_add_dense</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>A_d</em>, real *<em>B_d</em>, int <em>dimM</em>, int <em>dimN</em>, real <em>alpha</em>, real <em>beta</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv226hl_sparse_matrix_add_dense18hl_sparse_matrix_sP4realii4real4real" title="Permalink to this definition"></a></dt>
<dd><p>sparseMatrix = alpha * denseMatrix + beta *sparseMatrix A_d[i,j] = alpha * B_d[i,j] + beta * A_d[i,j] Only add value of same (row, col) index in dense matrix and do not use others values whoes postions are not in sparse matirx. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
1938 1939 1940 1941 1942 1943 1944
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: sprare matrix. </li>
<li><code class="docutils literal"><span class="pre">B_d</span></code>: dense matrix. </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: height of B_d. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: width of B_d. </li>
<li><code class="docutils literal"><span class="pre">alpha</span></code>: scale of B_d. </li>
<li><code class="docutils literal"><span class="pre">beta</span></code>: scale of A_d. </li>
Y
Yu Yang 已提交
1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv223hl_matrix_csr_add_dense18hl_sparse_matrix_sP4realii4real4real">
<span id="hl_matrix_csr_add_dense__hl_sparse_matrix_s.realP.i.i.real.real"></span><span class="target" id="paddlehl__sparse_8h_1a8d45151ee85deb098c143fef06014162"></span>void <code class="descname">hl_matrix_csr_add_dense</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>A_d</em>, real *<em>B_d</em>, int <em>dimM</em>, int <em>dimN</em>, real <em>alpha</em>, real <em>beta</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv223hl_matrix_csr_add_dense18hl_sparse_matrix_sP4realii4real4real" title="Permalink to this definition"></a></dt>
<dd><p>implementation of csr sparse matrix in hl_sparse_matrix_add_dense </p>
</dd></dl>

<dl class="function">
<dt id="_CPPv225hl_sparse_matrix_get_rows18hl_sparse_matrix_s">
<span id="hl_sparse_matrix_get_rows__hl_sparse_matrix_s"></span><span class="target" id="paddlehl__sparse_8h_1a8ed55f48ba4488974324117db012cc4d"></span>int *<code class="descname">hl_sparse_matrix_get_rows</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>sMat</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv225hl_sparse_matrix_get_rows18hl_sparse_matrix_s" title="Permalink to this definition"></a></dt>
<dd><p>get rows pionter of GpuSparseMatrix </p>
<p><dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>return rows pointer, which is gpu address </dd>
<dt><strong>Parameters</strong></dt>
1965 1966
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">sMat</span></code>: sparse matrix</li>
Y
Yu Yang 已提交
1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv225hl_sparse_matrix_get_cols18hl_sparse_matrix_s">
<span id="hl_sparse_matrix_get_cols__hl_sparse_matrix_s"></span><span class="target" id="paddlehl__sparse_8h_1a3e9f6a1dea093b936b8b4be691e74033"></span>int *<code class="descname">hl_sparse_matrix_get_cols</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>sMat</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv225hl_sparse_matrix_get_cols18hl_sparse_matrix_s" title="Permalink to this definition"></a></dt>
<dd><p>get cols pionter of GpuSparseMatrix </p>
<p><dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>return cols pointer, which is gpu address </dd>
<dt><strong>Parameters</strong></dt>
1981 1982
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">sMat</span></code>: sparse matrix</li>
Y
Yu Yang 已提交
1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv226hl_sparse_matrix_get_value18hl_sparse_matrix_s">
<span id="hl_sparse_matrix_get_value__hl_sparse_matrix_s"></span><span class="target" id="paddlehl__sparse_8h_1aaf1eb725a7c14db8187b3e1fc1fe3225"></span>real *<code class="descname">hl_sparse_matrix_get_value</code><span class="sig-paren">(</span><a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>sMat</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv226hl_sparse_matrix_get_value18hl_sparse_matrix_s" title="Permalink to this definition"></a></dt>
<dd><p>get value pionter of GpuSparseMatrix </p>
<p><dl class="docutils">
<dt><strong>Return</strong></dt>
<dd>return value pointer, which is gpu address </dd>
<dt><strong>Parameters</strong></dt>
1997 1998
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">sMat</span></code>: sparse matrix</li>
Y
Yu Yang 已提交
1999 2000 2001 2002 2003 2004 2005 2006 2007 2008
</ul>
</dd>
</dl>
</p>
</dd></dl>

</div>
</div>
<div class="section" id="hl-sparse-ph">
<h3>hl_sparse.ph<a class="headerlink" href="#hl-sparse-ph" title="Permalink to this headline"></a></h3>
2009
<div class="breathe-sectiondef docutils container">
2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
<p class="breathe-sectiondef-title rubric">Defines</p>
<dl class="macro">
<dt id="c.HL_SPARSE_PH_">
<span class="target" id="paddlehl__sparse_8ph_1a9fb90b77ecea88729ee0d3ddaaabf1a4"></span><code class="descname">HL_SPARSE_PH_</code><a class="headerlink" href="#c.HL_SPARSE_PH_" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.__sparse_get_type_return__">
<span class="target" id="paddlehl__sparse_8ph_1aa1e24d2cfd96806b9e9ea8880fb51970"></span><code class="descname">__sparse_get_type_return__</code><span class="sig-paren">(</span>mat, type, field<span class="sig-paren">)</span><a class="headerlink" href="#c.__sparse_get_type_return__" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="macro">
<dt id="c.__sparse_get_return__">
<span class="target" id="paddlehl__sparse_8ph_1a68ce44bfe80d3cc1136e0fd494609fcc"></span><code class="descname">__sparse_get_return__</code><span class="sig-paren">(</span>mat, field<span class="sig-paren">)</span><a class="headerlink" href="#c.__sparse_get_return__" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
2027
<div class="breathe-sectiondef docutils container">
2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045
<p class="breathe-sectiondef-title rubric">Typedefs</p>
<dl class="type">
<dt id="_CPPv213hl_csr_matrix">
<span id="hl_csr_matrix"></span><span class="target" id="paddlehl__sparse_8ph_1a662bad6cb790df08fa02f8a8f5322ae5"></span><em class="property">typedef </em><em class="property">struct</em> <a class="reference internal" href="#_CPPv214_hl_csr_matrix" title="_hl_csr_matrix">_hl_csr_matrix</a> *<code class="descname">hl_csr_matrix</code><a class="headerlink" href="#_CPPv213hl_csr_matrix" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="type">
<dt id="_CPPv213hl_csc_matrix">
<span id="hl_csc_matrix"></span><span class="target" id="paddlehl__sparse_8ph_1a7d9594044c78065eba492f537788a1f8"></span><em class="property">typedef </em><em class="property">struct</em> <a class="reference internal" href="#_CPPv214_hl_csc_matrix" title="_hl_csc_matrix">_hl_csc_matrix</a> *<code class="descname">hl_csc_matrix</code><a class="headerlink" href="#_CPPv213hl_csc_matrix" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
<dl class="class">
<dt id="_CPPv214_hl_csr_matrix">
<span id="_hl_csr_matrix"></span><span class="target" id="paddlestruct__hl__csr__matrix"></span><em class="property">struct </em><code class="descname">_hl_csr_matrix</code><a class="headerlink" href="#_CPPv214_hl_csr_matrix" title="Permalink to this definition"></a></dt>
<dd><p>sparse matrix csr format. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2046 2047 2048 2049 2050 2051 2052
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">*csr_val</span></code>: nonzero values of matrix. </li>
<li><code class="docutils literal"><span class="pre">*csr_row</span></code>: row indices. </li>
<li><code class="docutils literal"><span class="pre">*csr_col</span></code>: column indices. </li>
<li><code class="docutils literal"><span class="pre">nnz_s</span></code>: sizeof of csr_val &amp; csr_col. </li>
<li><code class="docutils literal"><span class="pre">row_s</span></code>: sizeof of csr_row. </li>
<li><code class="docutils literal"><span class="pre">sparsity</span></code>: sparsity pattern. </li>
2053 2054 2055 2056
</ul>
</dd>
</dl>
</p>
2057
<div class="breathe-sectiondef docutils container">
2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097
<p class="breathe-sectiondef-title rubric">Public Members</p>
<dl class="member">
<dt id="_CPPv2N14_hl_csr_matrix7csr_valE">
<span id="_hl_csr_matrix::csr_val__realP"></span><span class="target" id="paddlestruct__hl__csr__matrix_1a81121ef0e9515262aca460617b1fa1f9"></span>real *<code class="descname">csr_val</code><a class="headerlink" href="#_CPPv2N14_hl_csr_matrix7csr_valE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N14_hl_csr_matrix7csr_rowE">
<span id="_hl_csr_matrix::csr_row__iP"></span><span class="target" id="paddlestruct__hl__csr__matrix_1a320257fc1258f844eff549d7860c57bc"></span>int *<code class="descname">csr_row</code><a class="headerlink" href="#_CPPv2N14_hl_csr_matrix7csr_rowE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N14_hl_csr_matrix7csr_colE">
<span id="_hl_csr_matrix::csr_col__iP"></span><span class="target" id="paddlestruct__hl__csr__matrix_1a32e181cd2130aa04f651777f945130a0"></span>int *<code class="descname">csr_col</code><a class="headerlink" href="#_CPPv2N14_hl_csr_matrix7csr_colE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N14_hl_csr_matrix5nnz_sE">
<span id="_hl_csr_matrix::nnz_s__s"></span><span class="target" id="paddlestruct__hl__csr__matrix_1a844f63ca68c2066214fcfa564bcaa0a1"></span>size_t <code class="descname">nnz_s</code><a class="headerlink" href="#_CPPv2N14_hl_csr_matrix5nnz_sE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N14_hl_csr_matrix5row_sE">
<span id="_hl_csr_matrix::row_s__i"></span><span class="target" id="paddlestruct__hl__csr__matrix_1aece11d771d76bd82bacc34d887988906"></span>int <code class="descname">row_s</code><a class="headerlink" href="#_CPPv2N14_hl_csr_matrix5row_sE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N14_hl_csr_matrix8sparsityE">
<span id="_hl_csr_matrix::sparsity__float"></span><span class="target" id="paddlestruct__hl__csr__matrix_1ada94c4f4844abbc1feae6781f2320e65"></span>float <code class="descname">sparsity</code><a class="headerlink" href="#_CPPv2N14_hl_csr_matrix8sparsityE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
</dd></dl>

<dl class="class">
<dt id="_CPPv214_hl_csc_matrix">
<span id="_hl_csc_matrix"></span><span class="target" id="paddlestruct__hl__csc__matrix"></span><em class="property">struct </em><code class="descname">_hl_csc_matrix</code><a class="headerlink" href="#_CPPv214_hl_csc_matrix" title="Permalink to this definition"></a></dt>
<dd><p>sparse matrix csc format. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2098 2099 2100 2101 2102 2103 2104
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">*csc_val</span></code>: nonzero values of matrix. </li>
<li><code class="docutils literal"><span class="pre">*csc_row</span></code>: row indices. </li>
<li><code class="docutils literal"><span class="pre">*csc_col</span></code>: column indices. </li>
<li><code class="docutils literal"><span class="pre">nnz_s</span></code>: sizeof of csc_val &amp; csc_row. </li>
<li><code class="docutils literal"><span class="pre">col_s</span></code>: sizeof of csc_col. </li>
<li><code class="docutils literal"><span class="pre">sparsity</span></code>: sparsity pattern. </li>
2105 2106 2107 2108
</ul>
</dd>
</dl>
</p>
2109
<div class="breathe-sectiondef docutils container">
2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143
<p class="breathe-sectiondef-title rubric">Public Members</p>
<dl class="member">
<dt id="_CPPv2N14_hl_csc_matrix7csc_valE">
<span id="_hl_csc_matrix::csc_val__realP"></span><span class="target" id="paddlestruct__hl__csc__matrix_1a48a7f4534c5b37d1fc03199d4b0aef57"></span>real *<code class="descname">csc_val</code><a class="headerlink" href="#_CPPv2N14_hl_csc_matrix7csc_valE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N14_hl_csc_matrix7csc_rowE">
<span id="_hl_csc_matrix::csc_row__iP"></span><span class="target" id="paddlestruct__hl__csc__matrix_1a47106251280d0eee84d0151d14fcb3d5"></span>int *<code class="descname">csc_row</code><a class="headerlink" href="#_CPPv2N14_hl_csc_matrix7csc_rowE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N14_hl_csc_matrix7csc_colE">
<span id="_hl_csc_matrix::csc_col__iP"></span><span class="target" id="paddlestruct__hl__csc__matrix_1a871001c061380ea9e353e50ba0a3801c"></span>int *<code class="descname">csc_col</code><a class="headerlink" href="#_CPPv2N14_hl_csc_matrix7csc_colE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N14_hl_csc_matrix5nnz_sE">
<span id="_hl_csc_matrix::nnz_s__s"></span><span class="target" id="paddlestruct__hl__csc__matrix_1a3523feb00592d28f550d7fea86f97bac"></span>size_t <code class="descname">nnz_s</code><a class="headerlink" href="#_CPPv2N14_hl_csc_matrix5nnz_sE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N14_hl_csc_matrix5col_sE">
<span id="_hl_csc_matrix::col_s__i"></span><span class="target" id="paddlestruct__hl__csc__matrix_1a1bf649568bc8b47129603f9f6ab6455e"></span>int <code class="descname">col_s</code><a class="headerlink" href="#_CPPv2N14_hl_csc_matrix5col_sE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="member">
<dt id="_CPPv2N14_hl_csc_matrix8sparsityE">
<span id="_hl_csc_matrix::sparsity__float"></span><span class="target" id="paddlestruct__hl__csc__matrix_1a967cc4e03c5f03dbf724c0dbf25bae13"></span>float <code class="descname">sparsity</code><a class="headerlink" href="#_CPPv2N14_hl_csc_matrix8sparsityE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</div>
</dd></dl>

Y
Yu Yang 已提交
2144 2145 2146 2147 2148 2149
</div>
</div>
<div class="section" id="others">
<h2>Others<a class="headerlink" href="#others" title="Permalink to this headline"></a></h2>
<div class="section" id="hl-aggregate-h">
<h3>hl_aggregate.h<a class="headerlink" href="#hl-aggregate-h" title="Permalink to this headline"></a></h3>
2150
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
2151 2152 2153 2154 2155 2156 2157
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt id="_CPPv217hl_matrix_row_sumP4realP4realii">
<span id="hl_matrix_row_sum__realP.realP.i.i"></span><span class="target" id="paddlehl__aggregate_8h_1aaf612d2b55295ba839f5ac80bac31da8"></span>void <code class="descname">hl_matrix_row_sum</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv217hl_matrix_row_sumP4realP4realii" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the sum of each row of the matrix A_d. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2158 2159 2160 2161 2162
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: output matrix (M x 1). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
Y
Yu Yang 已提交
2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv217hl_matrix_row_maxP4realP4realii">
<span id="hl_matrix_row_max__realP.realP.i.i"></span><span class="target" id="paddlehl__aggregate_8h_1afda2daacc7a1100289cda8f531b6b139"></span>void <code class="descname">hl_matrix_row_max</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv217hl_matrix_row_maxP4realP4realii" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the maximum value of each row of the matrix A_d. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2175 2176 2177 2178 2179
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: output matrix (M x 1). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
Y
Yu Yang 已提交
2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv217hl_matrix_row_minP4realP4realii">
<span id="hl_matrix_row_min__realP.realP.i.i"></span><span class="target" id="paddlehl__aggregate_8h_1ad7150c60096d66f0c22f3db191186ef4"></span>void <code class="descname">hl_matrix_row_min</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv217hl_matrix_row_minP4realP4realii" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the minimum value of each row of the matrix A_d. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2192 2193 2194 2195 2196
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: output matrix (M x 1). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
Y
Yu Yang 已提交
2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv220hl_matrix_column_sumP4realP4realii">
<span id="hl_matrix_column_sum__realP.realP.i.i"></span><span class="target" id="paddlehl__aggregate_8h_1a65e0c80a74e1663fc58fe0404e919569"></span>void <code class="descname">hl_matrix_column_sum</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_matrix_column_sumP4realP4realii" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the sum of each column of the matrix A_d. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2209 2210 2211 2212 2213
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: output <a class="reference internal" href="../../api/api.html#paddleclassMatrix"><span class="std std-ref">Matrix</span></a> (1 x N). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
Y
Yu Yang 已提交
2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv220hl_matrix_column_maxP4realP4realii">
<span id="hl_matrix_column_max__realP.realP.i.i"></span><span class="target" id="paddlehl__aggregate_8h_1a8b6cc6f74bb3dc05b6c5829210f3f968"></span>void <code class="descname">hl_matrix_column_max</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_matrix_column_maxP4realP4realii" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the maximum value of each column of the matrix A_d. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2226 2227 2228 2229 2230
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: output matrix (1 x N). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
Y
Yu Yang 已提交
2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv220hl_matrix_column_minP4realP4realii">
<span id="hl_matrix_column_min__realP.realP.i.i"></span><span class="target" id="paddlehl__aggregate_8h_1a61bedd96a0aee463137c83e83ecead66"></span>void <code class="descname">hl_matrix_column_min</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>C_d</em>, int <em>dimM</em>, int <em>dimN</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv220hl_matrix_column_minP4realP4realii" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the minimum value of each column of the matrix A_d. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2243 2244 2245 2246 2247
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input matrix (M x N). </li>
<li><code class="docutils literal"><span class="pre">C_d</span></code>: output matrix (1 x N). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: matrix height. </li>
<li><code class="docutils literal"><span class="pre">dimN</span></code>: matrix width. </li>
Y
Yu Yang 已提交
2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv213hl_vector_sumP4realP4reali">
<span id="hl_vector_sum__realP.realP.i"></span><span class="target" id="paddlehl__aggregate_8h_1a4d5a05c53f64059fae68b1e2db5f86e6"></span>void <code class="descname">hl_vector_sum</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>C_h</em>, int <em>dimM</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv213hl_vector_sumP4realP4reali" title="Permalink to this definition"></a></dt>
<dd><p>C_h = sum(A_d[i]). </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2260 2261 2262 2263
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input(m). </li>
<li><code class="docutils literal"><span class="pre">C_h</span></code>: output(host memory). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: size of vector. </li>
Y
Yu Yang 已提交
2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv217hl_vector_abs_sumP4realP4reali">
<span id="hl_vector_abs_sum__realP.realP.i"></span><span class="target" id="paddlehl__aggregate_8h_1a8ca428e7f7856f9d83352a9429cddcca"></span>void <code class="descname">hl_vector_abs_sum</code><span class="sig-paren">(</span>real *<em>A_d</em>, real *<em>C_h</em>, int <em>dimM</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv217hl_vector_abs_sumP4realP4reali" title="Permalink to this definition"></a></dt>
<dd><p>C_h = sum(abs(A_d[i])). </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2276 2277 2278 2279
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">A_d</span></code>: input(m). </li>
<li><code class="docutils literal"><span class="pre">C_h</span></code>: output(host memory). </li>
<li><code class="docutils literal"><span class="pre">dimM</span></code>: size of vector. </li>
Y
Yu Yang 已提交
2280 2281 2282 2283 2284 2285 2286 2287 2288 2289
</ul>
</dd>
</dl>
</p>
</dd></dl>

</div>
</div>
<div class="section" id="hl-table-apply-h">
<h3>hl_table_apply.h<a class="headerlink" href="#hl-table-apply-h" title="Permalink to this headline"></a></h3>
2290
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
2291 2292 2293 2294 2295 2296 2297
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt id="_CPPv221hl_matrix_select_rowsP4realiP4realiPiiii">
<span id="hl_matrix_select_rows__realP.i.realP.i.iP.i.i.i"></span><span class="target" id="paddlehl__table__apply_8h_1a90e6bd665f39167138df5cc6433d4e04"></span>void <code class="descname">hl_matrix_select_rows</code><span class="sig-paren">(</span>real *<em>output</em>, int <em>ldo</em>, real *<em>table</em>, int <em>ldt</em>, int *<em>ids</em>, int <em>numSamples</em>, int <em>tableSize</em>, int <em>dim</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv221hl_matrix_select_rowsP4realiP4realiPiiii" title="Permalink to this definition"></a></dt>
<dd><p>Get row from table. output[i] += table[ids[i]] if ids[i] == -1, it will be ignored. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2298 2299 2300 2301 2302 2303 2304 2305 2306
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">output</span></code>: output matrix. </li>
<li><code class="docutils literal"><span class="pre">ldo</span></code>: leading dimension of output. </li>
<li><code class="docutils literal"><span class="pre">table</span></code>: table matrix. </li>
<li><code class="docutils literal"><span class="pre">ldt</span></code>: leading dimension of table. </li>
<li><code class="docutils literal"><span class="pre">ids</span></code>: ids vector. </li>
<li><code class="docutils literal"><span class="pre">numSamples</span></code>: height of output. </li>
<li><code class="docutils literal"><span class="pre">tableSize</span></code>: height of table. </li>
<li><code class="docutils literal"><span class="pre">dim</span></code>: width of table. </li>
Y
Yu Yang 已提交
2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv221hl_matrix_add_to_rowsP4realiP4realiPiiii">
<span id="hl_matrix_add_to_rows__realP.i.realP.i.iP.i.i.i"></span><span class="target" id="paddlehl__table__apply_8h_1a245ffd71bbe66a8b8dd6070bd3a06aa7"></span>void <code class="descname">hl_matrix_add_to_rows</code><span class="sig-paren">(</span>real *<em>table</em>, int <em>ldt</em>, real *<em>input</em>, int <em>ldi</em>, int *<em>ids</em>, int <em>numSamples</em>, int <em>tableSize</em>, int <em>dim</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv221hl_matrix_add_to_rowsP4realiP4realiPiiii" title="Permalink to this definition"></a></dt>
<dd><p>Add row to table. table[ids[i]] += output[i] if ids[i] == -1, it will be ignored. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2319 2320 2321 2322 2323 2324 2325 2326 2327
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">table</span></code>: table matrix. </li>
<li><code class="docutils literal"><span class="pre">ldt</span></code>: leading dimension of table. </li>
<li><code class="docutils literal"><span class="pre">input</span></code>: input matrix. </li>
<li><code class="docutils literal"><span class="pre">ldi</span></code>: leading dimension of input. </li>
<li><code class="docutils literal"><span class="pre">ids</span></code>: ids vector. </li>
<li><code class="docutils literal"><span class="pre">numSamples</span></code>: height of input. </li>
<li><code class="docutils literal"><span class="pre">tableSize</span></code>: height of table. </li>
<li><code class="docutils literal"><span class="pre">dim</span></code>: width of table. </li>
Y
Yu Yang 已提交
2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt>
<em class="property">template </em>&lt;<em class="property">class</em> T&gt;</dt>
<dt id="_CPPv221hl_vector_select_fromP1TiPK1TiPKii">
<span id="hl_vector_select_from__TP.i.TCP.i.iCP.i"></span><span class="target" id="paddlehl__table__apply_8h_1af428adb3123f3e3a591f87b29a18b0a5"></span>void <code class="descname">hl_vector_select_from</code><span class="sig-paren">(</span>T *<em>dst</em>, int <em>sized</em>, <em class="property">const</em> T *<em>src</em>, int <em>sizes</em>, <em class="property">const</em> int *<em>ids</em>, int <em>sizei</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv221hl_vector_select_fromP1TiPK1TiPKii" title="Permalink to this definition"></a></dt>
<dd><p>Select element from vector. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2342 2343 2344 2345 2346 2347 2348
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">dst</span></code>: output vector. </li>
<li><code class="docutils literal"><span class="pre">sized</span></code>: size of dst. </li>
<li><code class="docutils literal"><span class="pre">src</span></code>: input vector. </li>
<li><code class="docutils literal"><span class="pre">sizes</span></code>: size of src. </li>
<li><code class="docutils literal"><span class="pre">ids</span></code>: index vector. </li>
<li><code class="docutils literal"><span class="pre">sizei</span></code>: size of ids. </li>
Y
Yu Yang 已提交
2349 2350 2351 2352 2353 2354 2355 2356 2357 2358
</ul>
</dd>
</dl>
</p>
</dd></dl>

</div>
</div>
<div class="section" id="hl-top-k-h">
<h3>hl_top_k.h<a class="headerlink" href="#hl-top-k-h" title="Permalink to this headline"></a></h3>
2359
<div class="breathe-sectiondef docutils container">
Y
Yu Yang 已提交
2360 2361 2362 2363 2364 2365 2366
<p class="breathe-sectiondef-title rubric">Functions</p>
<dl class="function">
<dt id="_CPPv215hl_matrix_top_kP4realiPiP4realiiii">
<span id="hl_matrix_top_k__realP.i.iP.realP.i.i.i.i"></span><span class="target" id="paddlehl__top__k_8h_1a361c34fb969093ccdeecf4c655058e9c"></span>void <code class="descname">hl_matrix_top_k</code><span class="sig-paren">(</span>real *<em>topVal</em>, int <em>ldv</em>, int *<em>topIds</em>, real *<em>src</em>, int <em>lds</em>, int <em>dim</em>, int <em>beamSize</em>, int <em>numSamples</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv215hl_matrix_top_kP4realiPiP4realiiii" title="Permalink to this definition"></a></dt>
<dd><p>find top k element. </p>
<p><dl class="docutils">
<dt><strong>Parameters</strong></dt>
2367 2368 2369 2370 2371 2372 2373 2374 2375
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">topVal</span></code>: top k element. </li>
<li><code class="docutils literal"><span class="pre">ldv</span></code>: leading dimension of topVal. </li>
<li><code class="docutils literal"><span class="pre">topIds</span></code>: top k index. </li>
<li><code class="docutils literal"><span class="pre">src</span></code>: input value. </li>
<li><code class="docutils literal"><span class="pre">lds</span></code>: leading dimension of src. </li>
<li><code class="docutils literal"><span class="pre">dim</span></code>: width of input value. </li>
<li><code class="docutils literal"><span class="pre">beamSize</span></code>: beam size. </li>
<li><code class="docutils literal"><span class="pre">numSamples</span></code>: height of input value. </li>
Y
Yu Yang 已提交
2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389
</ul>
</dd>
</dl>
</p>
</dd></dl>

<dl class="function">
<dt id="_CPPv222hl_sparse_matrix_top_kP4realiPi18hl_sparse_matrix_sii">
<span id="hl_sparse_matrix_top_k__realP.i.iP.hl_sparse_matrix_s.i.i"></span><span class="target" id="paddlehl__top__k_8h_1af70763a29b4c703cbebd2e7dba1d2701"></span>void <code class="descname">hl_sparse_matrix_top_k</code><span class="sig-paren">(</span>real *<em>topVal</em>, int <em>ldv</em>, int *<em>topIds</em>, <a class="reference internal" href="../utils/utils.html#_CPPv218hl_sparse_matrix_s" title="hl_sparse_matrix_s">hl_sparse_matrix_s</a> <em>src</em>, int <em>beamSize</em>, int <em>numSamples</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv222hl_sparse_matrix_top_kP4realiPi18hl_sparse_matrix_sii" title="Permalink to this definition"></a></dt>
<dd><p>find top k element for each row in sparse matrix. </p>
<p><dl class="docutils">
<dt><strong>Note</strong></dt>
<dd>Only support HL_SPARSE_CSR format. </dd>
<dt><strong>Parameters</strong></dt>
2390 2391 2392 2393 2394 2395 2396
<dd><ul class="breatheparameterlist first last simple">
<li><code class="docutils literal"><span class="pre">topVal</span></code>: top k element. </li>
<li><code class="docutils literal"><span class="pre">ldv</span></code>: leading dimension of topVal. </li>
<li><code class="docutils literal"><span class="pre">topIds</span></code>: top k index. </li>
<li><code class="docutils literal"><span class="pre">src</span></code>: sparse matrix. </li>
<li><code class="docutils literal"><span class="pre">beamSize</span></code>: beam size. </li>
<li><code class="docutils literal"><span class="pre">numSamples</span></code>: height of input value.</li>
Y
Yu Yang 已提交
2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457
</ul>
</dd>
</dl>
</p>
</dd></dl>

</div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Matrix</a><ul>
<li><a class="reference internal" href="#base-matrix">Base Matrix</a><ul>
<li><a class="reference internal" href="#hl-matrix-h">hl_matrix.h</a></li>
<li><a class="reference internal" href="#hl-matrix-base-h">hl_matrix_base.h</a></li>
<li><a class="reference internal" href="#hl-matrix-apply-cuh">hl_matrix_apply.cuh</a></li>
<li><a class="reference internal" href="#hl-matrix-ops-cuh">hl_matrix_ops.cuh</a></li>
<li><a class="reference internal" href="#hl-matrix-type-cuh">hl_matrix_type.cuh</a></li>
<li><a class="reference internal" href="#hl-sse-matrix-kernel-cuh">hl_sse_matrix_kernel.cuh</a></li>
<li><a class="reference internal" href="#hl-batch-transpose-h">hl_batch_transpose.h</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sparse-matrix">Sparse Matrix</a><ul>
<li><a class="reference internal" href="#hl-sparse-h">hl_sparse.h</a></li>
<li><a class="reference internal" href="#hl-sparse-ph">hl_sparse.ph</a></li>
</ul>
</li>
<li><a class="reference internal" href="#others">Others</a><ul>
<li><a class="reference internal" href="#hl-aggregate-h">hl_aggregate.h</a></li>
<li><a class="reference internal" href="#hl-table-apply-h">hl_table_apply.h</a></li>
<li><a class="reference internal" href="#hl-top-k-h">hl_top_k.h</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="index.html"
                        title="previous chapter">Matrix</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../rnn/index.html"
                        title="next chapter">RNN</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../../_sources/source/cuda/matrix/matrix.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../../../search.html" method="get">
2458 2459
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
Y
Yu Yang 已提交
2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../rnn/index.html" title="RNN"
             >next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Matrix"
             >previous</a> |</li>
2484 2485 2486
        <li class="nav-item nav-item-0"><a href="../../../index.html">PaddlePaddle  documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >Source Code Documents</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" >Matrix</a> &#187;</li> 
Y
Yu Yang 已提交
2487 2488 2489
      </ul>
    </div>
    <div class="footer" role="contentinfo">
2490
        &#169; Copyright 2016, PaddlePaddle developers.
2491
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
Y
Yu Yang 已提交
2492 2493 2494
    </div>
  </body>
</html>