1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-12 20:27:06 +01:00

Stout smearing compiles (untested)

This commit is contained in:
2016-02-24 03:16:50 +09:00
parent c1b1b89d17
commit a7251f28c7
15 changed files with 721 additions and 589 deletions

View File

@ -517,6 +517,9 @@ namespace Grid {
return ret;
}
///////////////////////////////
// Define available types
///////////////////////////////

View File

@ -59,6 +59,18 @@ namespace Grid {
}
};
template<class scalar> struct AcosRealFunctor {
scalar operator()(const scalar &a) const {
return acos(real(a));
}
};
template<class scalar> struct AsinRealFunctor {
scalar operator()(const scalar &a) const {
return asin(real(a));
}
};
template<class scalar> struct LogRealFunctor {
scalar operator()(const scalar &a) const {
return log(real(a));
@ -146,6 +158,14 @@ namespace Grid {
return SimdApply(SinRealFunctor<S>(),r);
}
template < class S, class V >
inline Grid_simd<S,V> acos(const Grid_simd<S,V> &r) {
return SimdApply(AcosRealFunctor<S>(),r);
}
template < class S, class V >
inline Grid_simd<S,V> asin(const Grid_simd<S,V> &r) {
return SimdApply(AsinRealFunctor<S>(),r);
}
template < class S, class V >
inline Grid_simd<S,V> log(const Grid_simd<S,V> &r) {
return SimdApply(LogRealFunctor<S>(),r);
}