mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
fix build error enabling fcmla/mac in vector types for VLA
This commit is contained in:
parent
8c5a5fdfce
commit
6ddcef1bca
@ -396,7 +396,7 @@ struct MultComplex{
|
|||||||
struct MultAddComplex{
|
struct MultAddComplex{
|
||||||
// Complex a*b+c
|
// Complex a*b+c
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline void mac(const vec<T> &a, const vec<T> b, const vec<T> c){
|
inline vec<T> operator()(vec<T> a, vec<T> b, vec<T> c){
|
||||||
vec<T> out;
|
vec<T> out;
|
||||||
svbool_t pg1 = acle<T>::pg1();
|
svbool_t pg1 = acle<T>::pg1();
|
||||||
typename acle<T>::vt a_v = svld1(pg1, a.v);
|
typename acle<T>::vt a_v = svld1(pg1, a.v);
|
||||||
@ -406,8 +406,9 @@ struct MultAddComplex{
|
|||||||
// using FCMLA
|
// using FCMLA
|
||||||
typename acle<T>::vt r_v = svcmla_x(pg1, c_v, a_v, b_v, 0);
|
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);
|
r_v = svcmla_x(pg1, r_v, a_v, b_v, 90);
|
||||||
|
svst1(pg1, out.v, r_v);
|
||||||
|
|
||||||
svst1(pg1, a.v, r_v);
|
return out;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -299,8 +299,7 @@ public:
|
|||||||
// FIXME -- alias this to an accelerator_inline MAC struct.
|
// FIXME -- alias this to an accelerator_inline MAC struct.
|
||||||
|
|
||||||
// FIXME VLA build error
|
// FIXME VLA build error
|
||||||
//#if defined(A64FX) || defined(A64FXFIXEDSIZE) // VLA only: build error
|
#if defined(A64FX) || defined(A64FXFIXEDSIZE)
|
||||||
#if defined(A64FXFIXEDSIZE)
|
|
||||||
friend accelerator_inline void mac(Grid_simd *__restrict__ y,
|
friend accelerator_inline void mac(Grid_simd *__restrict__ y,
|
||||||
const Grid_simd *__restrict__ a,
|
const Grid_simd *__restrict__ a,
|
||||||
const Grid_simd *__restrict__ x) {
|
const Grid_simd *__restrict__ x) {
|
||||||
@ -791,10 +790,9 @@ accelerator_inline Grid_simd<S, V> operator*(Grid_simd<S, V> a, Grid_simd<S, V>
|
|||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------A64FX MAC ---------------------
|
// ---------------- A64FX MAC -------------------
|
||||||
// Distinguish between complex types and others
|
// Distinguish between complex types and others
|
||||||
//#if defined(A64FX) || defined(A64FXFIXEDSIZE) // VLA only: build error
|
#if defined(A64FX) || defined(A64FXFIXEDSIZE)
|
||||||
#if defined(A64FXFIXEDSIZE)
|
|
||||||
template <class S, class V, IfComplex<S> = 0>
|
template <class S, class V, IfComplex<S> = 0>
|
||||||
accelerator_inline Grid_simd<S, V> fxmac(Grid_simd<S, V> a, Grid_simd<S, V> b, Grid_simd<S, V> c) {
|
accelerator_inline Grid_simd<S, V> fxmac(Grid_simd<S, V> a, Grid_simd<S, V> b, Grid_simd<S, V> c) {
|
||||||
Grid_simd<S, V> ret;
|
Grid_simd<S, V> ret;
|
||||||
@ -810,7 +808,7 @@ accelerator_inline Grid_simd<S, V> fxmac(Grid_simd<S, V> a, Grid_simd<S, V> b, G
|
|||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
// -------------------------------------
|
// ----------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
// Distinguish between complex types and others
|
// Distinguish between complex types and others
|
||||||
|
Loading…
Reference in New Issue
Block a user