Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 2f6559b7006594cad03af173263c219e > files > 1764

mrpt-doc-0.9.4-0.1.20110110svn2383.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>The MRPT project: CoeffBasedProduct.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> &gt; <b>C++ reference</b> </div>
<div align="right">
<a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a>
</div>
<!-- Generated by Doxygen 1.7.2 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
          <span class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </span><span class="right"></span>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>CoeffBasedProduct.h</h1>  </div>
</div>
<div class="contents">
<a href="_coeff_based_product_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// This file is part of Eigen, a lightweight C++ template library</span>
<a name="l00002"></a>00002 <span class="comment">// for linear algebra.</span>
<a name="l00003"></a>00003 <span class="comment">//</span>
<a name="l00004"></a>00004 <span class="comment">// Copyright (C) 2006-2008 Benoit Jacob &lt;jacob.benoit.1@gmail.com&gt;</span>
<a name="l00005"></a>00005 <span class="comment">// Copyright (C) 2008-2010 Gael Guennebaud &lt;gael.guennebaud@inria.fr&gt;</span>
<a name="l00006"></a>00006 <span class="comment">//</span>
<a name="l00007"></a>00007 <span class="comment">// Eigen is free software; you can redistribute it and/or</span>
<a name="l00008"></a>00008 <span class="comment">// modify it under the terms of the GNU Lesser General Public</span>
<a name="l00009"></a>00009 <span class="comment">// License as published by the Free Software Foundation; either</span>
<a name="l00010"></a>00010 <span class="comment">// version 3 of the License, or (at your option) any later version.</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// Alternatively, you can redistribute it and/or</span>
<a name="l00013"></a>00013 <span class="comment">// modify it under the terms of the GNU General Public License as</span>
<a name="l00014"></a>00014 <span class="comment">// published by the Free Software Foundation; either version 2 of</span>
<a name="l00015"></a>00015 <span class="comment">// the License, or (at your option) any later version.</span>
<a name="l00016"></a>00016 <span class="comment">//</span>
<a name="l00017"></a>00017 <span class="comment">// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY</span>
<a name="l00018"></a>00018 <span class="comment">// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span>
<a name="l00019"></a>00019 <span class="comment">// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the</span>
<a name="l00020"></a>00020 <span class="comment">// GNU General Public License for more details.</span>
<a name="l00021"></a>00021 <span class="comment">//</span>
<a name="l00022"></a>00022 <span class="comment">// You should have received a copy of the GNU Lesser General Public</span>
<a name="l00023"></a>00023 <span class="comment">// License and a copy of the GNU General Public License along with</span>
<a name="l00024"></a>00024 <span class="comment">// Eigen. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#ifndef EIGEN_COEFFBASED_PRODUCT_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define EIGEN_COEFFBASED_PRODUCT_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span>
<a name="l00029"></a>00029 <span class="keyword">namespace </span>internal {
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="comment">/*********************************************************************************</span>
<a name="l00032"></a>00032 <span class="comment">*  Coefficient based product implementation.</span>
<a name="l00033"></a>00033 <span class="comment">*  It is designed for the following use cases:</span>
<a name="l00034"></a>00034 <span class="comment">*  - small fixed sizes</span>
<a name="l00035"></a>00035 <span class="comment">*  - lazy products</span>
<a name="l00036"></a>00036 <span class="comment">*********************************************************************************/</span>
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="comment">/* Since the all the dimensions of the product are small, here we can rely</span>
<a name="l00039"></a>00039 <span class="comment"> * on the generic Assign mechanism to evaluate the product per coeff (or packet).</span>
<a name="l00040"></a>00040 <span class="comment"> *</span>
<a name="l00041"></a>00041 <span class="comment"> * Note that here the inner-loops should always be unrolled.</span>
<a name="l00042"></a>00042 <span class="comment"> */</span>
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> Traversal, <span class="keywordtype">int</span> UnrollingIndex, <span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> RetScalar&gt;
<a name="l00045"></a>00045 <span class="keyword">struct </span>product_coeff_impl;
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> StorageOrder, <span class="keywordtype">int</span> UnrollingIndex, <span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> Packet, <span class="keywordtype">int</span> LoadMode&gt;
<a name="l00048"></a>00048 <span class="keyword">struct </span>product_packet_impl;
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> LhsNested, <span class="keyword">typename</span> RhsNested, <span class="keywordtype">int</span> NestingFlags&gt;
<a name="l00051"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html">00051</a> <span class="keyword">struct </span>traits&lt;<a class="code" href="class_coeff_based_product.html">CoeffBasedProduct</a>&lt;LhsNested,RhsNested,NestingFlags&gt; &gt;
<a name="l00052"></a>00052 {
<a name="l00053"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#a066cd581842b1c4198412abb4612fe85">00053</a>   <span class="keyword">typedef</span> <a class="code" href="struct_matrix_xpr.html" title="The type used to identify a matrix expression.">MatrixXpr</a> <a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#a066cd581842b1c4198412abb4612fe85">XprKind</a>;
<a name="l00054"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#a1a01e9ee4d04eb74e36cbfadc4b51394">00054</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structinternal_1_1remove__all.html#a563ebdff4a8ca3825b500e7efb95c4bc">remove_all&lt;LhsNested&gt;::type</a> <a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#a1a01e9ee4d04eb74e36cbfadc4b51394">_LhsNested</a>;
<a name="l00055"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aa2f48355645e6ae71af2c81ee8e0cec0">00055</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structinternal_1_1remove__all.html#a563ebdff4a8ca3825b500e7efb95c4bc">remove_all&lt;RhsNested&gt;::type</a> <a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aa2f48355645e6ae71af2c81ee8e0cec0">_RhsNested</a>;
<a name="l00056"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#a504db2aa1aed07c4e408f62835beef4e">00056</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> scalar_product_traits&lt;typename _LhsNested::Scalar, typename _RhsNested::Scalar&gt;::ReturnType <a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#a504db2aa1aed07c4e408f62835beef4e">Scalar</a>;
<a name="l00057"></a>00057   <span class="keyword">typedef</span> <span class="keyword">typename</span> promote_storage_type&lt;typename traits&lt;_LhsNested&gt;::StorageKind,
<a name="l00058"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#af64a0157c58cbc0e675a154511b33796">00058</a>                                            <span class="keyword">typename</span> traits&lt;_RhsNested&gt;::StorageKind&gt;::ret <a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#af64a0157c58cbc0e675a154511b33796">StorageKind</a>;
<a name="l00059"></a>00059   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structinternal_1_1promote__index__type.html">promote_index_type&lt;typename traits&lt;_LhsNested&gt;::Index</a>,
<a name="l00060"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aae9e6adee97b5a2af28d7145a49063f2">00060</a>                                          <span class="keyword">typename</span> traits&lt;_RhsNested&gt;::Index&gt;<a class="code" href="classinternal_1_1dense__xpr__base_1_1type.html">::type</a> <a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aae9e6adee97b5a2af28d7145a49063f2">Index</a>;
<a name="l00061"></a>00061 
<a name="l00062"></a>00062   <span class="keyword">enum</span> {
<a name="l00063"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa4539345386450a48d1544b1309c799a2">00063</a>       LhsCoeffReadCost = _LhsNested::CoeffReadCost,
<a name="l00064"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa0d7c1e5f6e31fab5e3eb4b40d32c4127">00064</a>       RhsCoeffReadCost = _RhsNested::CoeffReadCost,
<a name="l00065"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfae3e640b5ef55087c80378eed7501a07e">00065</a>       LhsFlags = _LhsNested::Flags,
<a name="l00066"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa8ef29b18552b9fcfc350340b5bd9e9f2">00066</a>       RhsFlags = _RhsNested::Flags,
<a name="l00067"></a>00067 
<a name="l00068"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfaf86aa3ff9e5ef2c75e91df2cdb1ad53d">00068</a>       RowsAtCompileTime = _LhsNested::RowsAtCompileTime,
<a name="l00069"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa1361a6343b6a2643d06a9ec9260cccd2">00069</a>       ColsAtCompileTime = _RhsNested::ColsAtCompileTime,
<a name="l00070"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa546b219162388b04b5a499db3648db4f">00070</a>       InnerSize = <a class="code" href="_macros_8h.html#af2d58514e6156c4da2d4af66fafd0b12">EIGEN_SIZE_MIN_PREFER_FIXED</a>(_LhsNested::ColsAtCompileTime, _RhsNested::RowsAtCompileTime),
<a name="l00071"></a>00071 
<a name="l00072"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa40b5b8767992503d835297d9c6c1129d">00072</a>       MaxRowsAtCompileTime = _LhsNested::MaxRowsAtCompileTime,
<a name="l00073"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfacfa4c9663572d5fe7b92f2cf5bdfac0f">00073</a>       MaxColsAtCompileTime = _RhsNested::MaxColsAtCompileTime,
<a name="l00074"></a>00074 
<a name="l00075"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa9e1307cfd68d4d17f5b070e48bfdc807">00075</a>       LhsRowMajor = LhsFlags &amp; <a class="code" href="group__flags.html#ga7bd49e7b260e869e10fb9dc4fd081a85" title="for a matrix, this means that the storage order is row-major.">RowMajorBit</a>,
<a name="l00076"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa87cb2a9fc7ecf110699053560f148c6f">00076</a>       RhsRowMajor = RhsFlags &amp; <a class="code" href="group__flags.html#ga7bd49e7b260e869e10fb9dc4fd081a85" title="for a matrix, this means that the storage order is row-major.">RowMajorBit</a>,
<a name="l00077"></a>00077 
<a name="l00078"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa22624edf88989ee5d7cb859f63d66a41">00078</a>       SameType = <a class="code" href="structinternal_1_1is__same.html">is_same&lt;typename _LhsNested::Scalar,typename _RhsNested::Scalar&gt;::value</a>,
<a name="l00079"></a>00079 
<a name="l00080"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa13977b419d57c7d33799ce5e49dcb531">00080</a>       CanVectorizeRhs = RhsRowMajor &amp;&amp; (RhsFlags &amp; <a class="code" href="group__flags.html#gaa780614dc11271c147db56e9c1524e76" title="Short version: means the expression might be vectorized.">PacketAccessBit</a>)
<a name="l00081"></a>00081                       &amp;&amp; (ColsAtCompileTime == <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>
<a name="l00082"></a>00082                           || ( (ColsAtCompileTime % <a class="code" href="structinternal_1_1packet__traits.html">packet_traits&lt;Scalar&gt;::size</a>) == 0
<a name="l00083"></a>00083                               &amp;&amp; (RhsFlags&amp;<a class="code" href="group__flags.html#ga972a2dcb6603215fa53e0b9e82051426" title="means the first coefficient packet is guaranteed to be aligned">AlignedBit</a>)
<a name="l00084"></a>00084                              )
<a name="l00085"></a>00085                          ),
<a name="l00086"></a>00086 
<a name="l00087"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa8dc2a43b5d615222c29dcc8c44eee225">00087</a>       CanVectorizeLhs = (!LhsRowMajor) &amp;&amp; (LhsFlags &amp; <a class="code" href="group__flags.html#gaa780614dc11271c147db56e9c1524e76" title="Short version: means the expression might be vectorized.">PacketAccessBit</a>)
<a name="l00088"></a>00088                       &amp;&amp; (RowsAtCompileTime == <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>
<a name="l00089"></a>00089                           || ( (RowsAtCompileTime % packet_traits&lt;Scalar&gt;::size) == 0
<a name="l00090"></a>00090                               &amp;&amp; (LhsFlags&amp;<a class="code" href="group__flags.html#ga972a2dcb6603215fa53e0b9e82051426" title="means the first coefficient packet is guaranteed to be aligned">AlignedBit</a>)
<a name="l00091"></a>00091                              )
<a name="l00092"></a>00092                          ),
<a name="l00093"></a>00093 
<a name="l00094"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa6a713fa4df12fc7d53af78af082db44a">00094</a>       EvalToRowMajor = (MaxRowsAtCompileTime==1&amp;&amp;MaxColsAtCompileTime!=1) ? 1
<a name="l00095"></a>00095                      : (MaxColsAtCompileTime==1&amp;&amp;MaxRowsAtCompileTime!=1) ? 0
<a name="l00096"></a>00096                      : (RhsRowMajor &amp;&amp; !CanVectorizeLhs),
<a name="l00097"></a>00097 
<a name="l00098"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfa88864a4b281d03346b34c41d8c732926">00098</a>       Flags = ((<span class="keywordtype">unsigned</span> int)(LhsFlags | RhsFlags) &amp; <a class="code" href="_constants_8h.html#ab3a408f1142a07c31e28ff8b51175c74">HereditaryBits</a> &amp; ~RowMajorBit)
<a name="l00099"></a>00099             | (EvalToRowMajor ? RowMajorBit : 0)
<a name="l00100"></a>00100             | NestingFlags
<a name="l00101"></a>00101             | (LhsFlags &amp; RhsFlags &amp; <a class="code" href="group__flags.html#ga972a2dcb6603215fa53e0b9e82051426" title="means the first coefficient packet is guaranteed to be aligned">AlignedBit</a>)
<a name="l00102"></a>00102             <span class="comment">// TODO enable vectorization for mixed types</span>
<a name="l00103"></a>00103             | (SameType &amp;&amp; (CanVectorizeLhs || CanVectorizeRhs) ? <a class="code" href="group__flags.html#gaa780614dc11271c147db56e9c1524e76" title="Short version: means the expression might be vectorized.">PacketAccessBit</a> : 0),
<a name="l00104"></a>00104 
<a name="l00105"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfab01dadd35c77b3c785659da8245a7d95">00105</a>       CoeffReadCost = InnerSize == <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a> ? <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>
<a name="l00106"></a>00106                     : InnerSize * (<a class="code" href="struct_num_traits.html" title="Holds information about the various numeric (i.e.">NumTraits&lt;Scalar&gt;::MulCost</a> + LhsCoeffReadCost + RhsCoeffReadCost)
<a name="l00107"></a>00107                       + (InnerSize - 1) * <a class="code" href="struct_num_traits.html" title="Holds information about the various numeric (i.e.">NumTraits&lt;Scalar&gt;::AddCost</a>,
<a name="l00108"></a>00108 
<a name="l00109"></a>00109       <span class="comment">/* CanVectorizeInner deserves special explanation. It does not affect the product flags. It is not used outside</span>
<a name="l00110"></a>00110 <span class="comment">      * of Product. If the Product itself is not a packet-access expression, there is still a chance that the inner</span>
<a name="l00111"></a>00111 <span class="comment">      * loop of the product might be vectorized. This is the meaning of CanVectorizeInner. Since it doesn&#39;t affect</span>
<a name="l00112"></a>00112 <span class="comment">      * the Flags, it is safe to make this value depend on ActualPacketAccessBit, that doesn&#39;t affect the ABI.</span>
<a name="l00113"></a>00113 <span class="comment">      */</span>
<a name="l00114"></a><a class="code" href="structinternal_1_1traits_3_01_coeff_based_product_3_01_lhs_nested_00_01_rhs_nested_00_01_nesting_flags_01_4_01_4.html#aac7eb4bcd8bc2d09b0acb40e7960decfae6fb622ca5dfe3a83ccd32d826ed7c14">00114</a>       CanVectorizeInner =    SameType
<a name="l00115"></a>00115                           &amp;&amp; LhsRowMajor
<a name="l00116"></a>00116                           &amp;&amp; (!RhsRowMajor)
<a name="l00117"></a>00117                           &amp;&amp; (LhsFlags &amp; RhsFlags &amp; <a class="code" href="_constants_8h.html#aafbee24aed0aa204db61f7fce3334329">ActualPacketAccessBit</a>)
<a name="l00118"></a>00118                           &amp;&amp; (LhsFlags &amp; RhsFlags &amp; <a class="code" href="group__flags.html#ga972a2dcb6603215fa53e0b9e82051426" title="means the first coefficient packet is guaranteed to be aligned">AlignedBit</a>)
<a name="l00119"></a>00119                           &amp;&amp; (InnerSize % packet_traits&lt;Scalar&gt;::size == 0)
<a name="l00120"></a>00120     };
<a name="l00121"></a>00121 };
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 } <span class="comment">// end namespace internal</span>
<a name="l00124"></a>00124 
<a name="l00125"></a>00125 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> LhsNested, <span class="keyword">typename</span> RhsNested, <span class="keywordtype">int</span> NestingFlags&gt;
<a name="l00126"></a><a class="code" href="class_coeff_based_product.html">00126</a> <span class="keyword">class </span><a class="code" href="class_coeff_based_product.html">CoeffBasedProduct</a>
<a name="l00127"></a>00127   : internal::no_assignment_operator,
<a name="l00128"></a>00128     <span class="keyword">public</span> <a class="code" href="class_matrix_base.html" title="Base class for all dense matrices, vectors, and expressions.">MatrixBase</a>&lt;CoeffBasedProduct&lt;LhsNested, RhsNested, NestingFlags&gt; &gt;
<a name="l00129"></a>00129 {
<a name="l00130"></a>00130   <span class="keyword">public</span>:
<a name="l00131"></a>00131 
<a name="l00132"></a><a class="code" href="class_coeff_based_product.html#ae1db832d7772bb9a67f2a622724fc6bd">00132</a>     <span class="keyword">typedef</span> <a class="code" href="class_matrix_base.html" title="Base class for all dense matrices, vectors, and expressions.">MatrixBase&lt;CoeffBasedProduct&gt;</a> <a class="code" href="class_coeff_based_product.html#ae1db832d7772bb9a67f2a622724fc6bd">Base</a>;
<a name="l00133"></a>00133     <a class="code" href="_macros_8h.html#ab29ea1da9635d033ca44cf26ad6fa0cf">EIGEN_DENSE_PUBLIC_INTERFACE</a>(<a class="code" href="class_coeff_based_product.html">CoeffBasedProduct</a>)
<a name="l00134"></a><a class="code" href="class_coeff_based_product.html#a36944caaa043a4678db2cf1146185dd4">00134</a>     typedef typename <a class="code" href="class_matrix_base.html" title="Base class for all dense matrices, vectors, and expressions.">Base</a>::<a class="code" href="class_matrix.html" title="The matrix class, also used for vectors and row-vectors.">PlainObject</a> <a class="code" href="class_matrix.html" title="The matrix class, also used for vectors and row-vectors.">PlainObject</a>;
<a name="l00135"></a>00135 
<a name="l00136"></a>00136   private:
<a name="l00137"></a>00137 
<a name="l00138"></a><a class="code" href="class_coeff_based_product.html#abf50efc7a1656fb8601fc914976763f2">00138</a>     typedef typename internal::traits&lt;<a class="code" href="class_coeff_based_product.html">CoeffBasedProduct</a>&gt;::<a class="code" href="class_coeff_based_product.html#abf50efc7a1656fb8601fc914976763f2">_LhsNested</a> <a class="code" href="class_coeff_based_product.html#abf50efc7a1656fb8601fc914976763f2">_LhsNested</a>;
<a name="l00139"></a><a class="code" href="class_coeff_based_product.html#ac07baa3de27b1238060bdcf84aefef37">00139</a>     typedef typename internal::traits&lt;<a class="code" href="class_coeff_based_product.html">CoeffBasedProduct</a>&gt;::<a class="code" href="class_coeff_based_product.html#ac07baa3de27b1238060bdcf84aefef37">_RhsNested</a> <a class="code" href="class_coeff_based_product.html#ac07baa3de27b1238060bdcf84aefef37">_RhsNested</a>;
<a name="l00140"></a>00140 
<a name="l00141"></a>00141     enum {
<a name="l00142"></a><a class="code" href="class_coeff_based_product.html#ac7045f1580aa4bed48869e03fcc478f4a58457701f67ba54c73ecf26e8702eb52">00142</a>       PacketSize = <a class="code" href="structinternal_1_1packet__traits.html">internal::packet_traits&lt;Scalar&gt;::size</a>,
<a name="l00143"></a><a class="code" href="class_coeff_based_product.html#ac7045f1580aa4bed48869e03fcc478f4accdeaa3324987ccb5a070b6077c51584">00143</a>       InnerSize  = internal::traits&lt;CoeffBasedProduct&gt;::InnerSize,
<a name="l00144"></a><a class="code" href="class_coeff_based_product.html#ac7045f1580aa4bed48869e03fcc478f4a79c6c3275506dd8cc6eadd63ca94d4ba">00144</a>       Unroll = CoeffReadCost != <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a> &amp;&amp; CoeffReadCost &lt;= <a class="code" href="_settings_8h.html#a82cebcbf6c1138bd0f956d10fc46ef75" title="Defines the maximal loop size to enable meta unrolling of loops.">EIGEN_UNROLLING_LIMIT</a>,
<a name="l00145"></a><a class="code" href="class_coeff_based_product.html#ac7045f1580aa4bed48869e03fcc478f4a65601769850c82c5ff790e7bad5f33f2">00145</a>       CanVectorizeInner = internal::traits&lt;CoeffBasedProduct&gt;::CanVectorizeInner
<a name="l00146"></a>00146     };
<a name="l00147"></a>00147 
<a name="l00148"></a>00148     <span class="keyword">typedef</span> internal::product_coeff_impl&lt;CanVectorizeInner ? <a class="code" href="_constants_8h.html#a85f0f418e1a739554f3f904a501179dca937cb0c42c9776cd97661409f339e8d8">InnerVectorizedTraversal</a> : <a class="code" href="_constants_8h.html#a85f0f418e1a739554f3f904a501179dca6dec05949799644cc2d9010633497c53">DefaultTraversal</a>,
<a name="l00149"></a>00149                                    Unroll ? InnerSize-1 : <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>,
<a name="l00150"></a><a class="code" href="class_coeff_based_product.html#aab3615ea3d0c102af1f06fd182bcffd5">00150</a>                                    <a class="code" href="class_coeff_based_product.html#abf50efc7a1656fb8601fc914976763f2">_LhsNested</a>, <a class="code" href="class_coeff_based_product.html#ac07baa3de27b1238060bdcf84aefef37">_RhsNested</a>, <a class="code" href="class_dense_base.html#a6a6c17e367430ca95523eb3fe7db9076">Scalar</a>&gt; <a class="code" href="class_coeff_based_product.html#aab3615ea3d0c102af1f06fd182bcffd5">ScalarCoeffImpl</a>;
<a name="l00151"></a>00151 
<a name="l00152"></a><a class="code" href="class_coeff_based_product.html#a18cdb30db89049a40aa36e14ef388ec4">00152</a>     <span class="keyword">typedef</span> <a class="code" href="class_coeff_based_product.html">CoeffBasedProduct&lt;LhsNested,RhsNested,NestByRefBit&gt;</a> <a class="code" href="class_coeff_based_product.html#a18cdb30db89049a40aa36e14ef388ec4">LazyCoeffBasedProductType</a>;
<a name="l00153"></a>00153 
<a name="l00154"></a>00154   <span class="keyword">public</span>:
<a name="l00155"></a>00155 
<a name="l00156"></a><a class="code" href="class_coeff_based_product.html#a803d4b65cc22f5413e05557a8b546a61">00156</a>     <span class="keyword">inline</span> <a class="code" href="class_coeff_based_product.html">CoeffBasedProduct</a>(<span class="keyword">const</span> <a class="code" href="class_coeff_based_product.html">CoeffBasedProduct</a>&amp; other)
<a name="l00157"></a>00157       : <a class="code" href="class_matrix_base.html" title="Base class for all dense matrices, vectors, and expressions.">Base</a>(), m_lhs(other.m_lhs), m_rhs(other.m_rhs)
<a name="l00158"></a>00158     {}
<a name="l00159"></a>00159 
<a name="l00160"></a>00160     <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs&gt;
<a name="l00161"></a><a class="code" href="class_coeff_based_product.html#a0d9c7160e95ad4fab4e6edac6997a927">00161</a>     <span class="keyword">inline</span> <a class="code" href="class_coeff_based_product.html">CoeffBasedProduct</a>(<span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs)
<a name="l00162"></a>00162       : m_lhs(lhs), m_rhs(rhs)
<a name="l00163"></a>00163     {
<a name="l00164"></a>00164       <span class="comment">// we don&#39;t allow taking products of matrices of different real types, as that wouldn&#39;t be vectorizable.</span>
<a name="l00165"></a>00165       <span class="comment">// We still allow to mix T and complex&lt;T&gt;.</span>
<a name="l00166"></a>00166       <a class="code" href="_static_assert_8h.html#ac95cf960f4a8395b28af90edfda755f0">EIGEN_STATIC_ASSERT</a>((<a class="code" href="structinternal_1_1is__same.html">internal::is_same&lt;typename Lhs::RealScalar, typename Rhs::RealScalar&gt;::value</a>),
<a name="l00167"></a>00167         YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
<a name="l00168"></a>00168       <a class="code" href="_macros_8h.html#acaa7ba89800cfe18d5fd6eed620aea9c">eigen_assert</a>(lhs.cols() == rhs.rows()
<a name="l00169"></a>00169         &amp;&amp; <span class="stringliteral">&quot;invalid matrix product&quot;</span>
<a name="l00170"></a>00170         &amp;&amp; <span class="stringliteral">&quot;if you wanted a coeff-wise or a dot product use the respective explicit functions&quot;</span>);
<a name="l00171"></a>00171     }
<a name="l00172"></a>00172 
<a name="l00173"></a><a class="code" href="class_coeff_based_product.html#accb026f3af5651538eb360a06de17be9">00173</a>     <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="class_coeff_based_product.html#accb026f3af5651538eb360a06de17be9">rows</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_lhs.rows(); }
<a name="l00174"></a><a class="code" href="class_coeff_based_product.html#ae1417d4ad3fbfa23cc50a4456e17c272">00174</a>     <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="class_coeff_based_product.html#ae1417d4ad3fbfa23cc50a4456e17c272">cols</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_rhs.cols(); }
<a name="l00175"></a>00175 
<a name="l00176"></a><a class="code" href="class_coeff_based_product.html#afca5ab136761a567c2398d77b0f5375e">00176</a>     <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">const</span> <a class="code" href="class_dense_base.html#a6a6c17e367430ca95523eb3fe7db9076">Scalar</a> coeff(<a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>)<span class="keyword"> const</span>
<a name="l00177"></a>00177 <span class="keyword">    </span>{
<a name="l00178"></a>00178       <a class="code" href="class_dense_base.html#a6a6c17e367430ca95523eb3fe7db9076">Scalar</a> res;
<a name="l00179"></a>00179       ScalarCoeffImpl::run(row, col, m_lhs, m_rhs, res);
<a name="l00180"></a>00180       <span class="keywordflow">return</span> res;
<a name="l00181"></a>00181     }
<a name="l00182"></a>00182 
<a name="l00183"></a>00183     <span class="comment">/* Allow index-based non-packet access. It is impossible though to allow index-based packed access,</span>
<a name="l00184"></a>00184 <span class="comment">     * which is why we don&#39;t set the LinearAccessBit.</span>
<a name="l00185"></a>00185 <span class="comment">     */</span>
<a name="l00186"></a><a class="code" href="class_coeff_based_product.html#a970cac73f9d6c73d87a7e4608d13fd60">00186</a>     <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">const</span> <a class="code" href="class_dense_base.html#a6a6c17e367430ca95523eb3fe7db9076">Scalar</a> coeff(<a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> index)<span class="keyword"> const</span>
<a name="l00187"></a>00187 <span class="keyword">    </span>{
<a name="l00188"></a>00188       <a class="code" href="class_dense_base.html#a6a6c17e367430ca95523eb3fe7db9076">Scalar</a> res;
<a name="l00189"></a>00189       <span class="keyword">const</span> <a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a> = RowsAtCompileTime == 1 ? 0 : index;
<a name="l00190"></a>00190       <span class="keyword">const</span> <a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a> = RowsAtCompileTime == 1 ? index : 0;
<a name="l00191"></a>00191       ScalarCoeffImpl::run(row, col, m_lhs, m_rhs, res);
<a name="l00192"></a>00192       <span class="keywordflow">return</span> res;
<a name="l00193"></a>00193     }
<a name="l00194"></a>00194 
<a name="l00195"></a>00195     <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> LoadMode&gt;
<a name="l00196"></a><a class="code" href="class_coeff_based_product.html#a676ce162f1e7b847d987c5b867486ae6">00196</a>     <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">const</span> <a class="code" href="class_dense_base.html#af73f13c5f4b9805889339c4b492f0af9">PacketScalar</a> packet(<a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>)<span class="keyword"> const</span>
<a name="l00197"></a>00197 <span class="keyword">    </span>{
<a name="l00198"></a>00198       <a class="code" href="class_dense_base.html#af73f13c5f4b9805889339c4b492f0af9">PacketScalar</a> res;
<a name="l00199"></a>00199       internal::product_packet_impl&lt;Flags&amp;RowMajorBit ? <a class="code" href="_constants_8h.html#aab4d131ba129f519b9e2bd349dc19e3aa1e16fa1b92ed7a058cd4ce7a9a0db044">RowMajor</a> : <a class="code" href="_constants_8h.html#aab4d131ba129f519b9e2bd349dc19e3aac86184b0e3be936fbfd20249a057a0bf">ColMajor</a>,
<a name="l00200"></a>00200                               Unroll ? InnerSize-1 : <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>,
<a name="l00201"></a>00201                               <a class="code" href="class_coeff_based_product.html#abf50efc7a1656fb8601fc914976763f2">_LhsNested</a>, <a class="code" href="class_coeff_based_product.html#ac07baa3de27b1238060bdcf84aefef37">_RhsNested</a>, <a class="code" href="class_dense_base.html#af73f13c5f4b9805889339c4b492f0af9">PacketScalar</a>, LoadMode&gt;
<a name="l00202"></a>00202         ::run(<a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, m_lhs, m_rhs, res);
<a name="l00203"></a>00203       <span class="keywordflow">return</span> res;
<a name="l00204"></a>00204     }
<a name="l00205"></a>00205 
<a name="l00206"></a>00206     <span class="comment">// Implicit conversion to the nested type (trigger the evaluation of the product)</span>
<a name="l00207"></a><a class="code" href="class_coeff_based_product.html#ab198a45930f150c459d4b7adc15fdb18">00207</a>     <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> operator const PlainObject&amp; ()<span class="keyword"> const</span>
<a name="l00208"></a>00208 <span class="keyword">    </span>{
<a name="l00209"></a>00209       m_result.lazyAssign(*<span class="keyword">this</span>);
<a name="l00210"></a>00210       <span class="keywordflow">return</span> m_result;
<a name="l00211"></a>00211     }
<a name="l00212"></a>00212 
<a name="l00213"></a><a class="code" href="class_coeff_based_product.html#a8220d744b03f3299ef1e36ce84545b23">00213</a>     <span class="keyword">const</span> <a class="code" href="class_coeff_based_product.html#abf50efc7a1656fb8601fc914976763f2">_LhsNested</a>&amp; <a class="code" href="class_coeff_based_product.html#a8220d744b03f3299ef1e36ce84545b23">lhs</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_lhs; }
<a name="l00214"></a><a class="code" href="class_coeff_based_product.html#ae1624dea9fb0faf7296bcbe1ec68bdb4">00214</a>     <span class="keyword">const</span> <a class="code" href="class_coeff_based_product.html#ac07baa3de27b1238060bdcf84aefef37">_RhsNested</a>&amp; <a class="code" href="class_coeff_based_product.html#ae1624dea9fb0faf7296bcbe1ec68bdb4">rhs</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_rhs; }
<a name="l00215"></a>00215 
<a name="l00216"></a><a class="code" href="class_coeff_based_product.html#a2714f709293fd7dd12252f03762441f0">00216</a>     <span class="keyword">const</span> <a class="code" href="class_diagonal.html" title="Expression of a diagonal/subdiagonal/superdiagonal in a matrix.">Diagonal&lt;LazyCoeffBasedProductType,0&gt;</a> diagonal()<span class="keyword"> const</span>
<a name="l00217"></a>00217 <span class="keyword">    </span>{ <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><a class="code" href="class_coeff_based_product.html">LazyCoeffBasedProductType</a>&amp;<span class="keyword">&gt;</span>(*this); }
<a name="l00218"></a>00218 
<a name="l00219"></a>00219     <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> DiagonalIndex&gt;
<a name="l00220"></a><a class="code" href="class_coeff_based_product.html#a784c04d1ea2d4373562e291927069557">00220</a>     <span class="keyword">const</span> <a class="code" href="class_diagonal.html" title="Expression of a diagonal/subdiagonal/superdiagonal in a matrix.">Diagonal&lt;LazyCoeffBasedProductType,DiagonalIndex&gt;</a> diagonal()<span class="keyword"> const</span>
<a name="l00221"></a>00221 <span class="keyword">    </span>{ <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><a class="code" href="class_coeff_based_product.html">LazyCoeffBasedProductType</a>&amp;<span class="keyword">&gt;</span>(*this); }
<a name="l00222"></a>00222 
<a name="l00223"></a><a class="code" href="class_coeff_based_product.html#a0900fdbfd11a982aa627fd65cf3756bf">00223</a>     <span class="keyword">const</span> <a class="code" href="class_diagonal.html" title="Expression of a diagonal/subdiagonal/superdiagonal in a matrix.">Diagonal&lt;LazyCoeffBasedProductType,Dynamic&gt;</a> diagonal(<a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> index)<span class="keyword"> const</span>
<a name="l00224"></a>00224 <span class="keyword">    </span>{ <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><a class="code" href="class_coeff_based_product.html">LazyCoeffBasedProductType</a>&amp;<span class="keyword">&gt;</span>(*this).<a class="code" href="class_coeff_based_product.html#a2714f709293fd7dd12252f03762441f0">diagonal</a>(index); }
<a name="l00225"></a>00225 
<a name="l00226"></a>00226   <span class="keyword">protected</span>:
<a name="l00227"></a><a class="code" href="class_coeff_based_product.html#a275965fc99c6ce31ade4b946db47554f">00227</a>     <span class="keyword">const</span> LhsNested <a class="code" href="class_coeff_based_product.html#a275965fc99c6ce31ade4b946db47554f">m_lhs</a>;
<a name="l00228"></a><a class="code" href="class_coeff_based_product.html#a9032c33fb36771399bb64e04cb71530e">00228</a>     <span class="keyword">const</span> RhsNested <a class="code" href="class_coeff_based_product.html#a9032c33fb36771399bb64e04cb71530e">m_rhs</a>;
<a name="l00229"></a>00229 
<a name="l00230"></a><a class="code" href="class_coeff_based_product.html#a96d1032b736fac6e418b103983bac9d6">00230</a>     <span class="keyword">mutable</span> <a class="code" href="class_matrix.html" title="The matrix class, also used for vectors and row-vectors.">PlainObject</a> <a class="code" href="class_coeff_based_product.html#a96d1032b736fac6e418b103983bac9d6">m_result</a>;
<a name="l00231"></a>00231 };
<a name="l00232"></a>00232 
<a name="l00233"></a>00233 <span class="keyword">namespace </span>internal {
<a name="l00234"></a>00234 
<a name="l00235"></a>00235 <span class="comment">// here we need to overload the nested rule for products</span>
<a name="l00236"></a>00236 <span class="comment">// such that the nested type is a const reference to a plain matrix</span>
<a name="l00237"></a>00237 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keywordtype">int</span> N, <span class="keyword">typename</span> PlainObject&gt;
<a name="l00238"></a><a class="code" href="structinternal_1_1nested_3_01_coeff_based_product_3_01_lhs_00_01_rhs_00_01_eval_before_nesting_b27781ebabd5938076837c532e1a5b8d7.html">00238</a> <span class="keyword">struct </span><a class="code" href="structinternal_1_1nested.html">nested</a>&lt;<a class="code" href="class_coeff_based_product.html">CoeffBasedProduct</a>&lt;Lhs,Rhs,<a class="code" href="group__flags.html#gaf8ad6e2956f7368b8e3f7407e2319e63" title="means the expression should be evaluated by the calling expression">EvalBeforeNestingBit</a>|<a class="code" href="group__flags.html#gadc8925e67a5a54bd479d6f587112e19a" title="means the expression should be evaluated before any assignment">EvalBeforeAssigningBit</a>&gt;, N, PlainObject&gt;
<a name="l00239"></a>00239 {
<a name="l00240"></a><a class="code" href="structinternal_1_1nested_3_01_coeff_based_product_3_01_lhs_00_01_rhs_00_01_eval_before_nesting_b27781ebabd5938076837c532e1a5b8d7.html#a7be065c7f9bcb6545fcdfa43b5aa2b27">00240</a>   <span class="keyword">typedef</span> PlainObject <span class="keyword">const</span>&amp; <a class="code" href="structinternal_1_1nested_3_01_coeff_based_product_3_01_lhs_00_01_rhs_00_01_eval_before_nesting_b27781ebabd5938076837c532e1a5b8d7.html#a7be065c7f9bcb6545fcdfa43b5aa2b27">type</a>;
<a name="l00241"></a>00241 };
<a name="l00242"></a>00242 
<a name="l00243"></a>00243 <span class="comment">/***************************************************************************</span>
<a name="l00244"></a>00244 <span class="comment">* Normal product .coeff() implementation (with meta-unrolling)</span>
<a name="l00245"></a>00245 <span class="comment">***************************************************************************/</span>
<a name="l00246"></a>00246 
<a name="l00247"></a>00247 <span class="comment">/**************************************</span>
<a name="l00248"></a>00248 <span class="comment">*** Scalar path  - no vectorization ***</span>
<a name="l00249"></a>00249 <span class="comment">**************************************/</span>
<a name="l00250"></a>00250 
<a name="l00251"></a>00251 <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> UnrollingIndex, <span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> RetScalar&gt;
<a name="l00252"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_unrolling_index_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html">00252</a> <span class="keyword">struct </span>product_coeff_impl&lt;<a class="code" href="_constants_8h.html#a85f0f418e1a739554f3f904a501179dca6dec05949799644cc2d9010633497c53">DefaultTraversal</a>, UnrollingIndex, Lhs, Rhs, RetScalar&gt;
<a name="l00253"></a>00253 {
<a name="l00254"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_unrolling_index_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a88f0eccafcb5293e9f5fd4c985bc882a">00254</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_unrolling_index_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a88f0eccafcb5293e9f5fd4c985bc882a">Index</a>;
<a name="l00255"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_unrolling_index_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a24e9373b1066ebc34d61970fc8650aa1">00255</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_unrolling_index_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a88f0eccafcb5293e9f5fd4c985bc882a">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_unrolling_index_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a88f0eccafcb5293e9f5fd4c985bc882a">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, RetScalar &amp;res)
<a name="l00256"></a>00256   {
<a name="l00257"></a>00257     product_coeff_impl&lt;DefaultTraversal, UnrollingIndex-1, Lhs, Rhs, RetScalar&gt;::run(row, col, lhs, rhs, res);
<a name="l00258"></a>00258     res += lhs.coeff(row, UnrollingIndex) * rhs.coeff(UnrollingIndex, col);
<a name="l00259"></a>00259   }
<a name="l00260"></a>00260 };
<a name="l00261"></a>00261 
<a name="l00262"></a>00262 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> RetScalar&gt;
<a name="l00263"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_010_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html">00263</a> <span class="keyword">struct </span>product_coeff_impl&lt;<a class="code" href="_constants_8h.html#a85f0f418e1a739554f3f904a501179dca6dec05949799644cc2d9010633497c53">DefaultTraversal</a>, 0, Lhs, Rhs, RetScalar&gt;
<a name="l00264"></a>00264 {
<a name="l00265"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_010_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#ad8ef7e8c0ae18bb6b55d5588a9214160">00265</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_010_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#ad8ef7e8c0ae18bb6b55d5588a9214160">Index</a>;
<a name="l00266"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_010_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a5f348ddfb0a0dffd602c5a19ac9a6106">00266</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_010_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#ad8ef7e8c0ae18bb6b55d5588a9214160">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_010_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#ad8ef7e8c0ae18bb6b55d5588a9214160">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, RetScalar &amp;res)
<a name="l00267"></a>00267   {
<a name="l00268"></a>00268     res = lhs.coeff(row, 0) * rhs.coeff(0, col);
<a name="l00269"></a>00269   }
<a name="l00270"></a>00270 };
<a name="l00271"></a>00271 
<a name="l00272"></a>00272 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> RetScalar&gt;
<a name="l00273"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html">00273</a> <span class="keyword">struct </span>product_coeff_impl&lt;<a class="code" href="_constants_8h.html#a85f0f418e1a739554f3f904a501179dca6dec05949799644cc2d9010633497c53">DefaultTraversal</a>, <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>, Lhs, Rhs, RetScalar&gt;
<a name="l00274"></a>00274 {
<a name="l00275"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#af2bca98b7859b11e6e491722f27197fb">00275</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#af2bca98b7859b11e6e491722f27197fb">Index</a>;
<a name="l00276"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a3d4225718ff6be91515d85e61d70f171">00276</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#af2bca98b7859b11e6e491722f27197fb">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#af2bca98b7859b11e6e491722f27197fb">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, RetScalar&amp; res)
<a name="l00277"></a>00277   {
<a name="l00278"></a>00278     <a class="code" href="_macros_8h.html#acaa7ba89800cfe18d5fd6eed620aea9c">eigen_assert</a>(lhs.cols()&gt;0 &amp;&amp; <span class="stringliteral">&quot;you are using a non initialized matrix&quot;</span>);
<a name="l00279"></a>00279     res = lhs.coeff(row, 0) * rhs.coeff(0, col);
<a name="l00280"></a>00280       <span class="keywordflow">for</span>(<a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#af2bca98b7859b11e6e491722f27197fb">Index</a> i = 1; i &lt; lhs.cols(); ++i)
<a name="l00281"></a>00281         res += lhs.coeff(row, i) * rhs.coeff(i, col);
<a name="l00282"></a>00282   }
<a name="l00283"></a>00283 };
<a name="l00284"></a>00284 
<a name="l00285"></a>00285 <span class="comment">/*******************************************</span>
<a name="l00286"></a>00286 <span class="comment">*** Scalar path with inner vectorization ***</span>
<a name="l00287"></a>00287 <span class="comment">*******************************************/</span>
<a name="l00288"></a>00288 
<a name="l00289"></a>00289 <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> UnrollingIndex, <span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> Packet&gt;
<a name="l00290"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__unroller.html">00290</a> <span class="keyword">struct </span><a class="code" href="structinternal_1_1product__coeff__vectorized__unroller.html">product_coeff_vectorized_unroller</a>
<a name="l00291"></a>00291 {
<a name="l00292"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__unroller.html#aa4633e494d3e8215e1a28dc57181caf0">00292</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__coeff__vectorized__unroller.html#aa4633e494d3e8215e1a28dc57181caf0">Index</a>;
<a name="l00293"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__unroller.html#a1e255aebafc3f909162bdc6b17698749a21b20834a66da3ad5ce1aef862e390c1">00293</a>   <span class="keyword">enum</span> { PacketSize = <a class="code" href="structinternal_1_1packet__traits.html">packet_traits&lt;typename Lhs::Scalar&gt;::size</a> };
<a name="l00294"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__unroller.html#a88784fa7a4f36e110ff82eadf6e087ee">00294</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__coeff__vectorized__unroller.html#aa4633e494d3e8215e1a28dc57181caf0">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__coeff__vectorized__unroller.html#aa4633e494d3e8215e1a28dc57181caf0">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, <span class="keyword">typename</span> Lhs::PacketScalar &amp;pres)
<a name="l00295"></a>00295   {
<a name="l00296"></a>00296     <a class="code" href="structinternal_1_1product__coeff__vectorized__unroller.html">product_coeff_vectorized_unroller&lt;UnrollingIndex-PacketSize, Lhs, Rhs, Packet&gt;::run</a>(row, col, lhs, rhs, pres);
<a name="l00297"></a>00297     pres = <a class="code" href="namespaceinternal.html#a420c82c353220c886c43f32009a190e4">padd</a>(pres, <a class="code" href="namespaceinternal.html#a0193dc8fa17d13ef68cc74284b5a0c14">pmul</a>( lhs.template packet&lt;Aligned&gt;(row, UnrollingIndex) , rhs.template packet&lt;Aligned&gt;(UnrollingIndex, col) ));
<a name="l00298"></a>00298   }
<a name="l00299"></a>00299 };
<a name="l00300"></a>00300 
<a name="l00301"></a>00301 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> Packet&gt;
<a name="l00302"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__unroller_3_010_00_01_lhs_00_01_rhs_00_01_packet_01_4.html">00302</a> <span class="keyword">struct </span><a class="code" href="structinternal_1_1product__coeff__vectorized__unroller.html">product_coeff_vectorized_unroller</a>&lt;0, Lhs, Rhs, Packet&gt;
<a name="l00303"></a>00303 {
<a name="l00304"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__unroller_3_010_00_01_lhs_00_01_rhs_00_01_packet_01_4.html#a80578caab2c0723eaec7248c0bb43a6c">00304</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__coeff__vectorized__unroller_3_010_00_01_lhs_00_01_rhs_00_01_packet_01_4.html#a80578caab2c0723eaec7248c0bb43a6c">Index</a>;
<a name="l00305"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__unroller_3_010_00_01_lhs_00_01_rhs_00_01_packet_01_4.html#a8902a16011b0ce64bcf573a1d1fc0bfe">00305</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__coeff__vectorized__unroller_3_010_00_01_lhs_00_01_rhs_00_01_packet_01_4.html#a80578caab2c0723eaec7248c0bb43a6c">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__coeff__vectorized__unroller_3_010_00_01_lhs_00_01_rhs_00_01_packet_01_4.html#a80578caab2c0723eaec7248c0bb43a6c">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, <span class="keyword">typename</span> Lhs::PacketScalar &amp;pres)
<a name="l00306"></a>00306   {
<a name="l00307"></a>00307     pres = <a class="code" href="namespaceinternal.html#a0193dc8fa17d13ef68cc74284b5a0c14">pmul</a>(lhs.template packet&lt;Aligned&gt;(row, 0) , rhs.template packet&lt;Aligned&gt;(0, col));
<a name="l00308"></a>00308   }
<a name="l00309"></a>00309 };
<a name="l00310"></a>00310 
<a name="l00311"></a>00311 <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> UnrollingIndex, <span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> RetScalar&gt;
<a name="l00312"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_unrolling_index_00_aeb64dac38693f403641cc78911646e2.html">00312</a> <span class="keyword">struct </span>product_coeff_impl&lt;<a class="code" href="_constants_8h.html#a85f0f418e1a739554f3f904a501179dca937cb0c42c9776cd97661409f339e8d8">InnerVectorizedTraversal</a>, UnrollingIndex, Lhs, Rhs, RetScalar&gt;
<a name="l00313"></a>00313 {
<a name="l00314"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_unrolling_index_00_aeb64dac38693f403641cc78911646e2.html#a5bf7326f4281726d10e0170004c6c510">00314</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::PacketScalar <a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_unrolling_index_00_aeb64dac38693f403641cc78911646e2.html#a5bf7326f4281726d10e0170004c6c510">Packet</a>;
<a name="l00315"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_unrolling_index_00_aeb64dac38693f403641cc78911646e2.html#ada4a744a930dd0777f8c7d4445085aec">00315</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_unrolling_index_00_aeb64dac38693f403641cc78911646e2.html#ada4a744a930dd0777f8c7d4445085aec">Index</a>;
<a name="l00316"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_unrolling_index_00_aeb64dac38693f403641cc78911646e2.html#a1da9bdcfd77c4136af2493382e573be2ac7def6c9649ff364c6a946c33d7c083a">00316</a>   <span class="keyword">enum</span> { PacketSize = <a class="code" href="structinternal_1_1packet__traits.html">packet_traits&lt;typename Lhs::Scalar&gt;::size</a> };
<a name="l00317"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_unrolling_index_00_aeb64dac38693f403641cc78911646e2.html#a5831c7421f0392939c7d4a147209e595">00317</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_unrolling_index_00_aeb64dac38693f403641cc78911646e2.html#ada4a744a930dd0777f8c7d4445085aec">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_unrolling_index_00_aeb64dac38693f403641cc78911646e2.html#ada4a744a930dd0777f8c7d4445085aec">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, RetScalar &amp;res)
<a name="l00318"></a>00318   {
<a name="l00319"></a>00319     <a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_unrolling_index_00_aeb64dac38693f403641cc78911646e2.html#a5bf7326f4281726d10e0170004c6c510">Packet</a> pres;
<a name="l00320"></a>00320     <a class="code" href="structinternal_1_1product__coeff__vectorized__unroller.html">product_coeff_vectorized_unroller&lt;UnrollingIndex+1-PacketSize, Lhs, Rhs, Packet&gt;::run</a>(row, col, lhs, rhs, pres);
<a name="l00321"></a>00321     <a class="code" href="structinternal_1_1product__coeff__impl_3_01_default_traversal_00_01_unrolling_index_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a24e9373b1066ebc34d61970fc8650aa1">product_coeff_impl&lt;DefaultTraversal,UnrollingIndex,Lhs,Rhs,RetScalar&gt;::run</a>(row, col, lhs, rhs, res);
<a name="l00322"></a>00322     res = <a class="code" href="namespaceinternal.html#a0edef90c8291ce0edcd5cefb9c93b5c3">predux</a>(pres);
<a name="l00323"></a>00323   }
<a name="l00324"></a>00324 };
<a name="l00325"></a>00325 
<a name="l00326"></a>00326 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keywordtype">int</span> LhsRows = Lhs::RowsAtCompileTime, <span class="keywordtype">int</span> RhsCols = Rhs::ColsAtCompileTime&gt;
<a name="l00327"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector.html">00327</a> <span class="keyword">struct </span><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector.html">product_coeff_vectorized_dyn_selector</a>
<a name="l00328"></a>00328 {
<a name="l00329"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector.html#a82577c04ac958f2e9c695e53e6240c68">00329</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector.html#a82577c04ac958f2e9c695e53e6240c68">Index</a>;
<a name="l00330"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector.html#a17b4514492d55cc568128b0b556de687">00330</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector.html#a82577c04ac958f2e9c695e53e6240c68">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector.html#a82577c04ac958f2e9c695e53e6240c68">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, <span class="keyword">typename</span> Lhs::Scalar &amp;res)
<a name="l00331"></a>00331   {
<a name="l00332"></a>00332     res = lhs.row(row).transpose().cwiseProduct(rhs.col(col)).<a class="code" href="namespacemrpt_1_1math.html#a73bb4427a78a19d9b7dc9feeb7c13b5a" title="Computes the sum of all the elements.">sum</a>();
<a name="l00333"></a>00333   }
<a name="l00334"></a>00334 };
<a name="l00335"></a>00335 
<a name="l00336"></a>00336 <span class="comment">// NOTE the 3 following specializations are because taking .col(0) on a vector is a bit slower</span>
<a name="l00337"></a>00337 <span class="comment">// NOTE maybe they are now useless since we have a specialization for Block&lt;Matrix&gt;</span>
<a name="l00338"></a>00338 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keywordtype">int</span> RhsCols&gt;
<a name="l00339"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_01_rhs_cols_01_4.html">00339</a> <span class="keyword">struct </span><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector.html">product_coeff_vectorized_dyn_selector</a>&lt;Lhs,Rhs,1,RhsCols&gt;
<a name="l00340"></a>00340 {
<a name="l00341"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_01_rhs_cols_01_4.html#af6c9e30069271e4f978be44bf251a321">00341</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_01_rhs_cols_01_4.html#af6c9e30069271e4f978be44bf251a321">Index</a>;
<a name="l00342"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_01_rhs_cols_01_4.html#a92df9637513d0adce4d3e1d2162303b7">00342</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_01_rhs_cols_01_4.html#af6c9e30069271e4f978be44bf251a321">Index</a> <span class="comment">/*row*/</span>, <a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_01_rhs_cols_01_4.html#af6c9e30069271e4f978be44bf251a321">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, <span class="keyword">typename</span> Lhs::Scalar &amp;res)
<a name="l00343"></a>00343   {
<a name="l00344"></a>00344     res = lhs.transpose().cwiseProduct(rhs.col(col)).<a class="code" href="namespacemrpt_1_1math.html#a73bb4427a78a19d9b7dc9feeb7c13b5a" title="Computes the sum of all the elements.">sum</a>();
<a name="l00345"></a>00345   }
<a name="l00346"></a>00346 };
<a name="l00347"></a>00347 
<a name="l00348"></a>00348 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keywordtype">int</span> LhsRows&gt;
<a name="l00349"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_01_lhs_rows_00_011_01_4.html">00349</a> <span class="keyword">struct </span><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector.html">product_coeff_vectorized_dyn_selector</a>&lt;Lhs,Rhs,LhsRows,1&gt;
<a name="l00350"></a>00350 {
<a name="l00351"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_01_lhs_rows_00_011_01_4.html#acf5473b6e52c805ace7e638538f30086">00351</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_01_lhs_rows_00_011_01_4.html#acf5473b6e52c805ace7e638538f30086">Index</a>;
<a name="l00352"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_01_lhs_rows_00_011_01_4.html#affb3361af30d55b61efece028ab53f5c">00352</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_01_lhs_rows_00_011_01_4.html#acf5473b6e52c805ace7e638538f30086">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_01_lhs_rows_00_011_01_4.html#acf5473b6e52c805ace7e638538f30086">Index</a> <span class="comment">/*col*/</span>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, <span class="keyword">typename</span> Lhs::Scalar &amp;res)
<a name="l00353"></a>00353   {
<a name="l00354"></a>00354     res = lhs.row(row).transpose().cwiseProduct(rhs).sum();
<a name="l00355"></a>00355   }
<a name="l00356"></a>00356 };
<a name="l00357"></a>00357 
<a name="l00358"></a>00358 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs&gt;
<a name="l00359"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_011_01_4.html">00359</a> <span class="keyword">struct </span><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector.html">product_coeff_vectorized_dyn_selector</a>&lt;Lhs,Rhs,1,1&gt;
<a name="l00360"></a>00360 {
<a name="l00361"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_011_01_4.html#a97ec4f14e987f20209388923a9f73070">00361</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_011_01_4.html#a97ec4f14e987f20209388923a9f73070">Index</a>;
<a name="l00362"></a><a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_011_01_4.html#a6be15d12ecaaa19f8cd338ff1d8d19f7">00362</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_011_01_4.html#a97ec4f14e987f20209388923a9f73070">Index</a> <span class="comment">/*row*/</span>, <a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector_3_01_lhs_00_01_rhs_00_011_00_011_01_4.html#a97ec4f14e987f20209388923a9f73070">Index</a> <span class="comment">/*col*/</span>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, <span class="keyword">typename</span> Lhs::Scalar &amp;res)
<a name="l00363"></a>00363   {
<a name="l00364"></a>00364     res = lhs.transpose().cwiseProduct(rhs).sum();
<a name="l00365"></a>00365   }
<a name="l00366"></a>00366 };
<a name="l00367"></a>00367 
<a name="l00368"></a>00368 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> RetScalar&gt;
<a name="l00369"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html">00369</a> <span class="keyword">struct </span>product_coeff_impl&lt;<a class="code" href="_constants_8h.html#a85f0f418e1a739554f3f904a501179dca937cb0c42c9776cd97661409f339e8d8">InnerVectorizedTraversal</a>, <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>, Lhs, Rhs, RetScalar&gt;
<a name="l00370"></a>00370 {
<a name="l00371"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a410563790644bd55531f709251ba72e7">00371</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a410563790644bd55531f709251ba72e7">Index</a>;
<a name="l00372"></a><a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#ace71edb2cf831a6f74a99833a25d52ec">00372</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a410563790644bd55531f709251ba72e7">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__coeff__impl_3_01_inner_vectorized_traversal_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_ret_scalar_01_4.html#a410563790644bd55531f709251ba72e7">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, <span class="keyword">typename</span> Lhs::Scalar &amp;res)
<a name="l00373"></a>00373   {
<a name="l00374"></a>00374     <a class="code" href="structinternal_1_1product__coeff__vectorized__dyn__selector.html">product_coeff_vectorized_dyn_selector&lt;Lhs,Rhs&gt;::run</a>(row, col, lhs, rhs, res);
<a name="l00375"></a>00375   }
<a name="l00376"></a>00376 };
<a name="l00377"></a>00377 
<a name="l00378"></a>00378 <span class="comment">/*******************</span>
<a name="l00379"></a>00379 <span class="comment">*** Packet path  ***</span>
<a name="l00380"></a>00380 <span class="comment">*******************/</span>
<a name="l00381"></a>00381 
<a name="l00382"></a>00382 <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> UnrollingIndex, <span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> Packet, <span class="keywordtype">int</span> LoadMode&gt;
<a name="l00383"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_unrolling_index_00_01_lhs_00_01_rhs760c138cf276b87320f7204fa8097307.html">00383</a> <span class="keyword">struct </span>product_packet_impl&lt;<a class="code" href="_constants_8h.html#aab4d131ba129f519b9e2bd349dc19e3aa1e16fa1b92ed7a058cd4ce7a9a0db044">RowMajor</a>, UnrollingIndex, Lhs, Rhs, Packet, LoadMode&gt;
<a name="l00384"></a>00384 {
<a name="l00385"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_unrolling_index_00_01_lhs_00_01_rhs760c138cf276b87320f7204fa8097307.html#a3eaffac12e088f0cc4b23e41fcf8a1d0">00385</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_unrolling_index_00_01_lhs_00_01_rhs760c138cf276b87320f7204fa8097307.html#a3eaffac12e088f0cc4b23e41fcf8a1d0">Index</a>;
<a name="l00386"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_unrolling_index_00_01_lhs_00_01_rhs760c138cf276b87320f7204fa8097307.html#a6a3a833e7145b8d9a61f134d910c2196">00386</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_unrolling_index_00_01_lhs_00_01_rhs760c138cf276b87320f7204fa8097307.html#a3eaffac12e088f0cc4b23e41fcf8a1d0">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_unrolling_index_00_01_lhs_00_01_rhs760c138cf276b87320f7204fa8097307.html#a3eaffac12e088f0cc4b23e41fcf8a1d0">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, Packet &amp;res)
<a name="l00387"></a>00387   {
<a name="l00388"></a>00388     product_packet_impl&lt;RowMajor, UnrollingIndex-1, Lhs, Rhs, Packet, LoadMode&gt;::run(row, col, lhs, rhs, res);
<a name="l00389"></a>00389     res =  <a class="code" href="namespaceinternal.html#a717971bf3b57facfd67d20116bc9b43b">pmadd</a>(pset1&lt;Packet&gt;(lhs.coeff(row, UnrollingIndex)), rhs.template packet&lt;LoadMode&gt;(UnrollingIndex, col), res);
<a name="l00390"></a>00390   }
<a name="l00391"></a>00391 };
<a name="l00392"></a>00392 
<a name="l00393"></a>00393 <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> UnrollingIndex, <span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> Packet, <span class="keywordtype">int</span> LoadMode&gt;
<a name="l00394"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_unrolling_index_00_01_lhs_00_01_rhsc4ee107c8779626c1b868cdb0262caf4.html">00394</a> <span class="keyword">struct </span>product_packet_impl&lt;<a class="code" href="_constants_8h.html#aab4d131ba129f519b9e2bd349dc19e3aac86184b0e3be936fbfd20249a057a0bf">ColMajor</a>, UnrollingIndex, Lhs, Rhs, Packet, LoadMode&gt;
<a name="l00395"></a>00395 {
<a name="l00396"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_unrolling_index_00_01_lhs_00_01_rhsc4ee107c8779626c1b868cdb0262caf4.html#a9bf8e1dea85e28b9189920117adec6a9">00396</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_unrolling_index_00_01_lhs_00_01_rhsc4ee107c8779626c1b868cdb0262caf4.html#a9bf8e1dea85e28b9189920117adec6a9">Index</a>;
<a name="l00397"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_unrolling_index_00_01_lhs_00_01_rhsc4ee107c8779626c1b868cdb0262caf4.html#a1736d57383d983e8a4600eff1585ca6f">00397</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_unrolling_index_00_01_lhs_00_01_rhsc4ee107c8779626c1b868cdb0262caf4.html#a9bf8e1dea85e28b9189920117adec6a9">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_unrolling_index_00_01_lhs_00_01_rhsc4ee107c8779626c1b868cdb0262caf4.html#a9bf8e1dea85e28b9189920117adec6a9">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, Packet &amp;res)
<a name="l00398"></a>00398   {
<a name="l00399"></a>00399     product_packet_impl&lt;ColMajor, UnrollingIndex-1, Lhs, Rhs, Packet, LoadMode&gt;::run(row, col, lhs, rhs, res);
<a name="l00400"></a>00400     res =  <a class="code" href="namespaceinternal.html#a717971bf3b57facfd67d20116bc9b43b">pmadd</a>(lhs.template packet&lt;LoadMode&gt;(row, UnrollingIndex), pset1&lt;Packet&gt;(rhs.coeff(UnrollingIndex, col)), res);
<a name="l00401"></a>00401   }
<a name="l00402"></a>00402 };
<a name="l00403"></a>00403 
<a name="l00404"></a>00404 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> Packet, <span class="keywordtype">int</span> LoadMode&gt;
<a name="l00405"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html">00405</a> <span class="keyword">struct </span>product_packet_impl&lt;<a class="code" href="_constants_8h.html#aab4d131ba129f519b9e2bd349dc19e3aa1e16fa1b92ed7a058cd4ce7a9a0db044">RowMajor</a>, 0, Lhs, Rhs, Packet, LoadMode&gt;
<a name="l00406"></a>00406 {
<a name="l00407"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#a486a4c63a0b3d350aead66088655946f">00407</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#a486a4c63a0b3d350aead66088655946f">Index</a>;
<a name="l00408"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#a556bbeabba0e1384c5cf49a87f4a3d47">00408</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#a486a4c63a0b3d350aead66088655946f">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#a486a4c63a0b3d350aead66088655946f">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, Packet &amp;res)
<a name="l00409"></a>00409   {
<a name="l00410"></a>00410     res = <a class="code" href="namespaceinternal.html#a0193dc8fa17d13ef68cc74284b5a0c14">pmul</a>(pset1&lt;Packet&gt;(lhs.coeff(row, 0)),rhs.template packet&lt;LoadMode&gt;(0, col));
<a name="l00411"></a>00411   }
<a name="l00412"></a>00412 };
<a name="l00413"></a>00413 
<a name="l00414"></a>00414 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> Packet, <span class="keywordtype">int</span> LoadMode&gt;
<a name="l00415"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html">00415</a> <span class="keyword">struct </span>product_packet_impl&lt;<a class="code" href="_constants_8h.html#aab4d131ba129f519b9e2bd349dc19e3aac86184b0e3be936fbfd20249a057a0bf">ColMajor</a>, 0, Lhs, Rhs, Packet, LoadMode&gt;
<a name="l00416"></a>00416 {
<a name="l00417"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#a545949b1547cfd59d3eae610d68231da">00417</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#a545949b1547cfd59d3eae610d68231da">Index</a>;
<a name="l00418"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#ac1cd90d47e668685317aac13bd9b538d">00418</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#a545949b1547cfd59d3eae610d68231da">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_010_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#a545949b1547cfd59d3eae610d68231da">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, Packet &amp;res)
<a name="l00419"></a>00419   {
<a name="l00420"></a>00420     res = <a class="code" href="namespaceinternal.html#a0193dc8fa17d13ef68cc74284b5a0c14">pmul</a>(lhs.template packet&lt;LoadMode&gt;(row, 0), pset1&lt;Packet&gt;(rhs.coeff(0, col)));
<a name="l00421"></a>00421   }
<a name="l00422"></a>00422 };
<a name="l00423"></a>00423 
<a name="l00424"></a>00424 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> Packet, <span class="keywordtype">int</span> LoadMode&gt;
<a name="l00425"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html">00425</a> <span class="keyword">struct </span>product_packet_impl&lt;<a class="code" href="_constants_8h.html#aab4d131ba129f519b9e2bd349dc19e3aa1e16fa1b92ed7a058cd4ce7a9a0db044">RowMajor</a>, <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>, Lhs, Rhs, Packet, LoadMode&gt;
<a name="l00426"></a>00426 {
<a name="l00427"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#abfcc0390a367566c8ca3c987ca77347f">00427</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#abfcc0390a367566c8ca3c987ca77347f">Index</a>;
<a name="l00428"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#ae25bc319a5fbbb7cf14ae379cbf4aa78">00428</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#abfcc0390a367566c8ca3c987ca77347f">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#abfcc0390a367566c8ca3c987ca77347f">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, Packet&amp; res)
<a name="l00429"></a>00429   {
<a name="l00430"></a>00430     <a class="code" href="_macros_8h.html#acaa7ba89800cfe18d5fd6eed620aea9c">eigen_assert</a>(lhs.cols()&gt;0 &amp;&amp; <span class="stringliteral">&quot;you are using a non initialized matrix&quot;</span>);
<a name="l00431"></a>00431     res = <a class="code" href="namespaceinternal.html#a0193dc8fa17d13ef68cc74284b5a0c14">pmul</a>(pset1&lt;Packet&gt;(lhs.coeff(row, 0)),rhs.template packet&lt;LoadMode&gt;(0, col));
<a name="l00432"></a>00432       <span class="keywordflow">for</span>(<a class="code" href="structinternal_1_1product__packet__impl_3_01_row_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#abfcc0390a367566c8ca3c987ca77347f">Index</a> i = 1; i &lt; lhs.cols(); ++i)
<a name="l00433"></a>00433         res =  <a class="code" href="namespaceinternal.html#a717971bf3b57facfd67d20116bc9b43b">pmadd</a>(pset1&lt;Packet&gt;(lhs.coeff(row, i)), rhs.template packet&lt;LoadMode&gt;(i, col), res);
<a name="l00434"></a>00434   }
<a name="l00435"></a>00435 };
<a name="l00436"></a>00436 
<a name="l00437"></a>00437 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Lhs, <span class="keyword">typename</span> Rhs, <span class="keyword">typename</span> Packet, <span class="keywordtype">int</span> LoadMode&gt;
<a name="l00438"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html">00438</a> <span class="keyword">struct </span>product_packet_impl&lt;<a class="code" href="_constants_8h.html#aab4d131ba129f519b9e2bd349dc19e3aac86184b0e3be936fbfd20249a057a0bf">ColMajor</a>, <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>, Lhs, Rhs, Packet, LoadMode&gt;
<a name="l00439"></a>00439 {
<a name="l00440"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#aef9863420855e942462b65e21545332b">00440</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Lhs::Index <a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#aef9863420855e942462b65e21545332b">Index</a>;
<a name="l00441"></a><a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#a38f40d4f0a0df9c1ec7059cde9b86d7b">00441</a>   <a class="code" href="_macros_8h.html#af2b60117c00a6e75812de43bfe7db3b1">EIGEN_STRONG_INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> run(<a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#aef9863420855e942462b65e21545332b">Index</a> <a class="code" href="_block_methods_8h.html#ad62dcaf648cca25e9318da34c9840799" title="This is the const version of row().">row</a>, <a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#aef9863420855e942462b65e21545332b">Index</a> <a class="code" href="_block_methods_8h.html#a390f7c534678354959dd587080b82c2c" title="This is the const version of col().">col</a>, <span class="keyword">const</span> Lhs&amp; lhs, <span class="keyword">const</span> Rhs&amp; rhs, Packet&amp; res)
<a name="l00442"></a>00442   {
<a name="l00443"></a>00443     <a class="code" href="_macros_8h.html#acaa7ba89800cfe18d5fd6eed620aea9c">eigen_assert</a>(lhs.cols()&gt;0 &amp;&amp; <span class="stringliteral">&quot;you are using a non initialized matrix&quot;</span>);
<a name="l00444"></a>00444     res = <a class="code" href="namespaceinternal.html#a0193dc8fa17d13ef68cc74284b5a0c14">pmul</a>(lhs.template packet&lt;LoadMode&gt;(row, 0), pset1&lt;Packet&gt;(rhs.coeff(0, col)));
<a name="l00445"></a>00445       <span class="keywordflow">for</span>(<a class="code" href="structinternal_1_1product__packet__impl_3_01_col_major_00_01_dynamic_00_01_lhs_00_01_rhs_00_01_packet_00_01_load_mode_01_4.html#aef9863420855e942462b65e21545332b">Index</a> i = 1; i &lt; lhs.cols(); ++i)
<a name="l00446"></a>00446         res =  <a class="code" href="namespaceinternal.html#a717971bf3b57facfd67d20116bc9b43b">pmadd</a>(lhs.template packet&lt;LoadMode&gt;(row, i), pset1&lt;Packet&gt;(rhs.coeff(i, col)), res);
<a name="l00447"></a>00447   }
<a name="l00448"></a>00448 };
<a name="l00449"></a>00449 
<a name="l00450"></a>00450 } <span class="comment">// end namespace internal</span>
<a name="l00451"></a>00451 
<a name="l00452"></a>00452 <span class="preprocessor">#endif // EIGEN_COEFFBASED_PRODUCT_H</span>
</pre></div></div>
</div>
<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.2</a> for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table> </body></html>