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

Some bug fixes for more complicated types introduced with gparity

This commit is contained in:
Peter Boyle 2015-08-13 10:50:34 +01:00
parent 8a0be42080
commit 8d4c43327b

View File

@ -343,14 +343,19 @@ namespace QCD {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type
{
iVector<vtype,N> ret;
ret._internal=G*arg._internal;
for(int i=0;i<N;i++){
ret._internal[i]=G*arg._internal[i];
}
return ret;
}
template<class vtype,int N> inline auto operator * ( const Gamma &G,const iMatrix<vtype,N> &arg) ->
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type
{
iMatrix<vtype,N> ret;
ret._internal=G*arg._internal;
for(int i=0;i<N;i++){
for(int j=0;j<N;j++){
ret._internal[i][j]=G*arg._internal[i][j];
}}
return ret;
}
@ -368,14 +373,19 @@ namespace QCD {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type
{
iVector<vtype,N> ret;
ret._internal=arg._internal*G;
for(int i=0;i<N;i++){
ret._internal=arg._internal[i]*G;
}
return ret;
}
template<class vtype,int N> inline auto operator * (const iMatrix<vtype,N> &arg, const Gamma &G) ->
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type
{
iMatrix<vtype,N> ret;
ret._internal=arg._internal*G;
for(int i=0;i<N;i++){
for(int j=0;j<N;j++){
ret._internal[i][j]=arg._internal[i][j]*G;
}}
return ret;
}