You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
batch<T, A> div(batch<T, A> const& self, batch<T, A> const& other, requires<generic>) {
27
+
batch<T, A> div(batch<T, A> const& self, batch<T, A> const& other, requires_arch<generic>) {
28
28
returndetail::apply([](T x, T y) -> T { return x / y;}, self, other);
29
29
}
30
30
31
31
// fma
32
-
template<classA, classT> batch<T, A> fma(batch<T, A> const& x, batch<T, A> const& y, batch<T, A> const& z, requires<generic>) {
32
+
template<classA, classT> batch<T, A> fma(batch<T, A> const& x, batch<T, A> const& y, batch<T, A> const& z, requires_arch<generic>) {
33
33
return x * y + z;
34
34
}
35
35
36
-
template<classA, classT> batch<std::complex<T>, A> fma(batch<std::complex<T>, A> const& x, batch<std::complex<T>, A> const& y, batch<std::complex<T>, A> const& z, requires<generic>) {
36
+
template<classA, classT> batch<std::complex<T>, A> fma(batch<std::complex<T>, A> const& x, batch<std::complex<T>, A> const& y, batch<std::complex<T>, A> const& z, requires_arch<generic>) {
37
37
auto res_r = fms(x.real(), y.real(), fms(x.imag(), y.imag(), z.real()));
38
38
auto res_i = fma(x.real(), y.imag(), fma(x.imag(), y.real(), z.imag()));
39
39
return {res_r, res_i};
40
40
}
41
41
42
42
// fms
43
-
template<classA, classT> batch<T, A> fms(batch<T, A> const& x, batch<T, A> const& y, batch<T, A> const& z, requires<generic>) {
43
+
template<classA, classT> batch<T, A> fms(batch<T, A> const& x, batch<T, A> const& y, batch<T, A> const& z, requires_arch<generic>) {
44
44
return x * y - z;
45
45
}
46
46
47
-
template<classA, classT> batch<std::complex<T>, A> fms(batch<std::complex<T>, A> const& x, batch<std::complex<T>, A> const& y, batch<std::complex<T>, A> const& z, requires<generic>) {
47
+
template<classA, classT> batch<std::complex<T>, A> fms(batch<std::complex<T>, A> const& x, batch<std::complex<T>, A> const& y, batch<std::complex<T>, A> const& z, requires_arch<generic>) {
48
48
auto res_r = fms(x.real(), y.real(), fma(x.imag(), y.imag(), z.real()));
49
49
auto res_i = fma(x.real(), y.imag(), fms(x.imag(), y.real(), z.imag()));
50
50
return {res_r, res_i};
51
51
}
52
52
53
53
// fnma
54
-
template<classA, classT> batch<T, A> fnma(batch<T, A> const& x, batch<T, A> const& y, batch<T, A> const& z, requires<generic>) {
54
+
template<classA, classT> batch<T, A> fnma(batch<T, A> const& x, batch<T, A> const& y, batch<T, A> const& z, requires_arch<generic>) {
55
55
return -x * y + z;
56
56
}
57
57
58
-
template<classA, classT> batch<std::complex<T>, A> fnma(batch<std::complex<T>, A> const& x, batch<std::complex<T>, A> const& y, batch<std::complex<T>, A> const& z, requires<generic>) {
58
+
template<classA, classT> batch<std::complex<T>, A> fnma(batch<std::complex<T>, A> const& x, batch<std::complex<T>, A> const& y, batch<std::complex<T>, A> const& z, requires_arch<generic>) {
59
59
auto res_r = - fms(x.real(), y.real(), fma(x.imag(), y.imag(), z.real()));
60
60
auto res_i = - fma(x.real(), y.imag(), fms(x.imag(), y.real(), z.imag()));
61
61
return {res_r, res_i};
62
62
}
63
63
64
64
// fnms
65
-
template<classA, classT> batch<T, A> fnms(batch<T, A> const& x, batch<T, A> const& y, batch<T, A> const& z, requires<generic>) {
65
+
template<classA, classT> batch<T, A> fnms(batch<T, A> const& x, batch<T, A> const& y, batch<T, A> const& z, requires_arch<generic>) {
66
66
return -x * y - z;
67
67
}
68
68
69
-
template<classA, classT> batch<std::complex<T>, A> fnms(batch<std::complex<T>, A> const& x, batch<std::complex<T>, A> const& y, batch<std::complex<T>, A> const& z, requires<generic>) {
69
+
template<classA, classT> batch<std::complex<T>, A> fnms(batch<std::complex<T>, A> const& x, batch<std::complex<T>, A> const& y, batch<std::complex<T>, A> const& z, requires_arch<generic>) {
70
70
auto res_r = - fms(x.real(), y.real(), fms(x.imag(), y.imag(), z.real()));
71
71
auto res_i = - fma(x.real(), y.imag(), fma(x.imag(), y.real(), z.imag()));
0 commit comments