bug #970: Add EIGEN_DEVICE_FUNC to RValue functions, in case Cuda supports RValue-references.

This commit is contained in:
Christoph Hertzberg
2015-02-24 21:03:28 +01:00
parent 26275b250a
commit 531fa9de77
3 changed files with 10 additions and 0 deletions

View File

@@ -219,6 +219,7 @@ class Matrix
{ Base::_check_template_params(); EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED }
#ifdef EIGEN_HAVE_RVALUE_REFERENCES
EIGEN_DEVICE_FUNC
Matrix(Matrix&& other)
: Base(std::move(other))
{
@@ -226,6 +227,7 @@ class Matrix
if (RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic)
Base::_set_noalias(other);
}
EIGEN_DEVICE_FUNC
Matrix& operator=(Matrix&& other)
{
other.swap(*this);