| 123456789101112131415161718192021222324 |
- __kernel void vector_add(__global const uint *A, __global const uint *B, __global uint *C) {
-
- // Get the index of the current element to be processed
- int i = get_global_id(0);
-
- // Do the operation
- C[i] = (A[i] + B[i]);
-
- // Now break the compiler
- uint a[4];
- uchar c = 0x01;
- short s = 0x0101;
- c = 0x23;
- s = c;
- for(int t=0;t<4;t++) {
- a[t]=c;
- }
- for(int t=0;t<4;t++) {
- a[t]=s;
- if(t>0) {
- a[t-1]=a[t] + c + s;
- }
- }
- }
|