1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-14 01:35:36 +00:00

Switch to strong_inline macro to force icpc's hand

This commit is contained in:
Peter Boyle 2015-05-15 11:40:00 +01:00
parent adc4f86020
commit b38bf82d48

View File

@ -21,12 +21,12 @@ namespace Grid {
// scal x vec = vec // scal x vec = vec
/////////////////////////// ///////////////////////////
template<class rtype,class vtype,class mtype> template<class rtype,class vtype,class mtype>
inline void mac(iScalar<rtype> * __restrict__ ret,const iScalar<vtype> * __restrict__ lhs,const iScalar<mtype> * __restrict__ rhs) strong_inline void mac(iScalar<rtype> * __restrict__ ret,const iScalar<vtype> * __restrict__ lhs,const iScalar<mtype> * __restrict__ rhs)
{ {
mac(&ret->_internal,&lhs->_internal,&rhs->_internal); mac(&ret->_internal,&lhs->_internal,&rhs->_internal);
} }
template<class rrtype,class ltype,class rtype,int N> template<class rrtype,class ltype,class rtype,int N>
inline void mac(iMatrix<rrtype,N> * __restrict__ ret,const iMatrix<ltype,N> * __restrict__ lhs,const iMatrix<rtype,N> * __restrict__ rhs){ strong_inline void mac(iMatrix<rrtype,N> * __restrict__ ret,const iMatrix<ltype,N> * __restrict__ lhs,const iMatrix<rtype,N> * __restrict__ rhs){
for(int c2=0;c2<N;c2++){ for(int c2=0;c2<N;c2++){
for(int c1=0;c1<N;c1++){ for(int c1=0;c1<N;c1++){
for(int c3=0;c3<N;c3++){ for(int c3=0;c3<N;c3++){
@ -35,7 +35,7 @@ inline void mac(iMatrix<rrtype,N> * __restrict__ ret,const iMatrix<ltype,N> * __
return; return;
} }
template<class rrtype,class ltype,class rtype,int N> template<class rrtype,class ltype,class rtype,int N>
inline void mac(iMatrix<rrtype,N> * __restrict__ ret,const iMatrix<ltype,N> * __restrict__ lhs,const iScalar<rtype> * __restrict__ rhs){ strong_inline void mac(iMatrix<rrtype,N> * __restrict__ ret,const iMatrix<ltype,N> * __restrict__ lhs,const iScalar<rtype> * __restrict__ rhs){
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++){
mac(&ret->_internal[c1][c2],&lhs->_internal[c1][c2],&rhs->_internal); mac(&ret->_internal[c1][c2],&lhs->_internal[c1][c2],&rhs->_internal);
@ -43,7 +43,7 @@ inline void mac(iMatrix<rrtype,N> * __restrict__ ret,const iMatrix<ltype,N> * __
return; return;
} }
template<class rrtype,class ltype,class rtype,int N> template<class rrtype,class ltype,class rtype,int N>
inline void mac(iMatrix<rrtype,N> * __restrict__ ret,const iScalar<ltype> * __restrict__ lhs,const iMatrix<rtype,N> * __restrict__ rhs){ strong_inline void mac(iMatrix<rrtype,N> * __restrict__ ret,const iScalar<ltype> * __restrict__ lhs,const iMatrix<rtype,N> * __restrict__ rhs){
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++){
mac(&ret->_internal[c1][c2],&lhs->_internal,&rhs->_internal[c1][c2]); mac(&ret->_internal[c1][c2],&lhs->_internal,&rhs->_internal[c1][c2]);
@ -51,7 +51,7 @@ inline void mac(iMatrix<rrtype,N> * __restrict__ ret,const iScalar<ltype> * __re
return; return;
} }
template<class rrtype,class ltype,class rtype,int N> template<class rrtype,class ltype,class rtype,int N>
inline void mac(iVector<rrtype,N> * __restrict__ ret,const iMatrix<ltype,N> * __restrict__ lhs,const iVector<rtype,N> * __restrict__ rhs) strong_inline void mac(iVector<rrtype,N> * __restrict__ ret,const iMatrix<ltype,N> * __restrict__ lhs,const iVector<rtype,N> * __restrict__ rhs)
{ {
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++){
@ -60,7 +60,7 @@ inline void mac(iVector<rrtype,N> * __restrict__ ret,const iMatrix<ltype,N> * __
return; return;
} }
template<class rrtype,class ltype,class rtype,int N> template<class rrtype,class ltype,class rtype,int N>
inline void mac(iVector<rrtype,N> * __restrict__ ret,const iScalar<ltype> * __restrict__ lhs,const iVector<rtype,N> * __restrict__ rhs) strong_inline void mac(iVector<rrtype,N> * __restrict__ ret,const iScalar<ltype> * __restrict__ lhs,const iVector<rtype,N> * __restrict__ rhs)
{ {
for(int c1=0;c1<N;c1++){ for(int c1=0;c1<N;c1++){
mac(&ret->_internal[c1],&lhs->_internal,&rhs->_internal[c1]); mac(&ret->_internal[c1],&lhs->_internal,&rhs->_internal[c1]);
@ -68,7 +68,7 @@ inline void mac(iVector<rrtype,N> * __restrict__ ret,const iScalar<ltype> * __re
return; return;
} }
template<class rrtype,class ltype,class rtype,int N> template<class rrtype,class ltype,class rtype,int N>
inline void mac(iVector<rrtype,N> * __restrict__ ret,const iVector<ltype,N> * __restrict__ lhs,const iScalar<rtype> * __restrict__ rhs) strong_inline void mac(iVector<rrtype,N> * __restrict__ ret,const iVector<ltype,N> * __restrict__ lhs,const iScalar<rtype> * __restrict__ rhs)
{ {
for(int c1=0;c1<N;c1++){ for(int c1=0;c1<N;c1++){
mac(&ret->_internal[c1],&lhs->_internal[c1],&rhs->_internal); mac(&ret->_internal[c1],&lhs->_internal[c1],&rhs->_internal);