|
TM_INLINE void tm_dot_prod(mtype_t* sptr, mtype_t* kptr,uint32_t size, sumtype_t* result) |
|
{ |
|
sumtype_t sum=0; |
|
uint32_t i = 0; |
|
uint32_t cnt = (size>>3)<<3; //8 |
|
for(; i+8-1 <cnt; ){ |
|
sum += sptr[i]*kptr[i];i++; |
|
sum += sptr[i]*kptr[i];i++; |
|
sum += sptr[i]*kptr[i];i++; |
|
sum += sptr[i]*kptr[i];i++; |
|
sum += sptr[i]*kptr[i];i++; |
|
sum += sptr[i]*kptr[i];i++; |
|
sum += sptr[i]*kptr[i];i++; |
|
sum += sptr[i]*kptr[i];i++; |
|
} |
|
for(; i <size; i++){ |
|
sum += sptr[i]*kptr[i]; |
|
} |
|
*result = sum; |
|
return; |
|
} |
Is there any skills?