2 // { dg-options "-O3 -g" }
7 if (a
< b
) return b
; else return a
;
15 T (int, int) : dims (), count () {}
19 S (int r
, int c
) : rep (new T (r
, c
)) {}
25 static T
epsilon () throw ();
34 W (int n
) : data (new T
[n
]), count () {}
39 V (S s
) : rep (new V
<T
>::W (get_size (s
))) {}
40 int capacity () { return slice_len
; }
44 struct Z
: public V
<T
>
46 Z () : V
<T
> (S (0, 0)) {}
47 Z (int r
, int c
) : V
<T
> (S (r
, c
)) {}
50 struct A
: public Z
<T
>
53 A (int n
, int m
) : Z
<T
> (n
, m
) {}
56 struct B
: public V
<T
>
59 struct C
: public A
<double>
61 C () : A
<double> () {}
62 C (int r
, int c
) : A
<double> (r
, c
) {}
64 struct D
: public B
<double>
72 struct G
: public E
<T
>
75 struct H
: public G
<double>
84 R t
= __builtin_fabs (val
);
88 operator R () { __builtin_sqrt (sum
); return R (); }
93 template < class U
> void accum (U val
) {}
94 operator R () { return R (); }
100 template <class U
> void accum (U val
)
102 double z
= __builtin_fabs (val
);
103 max
= ::max (max
, z
);
105 operator R () { return max
; }
111 template <class U
> void accum (U
) {}
112 operator R () { return num
; }
114 template <class T
, class R
, class S
>
115 void bar (V
<T
> &v
, R
&res
, S acc
)
117 for (int i
= 0; i
< v
.capacity (); i
++)
121 template <class T
, class R
>
122 void bar (B
<T
> &v
, R
)
125 bar (v
, res
, I
<R
> ());
127 template <class T
, class R
>
128 R
bar (A
<T
> &v
, R p
)
132 bar (v
, res
, I
<R
> ());
134 bar (v
, res
, J
<R
> ());
135 else if (p
== sizeof (float) ? (p
) : foo (p
))
138 bar (v
, res
, K
<R
> ());
141 bar (v
, res
, L
<R
> ());
144 template <class CT
, class VectorT
, class R
>
146 baz (CT m
, R p
, R tol
, int maxiter
, VectorT
)
148 VectorT
y (0, 0), z (0, 1);
150 R gamma
= 0, gamma1
= 0;
152 (void) (bar (z
, q
) <= (gamma1
<= gamma
));
155 template <class CT
, class VectorT
, class R
>
157 test (CT m
, R p
, VectorT
)
160 R
sqrteps (U
<R
>::epsilon ());
161 baz (m
, p
, sqrteps
, a
, x
);