File: static_array_padded_struct.cl

package info (click to toggle)
oclgrind 21.10-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,216 kB
  • sloc: cpp: 21,369; ansic: 6,395; lisp: 1,122; python: 124; makefile: 19
file content (12 lines) | stat: -rw-r--r-- 181 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
struct S
{
  int a;
  char b[2];
};

kernel void static_array_padded_struct(global char *output)
{
  struct S s = {-1, {42, 7}};
  int i = get_global_id(0);
  output[i] = s.b[i];
}