diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2015-02-24 21:03:28 +0100 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2015-02-24 21:03:28 +0100 |
commit | 531fa9de77764831a6c1eae2ea7c9b02851fe1e6 (patch) | |
tree | 923c2d126bd222a53ba5fff7087294d826efe523 /Eigen/src/Core | |
parent | 26275b250a271b27132e41486de5bb5b18e8365a (diff) |
bug #970: Add EIGEN_DEVICE_FUNC to RValue functions, in case Cuda supports RValue-references.
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r-- | Eigen/src/Core/Array.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/DenseStorage.h | 6 | ||||
-rw-r--r-- | Eigen/src/Core/Matrix.h | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/Eigen/src/Core/Array.h b/Eigen/src/Core/Array.h index 337086615..9a1f30bc8 100644 --- a/Eigen/src/Core/Array.h +++ b/Eigen/src/Core/Array.h @@ -145,6 +145,7 @@ class Array #endif #ifdef EIGEN_HAVE_RVALUE_REFERENCES + EIGEN_DEVICE_FUNC Array(Array&& other) : Base(std::move(other)) { @@ -152,6 +153,7 @@ class Array if (RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic) Base::_set_noalias(other); } + EIGEN_DEVICE_FUNC Array& operator=(Array&& other) { other.swap(*this); diff --git a/Eigen/src/Core/DenseStorage.h b/Eigen/src/Core/DenseStorage.h index b52b4dc7b..9186f59a7 100644 --- a/Eigen/src/Core/DenseStorage.h +++ b/Eigen/src/Core/DenseStorage.h @@ -298,6 +298,7 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam return *this; } #ifdef EIGEN_HAVE_RVALUE_REFERENCES + EIGEN_DEVICE_FUNC DenseStorage(DenseStorage&& other) : m_data(std::move(other.m_data)) , m_rows(std::move(other.m_rows)) @@ -307,6 +308,7 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam other.m_rows = 0; other.m_cols = 0; } + EIGEN_DEVICE_FUNC DenseStorage& operator=(DenseStorage&& other) { using std::swap; @@ -371,6 +373,7 @@ template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Ro return *this; } #ifdef EIGEN_HAVE_RVALUE_REFERENCES + EIGEN_DEVICE_FUNC DenseStorage(DenseStorage&& other) : m_data(std::move(other.m_data)) , m_cols(std::move(other.m_cols)) @@ -378,6 +381,7 @@ template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Ro other.m_data = nullptr; other.m_cols = 0; } + EIGEN_DEVICE_FUNC DenseStorage& operator=(DenseStorage&& other) { using std::swap; @@ -438,6 +442,7 @@ template<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dyn return *this; } #ifdef EIGEN_HAVE_RVALUE_REFERENCES + EIGEN_DEVICE_FUNC DenseStorage(DenseStorage&& other) : m_data(std::move(other.m_data)) , m_rows(std::move(other.m_rows)) @@ -445,6 +450,7 @@ template<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dyn other.m_data = nullptr; other.m_rows = 0; } + EIGEN_DEVICE_FUNC DenseStorage& operator=(DenseStorage&& other) { using std::swap; diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index a10d1856f..88ffd7d60 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -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); |