title: Error using Ceres alongside a library with sse/avx
body: <p>I have a templated library in which some functions are specialized for float and double types. This specialization uses sse/avx, hence, this library has the <code>-march=native -mavx2</code> compiler flags. When I try to use some function (that is not specialized)  of this library I get the following runtime error from Ceres:</p>
  
  <pre><code>test_ceres: /usr/include/eigen3/Eigen/src/Core/DenseStorage.h:128: Eigen::internal::plain_array&lt;double, 4, 0, 32&gt;::plain_array() [T = double, Size = 4, MatrixOrArrayOptions = 0, Alignment = 32]: Assertion `(internal::UIntPtr(array) &amp; (31)) == 0 &amp;&amp; "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****"' failed.
  </code></pre>
  
  <p>I have been able to reproduce the error with a much simpler code: <a href="https://github.com/apalomer/ceres_avx_test" rel="nofollow noreferrer">here</a>. Essentially, this example works when the <code>-mavx2 -march=native</code> flags are removed and does not work (produces the previous error) when they are present (comment and uncomment from CmakeLists.txt). In this example no functions using avx/sse are present but remember that my library has them, so removing the flags <code>-mavx2 -march=native</code> is not an option. Any idea on what to do to solve this? When I compiled Ceres I added the flag <code>-DCMAKE_CXX_FLAGS="-march=native"</code> as pointed out in the <a href="https://github.com/ceres-solver/ceres-solver/blob/master/docs/source/installation.rst" rel="nofollow noreferrer">documentation</a>.</p>
  
  <p>Reading the <a href="http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" rel="nofollow noreferrer">webpage provided in the error message</a> did not provide any solution.</p>
  
  <p>Some useful information about my system:</p>
  
  <ul>
  <li>compiler: clang++  
  
  <ul>
  <li>clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)</li>
  <li>Target: x86_64-pc-linux-gnu</li>
  <li>Thread model: posix </li>
  </ul></li>
  <li>Ceres version: 2.0 (i actually have the git repo and I have updated it few minutes ago: )</li>
  <li>CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz</li>
  </ul>