This file is indexed.

/usr/share/doc/libeigen3-dev/html/TopicUsingBlasLapack.html is in libeigen3-doc 3.3.4-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!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/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>Eigen: Using BLAS/LAPACK from Eigen</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css"   rel="stylesheet" type="text/css" />
<link href="eigendoxy.css" rel="stylesheet" type="text/css">
<!--  -->
<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
<!-- <script type="text/javascript"> -->
<!-- </script> -->
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- <a name="top"></a> -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Eigen_Silly_Professor_64x64.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname"><a href="http://eigen.tuxfamily.org">Eigen</a>
   &#160;<span id="projectnumber">3.3.4</span>
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('TopicUsingBlasLapack.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Using BLAS/LAPACK from Eigen </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Since Eigen version 3.3 and later, any F77 compatible BLAS or LAPACK libraries can be used as backends for dense matrix products and dense matrix decompositions. For instance, one can use <a href="http://eigen.tuxfamily.org/Counter/redirect_to_mkl.php">IntelĀ® MKL</a>, Apple's Accelerate framework on OSX, <a href="http://www.openblas.net/">OpenBLAS</a>, <a href="http://www.netlib.org/lapack">Netlib LAPACK</a>, etc.</p>
<p>Do not miss this <a class="el" href="TopicUsingIntelMKL.html">page </a> for further discussions on the specific use of IntelĀ® MKL (also includes VML, PARDISO, etc.)</p>
<p>In order to use an external BLAS and/or LAPACK library, you must link you own application to the respective libraries and their dependencies. For LAPACK, you must also link to the standard <a href="http://www.netlib.org/lapack/lapacke.html">Lapacke</a> library, which is used as a convenient think layer between Eigen's C++ code and LAPACK F77 interface. Then you must activate their usage by defining one or multiple of the following macros (<b>before</b> including any Eigen's header):</p>
<dl class="section note"><dt>Note</dt><dd>For Mac users, in order to use the lapack version shipped with the Accelerate framework, you also need the lapacke library. Using <a href="https://www.macports.org/">MacPorts</a>, this is as easy as: <div class="fragment"><div class="line">sudo port install lapack</div></div><!-- fragment --> and then use the following link flags: <code>-framework</code> <code>Accelerate</code> <code>/opt/local/lib/lapack/liblapacke</code>.dylib</dd></dl>
<table class="manual">
<tr>
<td><code>EIGEN_USE_BLAS</code> </td><td>Enables the use of external BLAS level 2 and 3 routines (compatible with any F77 BLAS interface) </td></tr>
<tr class="alt">
<td><code>EIGEN_USE_LAPACKE</code> </td><td>Enables the use of external Lapack routines via the <a href="http://www.netlib.org/lapack/lapacke.html">Lapacke</a> C interface to Lapack (compatible with any F77 LAPACK interface) </td></tr>
<tr>
<td><code>EIGEN_USE_LAPACKE_STRICT</code> </td><td>Same as <code>EIGEN_USE_LAPACKE</code> but algorithms of lower numerical robustness are disabled. <br />
 This currently concerns only <a class="el" href="classEigen_1_1JacobiSVD.html" title="Two-sided Jacobi SVD decomposition of a rectangular matrix. ">JacobiSVD</a> which otherwise would be replaced by <code>gesvd</code> that is less robust than Jacobi rotations. </td></tr>
</table>
<p>When doing so, a number of Eigen's algorithms are silently substituted with calls to BLAS or LAPACK routines. These substitutions apply only for <b>Dynamic</b> <b>or</b> <b>large</b> enough objects with one of the following four standard scalar types: <code>float</code>, <code>double</code>, <code>complex&lt;float&gt;</code>, and <code>complex&lt;double&gt;</code>. Operations on other scalar types or mixing reals and complexes will continue to use the built-in algorithms.</p>
<p>The breadth of Eigen functionality that can be substituted is listed in the table below. </p><table class="manual">
<tr>
<th>Functional domain</th><th>Code example</th><th>BLAS/LAPACK routines </th></tr>
<tr>
<td>Matrix-matrix operations <br />
 <code>EIGEN_USE_BLAS</code> </td><td><div class="fragment"><div class="line">m1*m2.<a class="code" href="classEigen_1_1DenseBase.html#ac8952c19644a4ac7e41bea45c19b909c">transpose</a>();</div><div class="line">m1.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749">Lower</a>&gt;()*m2;</div><div class="line">m1*m2.triangularView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1">Upper</a>&gt;();</div><div class="line">m1.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749">Lower</a>&gt;().rankUpdate(m2,1.0);</div></div><!-- fragment --></td><td><div class="fragment"><div class="line">?gemm</div><div class="line">?symm/?hemm</div><div class="line">?trmm</div><div class="line">dsyrk/ssyrk</div></div><!-- fragment --> </td></tr>
<tr class="alt">
<td>Matrix-vector operations <br />
 <code>EIGEN_USE_BLAS</code> </td><td><div class="fragment"><div class="line">m1.<a class="code" href="classEigen_1_1MatrixBase.html#afacca1f88da57e5cd87dd07c8ff926bb">adjoint</a>()*b;</div><div class="line">m1.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749">Lower</a>&gt;()*b;</div><div class="line">m1.triangularView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1">Upper</a>&gt;()*b;</div></div><!-- fragment --></td><td><div class="fragment"><div class="line">?gemv</div><div class="line">?symv/?hemv</div><div class="line">?trmv</div></div><!-- fragment --> </td></tr>
<tr>
<td>LU decomposition <br />
 <code>EIGEN_USE_LAPACKE</code> <br />
 <code>EIGEN_USE_LAPACKE_STRICT</code> </td><td><div class="fragment"><div class="line">v1 = m1.<a class="code" href="classEigen_1_1MatrixBase.html#afb312afbfe960cbda67811552d876fae">lu</a>().solve(v2);</div></div><!-- fragment --></td><td><div class="fragment"><div class="line">?getrf</div></div><!-- fragment --> </td></tr>
<tr class="alt">
<td>Cholesky decomposition <br />
 <code>EIGEN_USE_LAPACKE</code> <br />
 <code>EIGEN_USE_LAPACKE_STRICT</code> </td><td><div class="fragment"><div class="line">v1 = m2.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1">Upper</a>&gt;().llt().solve(v2);</div></div><!-- fragment --></td><td><div class="fragment"><div class="line">?potrf</div></div><!-- fragment --> </td></tr>
<tr>
<td>QR decomposition <br />
 <code>EIGEN_USE_LAPACKE</code> <br />
 <code>EIGEN_USE_LAPACKE_STRICT</code> </td><td><div class="fragment"><div class="line">m1.<a class="code" href="classEigen_1_1MatrixBase.html#a9a9377aab1cea26db5f25bab7e682f8f">householderQr</a>();</div><div class="line">m1.<a class="code" href="classEigen_1_1MatrixBase.html#adee8c19c833245bbb00a591dce68e8a4">colPivHouseholderQr</a>();</div></div><!-- fragment --></td><td><div class="fragment"><div class="line">?geqrf</div><div class="line">?geqp3</div></div><!-- fragment --> </td></tr>
<tr class="alt">
<td>Singular value decomposition <br />
 <code>EIGEN_USE_LAPACKE</code> </td><td><div class="fragment"><div class="line">JacobiSVD&lt;MatrixXd&gt; svd;</div><div class="line">svd.compute(m1, <a class="code" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a540036417bfecf2e791a70948c227f47">ComputeThinV</a>);</div></div><!-- fragment --></td><td><div class="fragment"><div class="line">?gesvd</div></div><!-- fragment --> </td></tr>
<tr>
<td>Eigen-value decompositions <br />
 <code>EIGEN_USE_LAPACKE</code> <br />
 <code>EIGEN_USE_LAPACKE_STRICT</code> </td><td><div class="fragment"><div class="line">EigenSolver&lt;MatrixXd&gt; es(m1);</div><div class="line">ComplexEigenSolver&lt;MatrixXcd&gt; ces(m1);</div><div class="line">SelfAdjointEigenSolver&lt;MatrixXd&gt; saes(m1+m1.<a class="code" href="classEigen_1_1DenseBase.html#ac8952c19644a4ac7e41bea45c19b909c">transpose</a>());</div><div class="line">GeneralizedSelfAdjointEigenSolver&lt;MatrixXd&gt;</div><div class="line">    gsaes(m1+m1.<a class="code" href="classEigen_1_1DenseBase.html#ac8952c19644a4ac7e41bea45c19b909c">transpose</a>(),m2+m2.<a class="code" href="classEigen_1_1DenseBase.html#ac8952c19644a4ac7e41bea45c19b909c">transpose</a>());</div></div><!-- fragment --></td><td><div class="fragment"><div class="line">?gees</div><div class="line">?gees</div><div class="line">?syev/?heev</div><div class="line">?syev/?heev,</div><div class="line">?potrf</div></div><!-- fragment --> </td></tr>
<tr class="alt">
<td>Schur decomposition <br />
 <code>EIGEN_USE_LAPACKE</code> <br />
 <code>EIGEN_USE_LAPACKE_STRICT</code> </td><td><div class="fragment"><div class="line">RealSchur&lt;MatrixXd&gt; schurR(m1);</div><div class="line">ComplexSchur&lt;MatrixXcd&gt; schurC(m1);</div></div><!-- fragment --></td><td><div class="fragment"><div class="line">?gees</div></div><!-- fragment --> </td></tr>
</table>
<p>In the examples, m1 and m2 are dense matrices and v1 and v2 are dense vectors. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>