mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
rename macro
This commit is contained in:
parent
86d3711fb7
commit
e8768251db
@ -27,10 +27,10 @@
|
|||||||
#ifndef EIGEN_MATRIXSTORAGE_H
|
#ifndef EIGEN_MATRIXSTORAGE_H
|
||||||
#define EIGEN_MATRIXSTORAGE_H
|
#define EIGEN_MATRIXSTORAGE_H
|
||||||
|
|
||||||
#ifdef EIGEN_DEBUG_MATRIX_CTOR
|
#ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
|
||||||
#define EIGEN_INT_DEBUG_MATRIX_CTOR EIGEN_DEBUG_MATRIX_CTOR;
|
#define EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN EIGEN_DENSE_STORAGE_CTOR_PLUGIN;
|
||||||
#else
|
#else
|
||||||
#define EIGEN_INT_DEBUG_MATRIX_CTOR
|
#define EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
@ -199,7 +199,7 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam
|
|||||||
: m_data(0), m_rows(0), m_cols(0) {}
|
: m_data(0), m_rows(0), m_cols(0) {}
|
||||||
inline DenseStorage(DenseIndex size, DenseIndex rows, DenseIndex cols)
|
inline DenseStorage(DenseIndex size, DenseIndex rows, DenseIndex cols)
|
||||||
: m_data(internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size)), m_rows(rows), m_cols(cols)
|
: m_data(internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size)), m_rows(rows), m_cols(cols)
|
||||||
{ EIGEN_INT_DEBUG_MATRIX_CTOR }
|
{ EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN }
|
||||||
inline ~DenseStorage() { internal::conditional_aligned_delete<T,(_Options&DontAlign)==0>(m_data, m_rows*m_cols); }
|
inline ~DenseStorage() { internal::conditional_aligned_delete<T,(_Options&DontAlign)==0>(m_data, m_rows*m_cols); }
|
||||||
inline void swap(DenseStorage& other)
|
inline 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); }
|
{ std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); std::swap(m_cols,other.m_cols); }
|
||||||
@ -220,7 +220,7 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam
|
|||||||
m_data = internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size);
|
m_data = internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size);
|
||||||
else
|
else
|
||||||
m_data = 0;
|
m_data = 0;
|
||||||
EIGEN_INT_DEBUG_MATRIX_CTOR
|
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN
|
||||||
}
|
}
|
||||||
m_rows = rows;
|
m_rows = rows;
|
||||||
m_cols = cols;
|
m_cols = cols;
|
||||||
@ -238,7 +238,7 @@ template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Ro
|
|||||||
inline explicit DenseStorage() : m_data(0), m_cols(0) {}
|
inline explicit DenseStorage() : m_data(0), m_cols(0) {}
|
||||||
inline DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_cols(0) {}
|
inline DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_cols(0) {}
|
||||||
inline DenseStorage(DenseIndex size, DenseIndex, DenseIndex cols) : m_data(internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size)), m_cols(cols)
|
inline DenseStorage(DenseIndex size, DenseIndex, DenseIndex cols) : m_data(internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size)), m_cols(cols)
|
||||||
{ EIGEN_INT_DEBUG_MATRIX_CTOR }
|
{ EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN }
|
||||||
inline ~DenseStorage() { internal::conditional_aligned_delete<T,(_Options&DontAlign)==0>(m_data, _Rows*m_cols); }
|
inline ~DenseStorage() { internal::conditional_aligned_delete<T,(_Options&DontAlign)==0>(m_data, _Rows*m_cols); }
|
||||||
inline void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_cols,other.m_cols); }
|
inline void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_cols,other.m_cols); }
|
||||||
inline static DenseIndex rows(void) {return _Rows;}
|
inline static DenseIndex rows(void) {return _Rows;}
|
||||||
@ -257,7 +257,7 @@ template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Ro
|
|||||||
m_data = internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size);
|
m_data = internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size);
|
||||||
else
|
else
|
||||||
m_data = 0;
|
m_data = 0;
|
||||||
EIGEN_INT_DEBUG_MATRIX_CTOR
|
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN
|
||||||
}
|
}
|
||||||
m_cols = cols;
|
m_cols = cols;
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ template<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dyn
|
|||||||
inline explicit DenseStorage() : m_data(0), m_rows(0) {}
|
inline explicit DenseStorage() : m_data(0), m_rows(0) {}
|
||||||
inline DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_rows(0) {}
|
inline DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_rows(0) {}
|
||||||
inline DenseStorage(DenseIndex size, DenseIndex rows, DenseIndex) : m_data(internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size)), m_rows(rows)
|
inline DenseStorage(DenseIndex size, DenseIndex rows, DenseIndex) : m_data(internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size)), m_rows(rows)
|
||||||
{ EIGEN_INT_DEBUG_MATRIX_CTOR }
|
{ EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN }
|
||||||
inline ~DenseStorage() { internal::conditional_aligned_delete<T,(_Options&DontAlign)==0>(m_data, _Cols*m_rows); }
|
inline ~DenseStorage() { internal::conditional_aligned_delete<T,(_Options&DontAlign)==0>(m_data, _Cols*m_rows); }
|
||||||
inline void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); }
|
inline void swap(DenseStorage& other) { std::swap(m_data,other.m_data); std::swap(m_rows,other.m_rows); }
|
||||||
inline DenseIndex rows(void) const {return m_rows;}
|
inline DenseIndex rows(void) const {return m_rows;}
|
||||||
@ -293,7 +293,7 @@ template<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dyn
|
|||||||
m_data = internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size);
|
m_data = internal::conditional_aligned_new<T,(_Options&DontAlign)==0>(size);
|
||||||
else
|
else
|
||||||
m_data = 0;
|
m_data = 0;
|
||||||
EIGEN_INT_DEBUG_MATRIX_CTOR
|
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN
|
||||||
}
|
}
|
||||||
m_rows = rows;
|
m_rows = rows;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
static int nb_temporaries;
|
static int nb_temporaries;
|
||||||
|
|
||||||
#define EIGEN_DEBUG_MATRIX_CTOR { if(size!=0) nb_temporaries++; }
|
#define EIGEN_DENSE_STORAGE_CTOR_PLUGIN { if(size!=0) nb_temporaries++; }
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include <Eigen/Cholesky>
|
#include <Eigen/Cholesky>
|
||||||
|
@ -30,7 +30,7 @@ void on_temporary_creation(int size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define EIGEN_DEBUG_MATRIX_CTOR { on_temporary_creation(size); }
|
#define EIGEN_DENSE_STORAGE_CTOR_PLUGIN { on_temporary_creation(size); }
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user