diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-06-26 20:08:16 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-06-26 20:08:16 +0000 |
commit | c5bd1703cb05f60a00f948a222e3d61eaf7ab5ad (patch) | |
tree | b52758c0b2b6b7f609777e40152c8ae48d37d6a5 /Eigen/src/Core/CwiseNullaryOp.h | |
parent | 25ba9f377c97968923cd654d419fa8ce260f114d (diff) |
change derived classes methods from "private:_method()"
to "public:method()" i.e. reimplementing the generic method()
from MatrixBase.
improves compilation speed by 7%, reduces almost by half the call depth
of trivial functions, making gcc errors and application backtraces
nicer...
Diffstat (limited to 'Eigen/src/Core/CwiseNullaryOp.h')
-rw-r--r-- | Eigen/src/Core/CwiseNullaryOp.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Eigen/src/Core/CwiseNullaryOp.h b/Eigen/src/Core/CwiseNullaryOp.h index 998b7ce56..78ecb878b 100644 --- a/Eigen/src/Core/CwiseNullaryOp.h +++ b/Eigen/src/Core/CwiseNullaryOp.h @@ -75,29 +75,27 @@ class CwiseNullaryOp : ei_no_assignment_operator, && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols)); } - private: + int rows() const { return m_rows.value(); } + int cols() const { return m_cols.value(); } - int _rows() const { return m_rows.value(); } - int _cols() const { return m_cols.value(); } - - const Scalar _coeff(int rows, int cols) const + const Scalar coeff(int rows, int cols) const { return m_functor(rows, cols); } template<int LoadMode> - PacketScalar _packet(int, int) const + PacketScalar packet(int, int) const { return m_functor.packetOp(); } - const Scalar _coeff(int index) const + const Scalar coeff(int index) const { return m_functor(index); } template<int LoadMode> - PacketScalar _packet(int) const + PacketScalar packet(int) const { return m_functor.packetOp(); } |