title: How to work with Eigen in CUDA kernels
body: <p>Eigen is a c++ linear algebra library <a href="http://eigen.tuxfamily.org" rel="noreferrer">http://eigen.tuxfamily.org</a>.</p>
  
  <p>It's easy to work with basic data types, like basic float arrays, and just copy it to device memory and pass the pointer to cuda kernels. But Eigen matrix are complex type so how to copy it to device memory and let cuda kernels read/write with it?</p>