blob: 4cbf894569a5866d29333642467a04c79f917c76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
__kernel void compiler_subgroup_buffer_block_read_ui1(global uint *src, global uint *dst)
{
int id = get_global_id(0);
global uint * p = src + get_sub_group_id() * get_max_sub_group_size();
uint tmp = intel_sub_group_block_read_ui(p);
dst[id] = tmp;
}
__kernel void compiler_subgroup_buffer_block_read_ui2(global uint *src, global uint2 *dst)
{
int id = get_global_id(0);
global uint * p = src + get_sub_group_id() * get_max_sub_group_size()*2;
uint2 tmp = intel_sub_group_block_read_ui2(p);
dst[id] = tmp;
}
__kernel void compiler_subgroup_buffer_block_read_ui4(global uint *src, global uint4 *dst)
{
int id = get_global_id(0);
global uint * p = src + get_sub_group_id() * get_max_sub_group_size()*4;
uint4 tmp = intel_sub_group_block_read_ui4(p);
dst[id] = tmp;
}
__kernel void compiler_subgroup_buffer_block_read_ui8(global uint *src, global uint8 *dst)
{
int id = get_global_id(0);
global uint * p = src + get_sub_group_id() * get_max_sub_group_size()*8;
uint8 tmp = intel_sub_group_block_read_ui8(p);
dst[id] = tmp;
}
#ifdef SHORT
__kernel void compiler_subgroup_buffer_block_read_us1(global ushort *src, global ushort *dst)
{
int id = get_global_id(0);
global ushort * p = src + get_sub_group_id() * get_max_sub_group_size();
ushort tmp = intel_sub_group_block_read_us(p);
dst[id] = tmp;
}
__kernel void compiler_subgroup_buffer_block_read_us2(global ushort *src, global ushort2 *dst)
{
int id = get_global_id(0);
global ushort * p = src + get_sub_group_id() * get_max_sub_group_size()*2;
ushort2 tmp = intel_sub_group_block_read_us2(p);
dst[id] = tmp;
}
__kernel void compiler_subgroup_buffer_block_read_us4(global ushort *src, global ushort4 *dst)
{
int id = get_global_id(0);
global ushort * p = src + get_sub_group_id() * get_max_sub_group_size()*4;
ushort4 tmp = intel_sub_group_block_read_us4(p);
dst[id] = tmp;
}
__kernel void compiler_subgroup_buffer_block_read_us8(global ushort *src, global ushort8 *dst)
{
int id = get_global_id(0);
global ushort * p = src + get_sub_group_id() * get_max_sub_group_size()*8;
ushort8 tmp = intel_sub_group_block_read_us8(p);
dst[id] = tmp;
}
#endif
|