1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Better checking on types

This commit is contained in:
Peter Boyle 2019-06-15 08:27:48 +01:00
parent c7dbf4c87e
commit b285138be4

View File

@ -57,20 +57,13 @@ auto outerProduct (const iScalar<l>& lhs,const iScalar<r>& rhs) -> iScalar<declt
return ret;
}
accelerator_inline ComplexF outerProduct(const ComplexF &l, const ComplexF& r)
template<class CC,IfComplex<CC> = 0>
accelerator_inline CC outerProduct(const CC &l, const CC& r)
{
return l*conj(r);
}
accelerator_inline ComplexD outerProduct(const ComplexD &l, const ComplexD& r)
{
return l*conj(r);
}
accelerator_inline RealF outerProduct(const RealF &l, const RealF& r)
{
return l*r;
}
accelerator_inline RealD outerProduct(const RealD &l, const RealD& r)
template<class RR,IfReal<RR> = 0>
accelerator_inline RR outerProduct(const RR &l, const RR& r)
{
return l*r;
}