mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
symmetrize Mult and MultAddComplex
This commit is contained in:
parent
9a86059761
commit
81484a4760
@ -400,7 +400,7 @@ struct MultComplex{
|
||||
struct MultAddComplex{
|
||||
// Complex a*b+c
|
||||
template <typename T>
|
||||
inline vec<T> mac(const vec<T> &a, const vec<T> &b, const vec<T> &c){
|
||||
inline vec<T> mac(const vec<T> &a, const vec<T> b, const vec<T> c){
|
||||
|
||||
vec<T> out;
|
||||
svbool_t pg1 = acle<T>::pg1();
|
||||
@ -412,9 +412,7 @@ struct MultAddComplex{
|
||||
typename acle<T>::vt r_v = svcmla_x(pg1, c_v, a_v, b_v, 0);
|
||||
r_v = svcmla_x(pg1, r_v, a_v, b_v, 90);
|
||||
|
||||
svst1(pg1, out.v, r_v);
|
||||
|
||||
return out;
|
||||
svst1(pg1, a.v, r_v);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -369,18 +369,18 @@ struct MultComplex{
|
||||
struct MultAddComplex{
|
||||
// Complex a*b+c
|
||||
// Complex float
|
||||
inline vecf mac(vecf a, vecf b, vecf c){
|
||||
inline vecf mac(vecf &a, vecf b, vecf c){
|
||||
pred pg1 = acle<float>::pg1();
|
||||
// using FCMLA
|
||||
vecf r_v = svcmla_x(pg1, c, a, b, 0);
|
||||
return svcmla_x(pg1, r_v, a, b, 90);
|
||||
a = svcmla_x(pg1, r_v, a, b, 90);
|
||||
}
|
||||
// Complex double
|
||||
inline vecd mac(vecd a, vecd b, vecd c){
|
||||
inline vecd mac(vecd &a, vecd b, vecd c){
|
||||
pred pg1 = acle<double>::pg1();
|
||||
// using FCMLA
|
||||
vecd r_v = svcmla_x(pg1, c, a, b, 0);
|
||||
return svcmla_x(pg1, r_v, a, b, 90);
|
||||
a = svcmla_x(pg1, r_v, a, b, 90);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user