Created
April 21, 2012 19:35
-
-
Save engie/2439238 to your computer and use it in GitHub Desktop.
Initial matrix*vector implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//B is a uBLAS matrix | |
//W is a uBLAS vector | |
//myX is the output | |
for( uint32 i = 0; i < B.size1(); i++ ) //For each row | |
{ | |
myX[i] = 0; | |
for( uint32 j = 0; j < B.size2(); j++ ) //For each col | |
{ | |
myX[i] += B(i, j) * W(j); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment