| 640 | |
| 641 | template<typename T> |
| 642 | T CalcDot(UserData* pUserData, UserData* pOther) { |
| 643 | T sum = T(); |
| 644 | i32 bufSize = pUserData->width * pUserData->height; |
| 645 | for (i32 i = 0; i < bufSize; i++) { |
| 646 | T* pData = (T*)pUserData->pData; |
| 647 | T* pOtherData = (T*)pOther->pData; |
| 648 | sum += pOtherData[i] * pData[i]; |
| 649 | } |
| 650 | return sum; |
| 651 | } |
| 652 | |
| 653 | |
| 654 | // *********************************************************************** |
nothing calls this directly
no outgoing calls
no test coverage detected