| 58 | */ |
| 59 | template<typename NullaryOp, typename PlainObjectType> |
| 60 | class CwiseNullaryOp : public internal::dense_xpr_base< CwiseNullaryOp<NullaryOp, PlainObjectType> >::type, internal::no_assignment_operator |
| 61 | { |
| 62 | public: |
| 63 | |
| 64 | typedef typename internal::dense_xpr_base<CwiseNullaryOp>::type Base; |
| 65 | EIGEN_DENSE_PUBLIC_INTERFACE(CwiseNullaryOp) |
| 66 | |
| 67 | EIGEN_DEVICE_FUNC |
| 68 | CwiseNullaryOp(Index rows, Index cols, const NullaryOp& func = NullaryOp()) |
| 69 | : m_rows(rows), m_cols(cols), m_functor(func) |
| 70 | { |
| 71 | eigen_assert(rows >= 0 |
| 72 | && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == rows) |
| 73 | && cols >= 0 |
| 74 | && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols)); |
| 75 | } |
| 76 | |
| 77 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR |
| 78 | Index rows() const { return m_rows.value(); } |
| 79 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR |
| 80 | Index cols() const { return m_cols.value(); } |
| 81 |
no test coverage detected