MCPcopy Create free account
hub / github.com/DavidColson/Polybox / CalcDot

Function CalcDot

source/userdata.cpp:642–651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

640
641template<typename T>
642T 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// ***********************************************************************

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected