2 // { dg-additional-options "-Wno-psabi -Wno-return-type" }
3 // Ignore warning on some powerpc-linux configurations.
4 // { dg-prune-output "non-standard ABI extension" }
6 typedef float __m128 __attribute__ ((__vector_size__ (16)));
12 template <typename> struct traits;
20 template <typename> struct EigenBase;
21 template <typename> class J;
22 template <typename, int = A::value> class DenseCoeffsBase;
23 template <typename, int, int, int = 0, int = 0, int = 0> class K;
24 template <typename> class N;
25 template <typename, typename> class CwiseUnaryOp;
26 template <typename> class L;
27 template <typename> class P;
28 template <typename> struct B;
29 template <typename> struct C;
30 template <typename Derived> struct dense_xpr_base
32 typedef N<Derived> type;
34 template <typename Packet> void padd (Packet);
35 template <> struct C<float>
42 packetOp (C<float>::type)
44 __m128 b = { m_other };
49 template <typename Derived>
50 class DenseCoeffsBase<Derived, ReadOnlyAccessors> : public EigenBase<Derived>
53 typedef typename C<typename traits<Derived>::Scalar>::type PacketScalar;
55 template <typename Derived>
56 class DenseCoeffsBase<Derived>
57 : public DenseCoeffsBase<Derived, ReadOnlyAccessors>
60 template <typename OtherDerived, int, int LoadMode>
62 copyPacket (typename traits<Derived>::Index, J<OtherDerived> p2)
64 p2.derived ().template packet<LoadMode> (0);
67 template <typename Derived> class J : public DenseCoeffsBase<Derived>
70 using DenseCoeffsBase<Derived>::derived;
71 template <typename OtherDerived>
72 Derived &lazyAssign (const J<OtherDerived> &);
74 template <typename Derived> class N : public J<Derived>
77 template <typename OtherDerived>
78 typename B<OtherDerived>::Type operator*(N<OtherDerived>);
81 template <typename Derived> struct EigenBase
86 return *static_cast<const Derived *> (this);
89 template <typename Derived1, typename Derived2> struct F
92 run (Derived1 p1, Derived2 p2)
99 p1.template copyPacket<Derived2, 0, srcAlignment> (0, p2);
102 template <typename Derived>
103 template <typename OtherDerived>
105 J<Derived>::lazyAssign (const J<OtherDerived> &p1)
107 F<Derived, OtherDerived>::run (derived (), p1.derived ());
109 template <typename Derived, typename OtherDerived> struct G
112 run (Derived p1, OtherDerived p2)
122 template <typename Derived> class M : public dense_xpr_base<Derived>::type
125 typedef typename traits<Derived>::Index Index;
127 M (Index, Index, Index) : m_storage (0, 0, 0) {}
128 template <typename OtherDerived>
130 _set_noalias (J<OtherDerived> p1)
132 G<Derived, OtherDerived>::run (this->derived (), p1.derived ());
135 template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
137 struct traits<K<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
139 typedef _Scalar Scalar;
140 typedef int StorageKind;
143 template <typename, int _Rows, int _Cols, int, int, int>
144 class K : public M<K<float, _Rows, _Cols> >
149 template <typename T0, typename T1> K (T0, T1);
150 template <typename OtherDerived> K (N<OtherDerived> p1) : Base (0, 0, 0)
152 Base::_set_noalias (p1);
155 template <typename UnaryOp, typename XprType>
156 struct traits<CwiseUnaryOp<UnaryOp, XprType> > : traits<XprType>
159 template <typename, typename, typename> class I;
160 template <typename, typename XprType>
162 : public I<D, XprType, typename traits<XprType>::StorageKind>
170 typename XprType::Nested nestedExpression ();
173 template <typename UnaryOp, typename XprType>
174 class I<UnaryOp, XprType, int>
175 : public dense_xpr_base<CwiseUnaryOp<UnaryOp, XprType> >::type
178 typedef CwiseUnaryOp<UnaryOp, XprType> Derived;
179 typedef typename dense_xpr_base<CwiseUnaryOp<UnaryOp, XprType> >::type Base;
180 typedef Derived Nested;
182 template <int LoadMode> void packet (typename traits<Derived>::Index)
184 derived ().functor ().packetOp (
185 derived ().nestedExpression ().template packet<LoadMode> (0));
188 template <typename> struct B
190 typedef P<CwiseUnaryOp<D, L<K<float, 0, 1> > > > Type;
192 template <typename Derived> class O : public J<Derived>
195 P<Derived> matrix ();
197 template <typename ExpressionType>
198 struct traits<L<ExpressionType> > : traits<typename ExpressionType::Nested>
201 template <typename ExpressionType> class L : public O<L<ExpressionType> >
206 typename O<L>::PacketScalar packet (typename traits<L>::Index);
208 template <typename ExpressionType>
209 struct traits<P<ExpressionType> > : traits<typename ExpressionType::Nested>
212 template <typename ExpressionType> class P : public N<P<ExpressionType> >
216 template <int LoadMode> void packet (typename traits<P>::Index)
218 m_expression.template packet<LoadMode> (0);
220 ExpressionType m_expression;
225 K<float, 0, a> m (0, 0);
226 K<float, 0, 1> c (0, 0);
227 c = m.array ().matrix () * m;