/perf/kseta

To get this branch, use:
bzr branch http://darksoft.org/webbzr/perf/kseta

« back to all changes in this revision

Viewing changes to tutorials/2_dotproduct/dp.cl

  • Committer: Suren A. Chilingaryan
  • Date: 2013-10-08 23:53:50 UTC
  • Revision ID: csa@dside.dyndns.org-20131008235350-hsu8oukzkh05gtcm
Add tutorials

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
__kernel void multiply(__global float *res, __global float *a, __global float *b, unsigned int size, __global float *gmem, __local float *lmem) {
 
2
    int i;
 
3
    
 
4
    if (get_global_id(0) == 0) {
 
5
        for(i = 0; i < size; i++) {
 
6
            sum  += a[i] * b[i];
 
7
        }
 
8
        *res = sum;
 
9
    }
 
10
}