Mercurial > hg > Game > Cerium
changeset 1814:efaa5beb02e9 draft
fix multiply kernel
author | kkb |
---|---|
date | Thu, 12 Dec 2013 19:03:28 +0900 |
parents | d7973604e81f |
children | 9de57d13a386 |
files | example/multiply/gpu/Multi.cl |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/example/multiply/gpu/Multi.cl Thu Dec 12 18:34:16 2013 +0900 +++ b/example/multiply/gpu/Multi.cl Thu Dec 12 19:03:28 2013 +0900 @@ -3,7 +3,8 @@ { // int i=get_global_id(0); long length = (long)params[0]; - for(int i=0;i<length;i++) { - C[i]=A[i]*B[i]; - } + long id = get_global_id(0); + // for(int i=0;i<length;i++) { + C[id]=A[id]*B[id]; + //} }