blob: 31269f4b971d98d44523dea564a3c4d06e4c51d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "stdlib.h"
struct my_struct {
int a;
int b[2];
};
const __constant int g[4] = {0,1,2,3};
__kernel void struct_cl (struct my_struct s, int x, __global struct my_struct *mem, int y)
{
struct my_struct hop;
if (y == 0) {
hop.a = 1;
hop.b[0] = 2;
hop.b[1] = 2;
} else {
hop = s;
}
mem[0] = hop;
}
|