|
1 | 1 | /* |
2 | 2 | * |
3 | | - * Copyright (C) 2019 Intel Corporation |
| 3 | + * Copyright (C) 2019-2025 Intel Corporation |
4 | 4 | * |
5 | 5 | * SPDX-License-Identifier: MIT |
6 | 6 | * |
@@ -86,3 +86,78 @@ kernel void test_device_memory10_unit_size4(__global uint *src, __global uint *d |
86 | 86 | size_t tid = get_global_id(0); |
87 | 87 | dst[tid] = src[tid]; |
88 | 88 | } |
| 89 | + |
| 90 | +struct buffer { |
| 91 | + uint *data; |
| 92 | +}; |
| 93 | + |
| 94 | +kernel void test_device_memory1_indirect(__global struct buffer *src_ptrs, __global struct buffer *dst_ptrs, uint dispatch_id) { |
| 95 | + uint *src = src_ptrs[dispatch_id].data; |
| 96 | + uint *dst = dst_ptrs[dispatch_id].data; |
| 97 | + size_t tid = get_global_id(0); |
| 98 | + dst[tid] = src[tid]; |
| 99 | +} |
| 100 | + |
| 101 | +kernel void test_device_memory2_indirect(__global struct buffer *src_ptrs, __global struct buffer *dst_ptrs, uint dispatch_id) { |
| 102 | + uint *src = src_ptrs[dispatch_id].data; |
| 103 | + uint *dst = dst_ptrs[dispatch_id].data; |
| 104 | + size_t tid = get_global_id(0); |
| 105 | + dst[tid] = src[tid]; |
| 106 | +} |
| 107 | + |
| 108 | +kernel void test_device_memory3_indirect(__global struct buffer *src_ptrs, __global struct buffer *dst_ptrs, uint dispatch_id) { |
| 109 | + uint *src = src_ptrs[dispatch_id].data; |
| 110 | + uint *dst = dst_ptrs[dispatch_id].data; |
| 111 | + size_t tid = get_global_id(0); |
| 112 | + dst[tid] = src[tid]; |
| 113 | +} |
| 114 | + |
| 115 | +kernel void test_device_memory4_indirect(__global struct buffer *src_ptrs, __global struct buffer *dst_ptrs, uint dispatch_id) { |
| 116 | + uint *src = src_ptrs[dispatch_id].data; |
| 117 | + uint *dst = dst_ptrs[dispatch_id].data; |
| 118 | + size_t tid = get_global_id(0); |
| 119 | + dst[tid] = src[tid]; |
| 120 | +} |
| 121 | + |
| 122 | +kernel void test_device_memory5_indirect(__global struct buffer *src_ptrs, __global struct buffer *dst_ptrs, uint dispatch_id) { |
| 123 | + uint *src = src_ptrs[dispatch_id].data; |
| 124 | + uint *dst = dst_ptrs[dispatch_id].data; |
| 125 | + size_t tid = get_global_id(0); |
| 126 | + dst[tid] = src[tid]; |
| 127 | +} |
| 128 | + |
| 129 | +kernel void test_device_memory6_indirect(__global struct buffer *src_ptrs, __global struct buffer *dst_ptrs, uint dispatch_id) { |
| 130 | + uint *src = src_ptrs[dispatch_id].data; |
| 131 | + uint *dst = dst_ptrs[dispatch_id].data; |
| 132 | + size_t tid = get_global_id(0); |
| 133 | + dst[tid] = src[tid]; |
| 134 | +} |
| 135 | + |
| 136 | +kernel void test_device_memory7_indirect(__global struct buffer *src_ptrs, __global struct buffer *dst_ptrs, uint dispatch_id) { |
| 137 | + uint *src = src_ptrs[dispatch_id].data; |
| 138 | + uint *dst = dst_ptrs[dispatch_id].data; |
| 139 | + size_t tid = get_global_id(0); |
| 140 | + dst[tid] = src[tid]; |
| 141 | +} |
| 142 | + |
| 143 | +kernel void test_device_memory8_indirect(__global struct buffer *src_ptrs, __global struct buffer *dst_ptrs, uint dispatch_id) { |
| 144 | + uint *src = src_ptrs[dispatch_id].data; |
| 145 | + uint *dst = dst_ptrs[dispatch_id].data; |
| 146 | + size_t tid = get_global_id(0); |
| 147 | + dst[tid] = src[tid]; |
| 148 | +} |
| 149 | + |
| 150 | +kernel void test_device_memory9_indirect(__global struct buffer *src_ptrs, __global struct buffer *dst_ptrs, uint dispatch_id) { |
| 151 | + uint *src = src_ptrs[dispatch_id].data; |
| 152 | + uint *dst = dst_ptrs[dispatch_id].data; |
| 153 | + size_t tid = get_global_id(0); |
| 154 | + dst[tid] = src[tid]; |
| 155 | +} |
| 156 | + |
| 157 | +kernel void test_device_memory10_indirect(__global struct buffer *src_ptrs, __global struct buffer *dst_ptrs, uint dispatch_id) { |
| 158 | + uint *src = src_ptrs[dispatch_id].data; |
| 159 | + uint *dst = dst_ptrs[dispatch_id].data; |
| 160 | + size_t tid = get_global_id(0); |
| 161 | + dst[tid] = src[tid]; |
| 162 | +} |
| 163 | + |
0 commit comments