File: test_get_image_info.cl

package info (click to toggle)
beignet 0.9.3~really.0.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,644 kB
  • ctags: 15,542
  • sloc: cpp: 49,147; ansic: 13,274; lisp: 2,244; python: 933; sh: 626; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 456 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
__kernel void
test_get_image_info(__write_only image3d_t src, __global int *size, __global int *fmt)
{
  int id = (int)get_global_id(0);
  int w, h, depth;
  w = get_image_width(src);
  h = get_image_height(src);
  depth = get_image_depth(src);
  int channel_data_type = get_image_channel_data_type(src);
  int channel_order = get_image_channel_order(src);
  size[id] = (w << 20 | h << 8  | depth);
  fmt[id] = (channel_data_type << 16 | channel_order);
}