Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix Multiplication (ch.21) #74

Open
GoogleCodeExporter opened this issue Jan 12, 2016 · 0 comments
Open

Matrix Multiplication (ch.21) #74

GoogleCodeExporter opened this issue Jan 12, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

In chapter 21, the example proposed is a "multiplication of A times B with the 
result added into C" (p.499)
This function is then presented as C = C + A * B throughout the chapter.

However, it seems to me that the presented code is actually doing C = A * B.

In listing 21.1 (p.500-501) the multiplication A*B is stored in tmp (which is 
initialized to 0.0). tmp is then copied into C(i,j) without taking in count 
it's initial value.
Also, in listing 21.3 (p.504-505) the C matrix is created as a 
CL_MEM_WRITE_ONLY memory object and is obviously not added in the queue before 
launching the kernel.


Original issue reported on code.google.com by [email protected] on 10 Oct 2012 at 10:10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant