title: Call Eigen GEMM over externally allocated data
body: <p>Eigen has amazingly fast GEMM implementation so i want to use it inside my pet project tensor library. 
  If i understand correctly it's possible via Eigen::Map. I wrote simple example and defined <code>EIGEN_NO_MALLOC</code> to make sure that there are no unwanted allocations.</p>
  
  <p>It's works well with simple matrix multiplication like <code>C += A * B</code>.
  But unfortunately it cannot handle <code>C += alpha * A * B</code> (GEMM like) situation.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  #define EIGEN_NO_MALLOC
  #include "Eigen/Core"
  
  int main()
  {
      using Scalar = float;
      using namespace Eigen;
      std::vector&lt;Scalar&gt; aDat = {1, 2, 3, 4};
      std::vector&lt;Scalar&gt; bDat = {1, 2, 3, 4};
      std::vector&lt;Scalar&gt; cDat = {1, 2, 3, 4};
      Map&lt;Matrix&lt;Scalar, -1, -1, RowMajor&gt;, Unaligned&gt; a(aDat.data(), 2, 2);
      Map&lt;Matrix&lt;Scalar, -1, -1, RowMajor&gt;, Unaligned&gt; b(bDat.data(), 2, 2);
      Map&lt;Matrix&lt;Scalar, -1, -1, RowMajor&gt;, Unaligned&gt; c(cDat.data(), 2, 2);
  
      //Ok
      c.noalias() += a * b;
  
      //Assertion `false &amp;&amp; "heap allocation is forbidden.....
      c.noalias() += 2 * a * b;
  
      return 0;
  }
  </code></pre>
  
  <p><code>c.noalias() += 2 * a * b;</code> gives me following runtime error</p>
  
  <pre><code>a.out: path_to_eigen/Eigen/src/Core/util/Memory.h:129: void Eigen::internal::check_that_malloc_is_allowed(): Assertion `false &amp;&amp; "heap allocation is forbidden (EIGEN_NO_MALLOC is defined)"' failed.
  </code></pre>
  
  <p>Is it possible to call <code>c.noalias() += someScalar * a * b;</code> without allocations?</p>
  
  <p>PS My eigen version is <code>3.3.2</code>, <code>gcc</code> version is <code>7.2.0</code></p>
  
  <p>Sorry for my poor English</p>