diff options
Diffstat (limited to 'Eigen/src/Core/DenseStorage.h')
-rw-r--r-- | Eigen/src/Core/DenseStorage.h | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/Eigen/src/Core/DenseStorage.h b/Eigen/src/Core/DenseStorage.h index 852648639..4c37fadbd 100644 --- a/Eigen/src/Core/DenseStorage.h +++ b/Eigen/src/Core/DenseStorage.h @@ -140,12 +140,12 @@ template<typename T, int Size, int _Rows, int _Cols, int _Options> class DenseSt if (this != &other) m_data = other.m_data; return *this; } - EIGEN_DEVICE_FUNC DenseStorage(DenseIndex,DenseIndex,DenseIndex) {} + EIGEN_DEVICE_FUNC DenseStorage(Index,Index,Index) {} EIGEN_DEVICE_FUNC void swap(DenseStorage& other) { std::swap(m_data,other.m_data); } - EIGEN_DEVICE_FUNC static DenseIndex rows(void) {return _Rows;} - EIGEN_DEVICE_FUNC static DenseIndex cols(void) {return _Cols;} - EIGEN_DEVICE_FUNC void conservativeResize(DenseIndex,DenseIndex,DenseIndex) {} - EIGEN_DEVICE_FUNC void resize(DenseIndex,DenseIndex,DenseIndex) {} + EIGEN_DEVICE_FUNC static Index rows(void) {return _Rows;} + EIGEN_DEVICE_FUNC static Index cols(void) {return _Cols;} + EIGEN_DEVICE_FUNC void conservativeResize(Index,Index,Index) {} + EIGEN_DEVICE_FUNC void resize(Index,Index,Index) {} EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; } EIGEN_DEVICE_FUNC T *data() { return m_data.array; } }; @@ -158,12 +158,12 @@ template<typename T, int _Rows, int _Cols, int _Options> class DenseStorage<T, 0 EIGEN_DEVICE_FUNC explicit DenseStorage(internal::constructor_without_unaligned_array_assert) {} EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage&) {} EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage&) { return *this; } - EIGEN_DEVICE_FUNC DenseStorage(DenseIndex,DenseIndex,DenseIndex) {} + EIGEN_DEVICE_FUNC DenseStorage(Index,Index,Index) {} EIGEN_DEVICE_FUNC void swap(DenseStorage& ) {} - EIGEN_DEVICE_FUNC static DenseIndex rows(void) {return _Rows;} - EIGEN_DEVICE_FUNC static DenseIndex cols(void) {return _Cols;} - EIGEN_DEVICE_FUNC void conservativeResize(DenseIndex,DenseIndex,DenseIndex) {} - EIGEN_DEVICE_FUNC void resize(DenseIndex,DenseIndex,DenseIndex) {} + EIGEN_DEVICE_FUNC static Index rows(void) {return _Rows;} + EIGEN_DEVICE_FUNC static Index cols(void) {return _Cols;} + EIGEN_DEVICE_FUNC void conservativeResize(Index,Index,Index) {} + EIGEN_DEVICE_FUNC void resize(Index,Index,Index) {} EIGEN_DEVICE_FUNC const T *data() const { return 0; } EIGEN_DEVICE_FUNC T *data() { return 0; } }; @@ -182,8 +182,8 @@ template<typename T, int _Cols, int _Options> class DenseStorage<T, 0, Dynamic, template<typename T, int Size, int _Options> class DenseStorage<T, Size, Dynamic, Dynamic, _Options> { internal::plain_array<T,Size,_Options> m_data; - DenseIndex m_rows; - DenseIndex m_cols; + Index m_rows; + Index m_cols; public: EIGEN_DEVICE_FUNC DenseStorage() : m_rows(0), m_cols(0) {} explicit DenseStorage(internal::constructor_without_unaligned_array_assert) @@ -199,13 +199,13 @@ template<typename T, int Size, int _Options> class DenseStorage<T, Size, Dynamic } return *this; } - DenseStorage(DenseIndex, DenseIndex nbRows, DenseIndex nbCols) : m_rows(nbRows), m_cols(nbCols) {} + DenseStorage(Index, Index nbRows, Index nbCols) : m_rows(nbRows), m_cols(nbCols) {} void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); std::swap(m_cols,other.m_cols); } - EIGEN_DEVICE_FUNC DenseIndex rows() const {return m_rows;} - EIGEN_DEVICE_FUNC DenseIndex cols() const {return m_cols;} - void conservativeResize(DenseIndex, DenseIndex nbRows, DenseIndex nbCols) { m_rows = nbRows; m_cols = nbCols; } - void resize(DenseIndex, DenseIndex nbRows, DenseIndex nbCols) { m_rows = nbRows; m_cols = nbCols; } + EIGEN_DEVICE_FUNC Index rows() const {return m_rows;} + EIGEN_DEVICE_FUNC Index cols() const {return m_cols;} + void conservativeResize(Index, Index nbRows, Index nbCols) { m_rows = nbRows; m_cols = nbCols; } + void resize(Index, Index nbRows, Index nbCols) { m_rows = nbRows; m_cols = nbCols; } EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; } EIGEN_DEVICE_FUNC T *data() { return m_data.array; } }; @@ -214,7 +214,7 @@ template<typename T, int Size, int _Options> class DenseStorage<T, Size, Dynamic template<typename T, int Size, int _Cols, int _Options> class DenseStorage<T, Size, Dynamic, _Cols, _Options> { internal::plain_array<T,Size,_Options> m_data; - DenseIndex m_rows; + Index m_rows; public: EIGEN_DEVICE_FUNC DenseStorage() : m_rows(0) {} explicit DenseStorage(internal::constructor_without_unaligned_array_assert) @@ -229,12 +229,12 @@ template<typename T, int Size, int _Cols, int _Options> class DenseStorage<T, Si } return *this; } - DenseStorage(DenseIndex, DenseIndex nbRows, DenseIndex) : m_rows(nbRows) {} + DenseStorage(Index, Index nbRows, Index) : m_rows(nbRows) {} void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); } - EIGEN_DEVICE_FUNC DenseIndex rows(void) const {return m_rows;} - EIGEN_DEVICE_FUNC DenseIndex cols(void) const {return _Cols;} - void conservativeResize(DenseIndex, DenseIndex nbRows, DenseIndex) { m_rows = nbRows; } - void resize(DenseIndex, DenseIndex nbRows, DenseIndex) { m_rows = nbRows; } + EIGEN_DEVICE_FUNC Index rows(void) const {return m_rows;} + EIGEN_DEVICE_FUNC Index cols(void) const {return _Cols;} + void conservativeResize(Index, Index nbRows, Index) { m_rows = nbRows; } + void resize(Index, Index nbRows, Index) { m_rows = nbRows; } EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; } EIGEN_DEVICE_FUNC T *data() { return m_data.array; } }; @@ -243,7 +243,7 @@ template<typename T, int Size, int _Cols, int _Options> class DenseStorage<T, Si template<typename T, int Size, int _Rows, int _Options> class DenseStorage<T, Size, _Rows, Dynamic, _Options> { internal::plain_array<T,Size,_Options> m_data; - DenseIndex m_cols; + Index m_cols; public: EIGEN_DEVICE_FUNC DenseStorage() : m_cols(0) {} explicit DenseStorage(internal::constructor_without_unaligned_array_assert) @@ -258,12 +258,12 @@ template<typename T, int Size, int _Rows, int _Options> class DenseStorage<T, Si } return *this; } - DenseStorage(DenseIndex, DenseIndex, DenseIndex nbCols) : m_cols(nbCols) {} + DenseStorage(Index, Index, Index nbCols) : m_cols(nbCols) {} void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_cols,other.m_cols); } - EIGEN_DEVICE_FUNC DenseIndex rows(void) const {return _Rows;} - EIGEN_DEVICE_FUNC DenseIndex cols(void) const {return m_cols;} - void conservativeResize(DenseIndex, DenseIndex, DenseIndex nbCols) { m_cols = nbCols; } - void resize(DenseIndex, DenseIndex, DenseIndex nbCols) { m_cols = nbCols; } + EIGEN_DEVICE_FUNC Index rows(void) const {return _Rows;} + EIGEN_DEVICE_FUNC Index cols(void) const {return m_cols;} + void conservativeResize(Index, Index, Index nbCols) { m_cols = nbCols; } + void resize(Index, Index, Index nbCols) { m_cols = nbCols; } EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; } EIGEN_DEVICE_FUNC T *data() { return m_data.array; } }; @@ -272,13 +272,13 @@ template<typename T, int Size, int _Rows, int _Options> class DenseStorage<T, Si template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynamic, _Options> { T *m_data; - DenseIndex m_rows; - DenseIndex m_cols; + Index m_rows; + Index m_cols; public: EIGEN_DEVICE_FUNC DenseStorage() : m_data(0), m_rows(0), m_cols(0) {} explicit DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_rows(0), m_cols(0) {} - DenseStorage(DenseIndex size, DenseIndex nbRows, DenseIndex nbCols) + DenseStorage(Index size, Index nbRows, Index nbCols) : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size)), m_rows(nbRows), m_cols(nbCols) { EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN } DenseStorage(const DenseStorage& other) @@ -317,15 +317,15 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, m_rows*m_cols); } void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); std::swap(m_cols,other.m_cols); } - EIGEN_DEVICE_FUNC DenseIndex rows(void) const {return m_rows;} - EIGEN_DEVICE_FUNC DenseIndex cols(void) const {return m_cols;} - void conservativeResize(DenseIndex size, DenseIndex nbRows, DenseIndex nbCols) + EIGEN_DEVICE_FUNC Index rows(void) const {return m_rows;} + EIGEN_DEVICE_FUNC Index cols(void) const {return m_cols;} + void conservativeResize(Index size, Index nbRows, Index nbCols) { m_data = internal::conditional_aligned_realloc_new_auto<T,(_Options&DontAlign)==0>(m_data, size, m_rows*m_cols); m_rows = nbRows; m_cols = nbCols; } - void resize(DenseIndex size, DenseIndex nbRows, DenseIndex nbCols) + void resize(Index size, Index nbRows, Index nbCols) { if(size != m_rows*m_cols) { @@ -347,11 +347,11 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Rows, Dynamic, _Options> { T *m_data; - DenseIndex m_cols; + Index m_cols; public: EIGEN_DEVICE_FUNC DenseStorage() : m_data(0), m_cols(0) {} explicit DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_cols(0) {} - DenseStorage(DenseIndex size, DenseIndex, DenseIndex nbCols) : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size)), m_cols(nbCols) + DenseStorage(Index size, Index, Index nbCols) : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size)), m_cols(nbCols) { EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN } DenseStorage(const DenseStorage& other) : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(_Rows*other.m_cols)) @@ -385,14 +385,14 @@ template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Ro #endif ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Rows*m_cols); } void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_cols,other.m_cols); } - EIGEN_DEVICE_FUNC static DenseIndex rows(void) {return _Rows;} - EIGEN_DEVICE_FUNC DenseIndex cols(void) const {return m_cols;} - void conservativeResize(DenseIndex size, DenseIndex, DenseIndex nbCols) + EIGEN_DEVICE_FUNC static Index rows(void) {return _Rows;} + EIGEN_DEVICE_FUNC Index cols(void) const {return m_cols;} + void conservativeResize(Index size, Index, Index nbCols) { m_data = internal::conditional_aligned_realloc_new_auto<T,(_Options&DontAlign)==0>(m_data, size, _Rows*m_cols); m_cols = nbCols; } - EIGEN_STRONG_INLINE void resize(DenseIndex size, DenseIndex, DenseIndex nbCols) + EIGEN_STRONG_INLINE void resize(Index size, Index, Index nbCols) { if(size != _Rows*m_cols) { @@ -413,11 +413,11 @@ template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Ro template<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dynamic, _Cols, _Options> { T *m_data; - DenseIndex m_rows; + Index m_rows; public: EIGEN_DEVICE_FUNC DenseStorage() : m_data(0), m_rows(0) {} explicit DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_rows(0) {} - DenseStorage(DenseIndex size, DenseIndex nbRows, DenseIndex) : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size)), m_rows(nbRows) + DenseStorage(Index size, Index nbRows, Index) : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size)), m_rows(nbRows) { EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN } DenseStorage(const DenseStorage& other) : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(other.m_rows*_Cols)) @@ -451,14 +451,14 @@ template<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dyn #endif ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Cols*m_rows); } void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); } - EIGEN_DEVICE_FUNC DenseIndex rows(void) const {return m_rows;} - EIGEN_DEVICE_FUNC static DenseIndex cols(void) {return _Cols;} - void conservativeResize(DenseIndex size, DenseIndex nbRows, DenseIndex) + EIGEN_DEVICE_FUNC Index rows(void) const {return m_rows;} + EIGEN_DEVICE_FUNC static Index cols(void) {return _Cols;} + void conservativeResize(Index size, Index nbRows, Index) { m_data = internal::conditional_aligned_realloc_new_auto<T,(_Options&DontAlign)==0>(m_data, size, m_rows*_Cols); m_rows = nbRows; } - EIGEN_STRONG_INLINE void resize(DenseIndex size, DenseIndex nbRows, DenseIndex) + EIGEN_STRONG_INLINE void resize(Index size, Index nbRows, Index) { if(size != m_rows*_Cols) { |