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:
parent
c7dbf4c87e
commit
b285138be4
@ -43,7 +43,7 @@ auto outerProduct (const iVector<l,N>& lhs,const iVector<r,N>& rhs) -> iMatrix<d
|
|||||||
for(int c1=0;c1<N;c1++){
|
for(int c1=0;c1<N;c1++){
|
||||||
for(int c2=0;c2<N;c2++){
|
for(int c2=0;c2<N;c2++){
|
||||||
ret._internal[c1][c2] = outerProduct(lhs._internal[c1],rhs._internal[c2]);
|
ret._internal[c1][c2] = outerProduct(lhs._internal[c1],rhs._internal[c2]);
|
||||||
}}
|
}}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,20 +57,13 @@ auto outerProduct (const iScalar<l>& lhs,const iScalar<r>& rhs) -> iScalar<declt
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class CC,IfComplex<CC> = 0>
|
||||||
accelerator_inline ComplexF outerProduct(const ComplexF &l, const ComplexF& r)
|
accelerator_inline CC outerProduct(const CC &l, const CC& r)
|
||||||
{
|
{
|
||||||
return l*conj(r);
|
return l*conj(r);
|
||||||
}
|
}
|
||||||
accelerator_inline ComplexD outerProduct(const ComplexD &l, const ComplexD& r)
|
template<class RR,IfReal<RR> = 0>
|
||||||
{
|
accelerator_inline RR outerProduct(const RR &l, const RR& 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)
|
|
||||||
{
|
{
|
||||||
return l*r;
|
return l*r;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user