Debian Codegraph @

shared/source/built_ins/kernels/copy_image_to_image3d.builtin_kernel

raw
1 /*
2 * Copyright (C) 2018-2025 Intel Corporation
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 R"===(
9 #pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable
10
11 __kernel void CopyImage3dToImage3d(
12 __read_only image3d_t input,
13 __write_only image3d_t output,
14 int4 srcOffset,
15 int4 dstOffset) {
16 const int x = get_global_id(0);
17 const int y = get_global_id(1);
18 const int z = get_global_id(2);
19
20 const int4 srcCoord = (int4)(x, y, z, 0) + srcOffset;
21 const int4 dstCoord = (int4)(x, y, z, 0) + dstOffset;
22 const uint4 c = read_imageui(input, srcCoord);
23 write_imageui(output, dstCoord, c);
24 }
25
26 __kernel void CopyImage1dBufferToImage3d(
27 __read_only image1d_buffer_t input,
28 __write_only image3d_t output,
29 int4 srcOffset,
30 int4 dstOffset) {
31 const int x = get_global_id(0);
32 const int y = get_global_id(1);
33 const int z = get_global_id(2);
34
35 const int4 srcCoord = (int4)(x, y, z, 0) + srcOffset;
36 const int4 dstCoord = (int4)(x, y, z, 0) + dstOffset;
37 const uint4 c = read_imageui(input, srcCoord.x);
38 write_imageui(output, dstCoord, c);
39 }
40
41 __kernel void CopyImage3dToImage1dBuffer(
42 __read_only image3d_t input,
43 __write_only image1d_buffer_t output,
44 int4 srcOffset,
45 int4 dstOffset) {
46 const int x = get_global_id(0);
47 const int y = get_global_id(1);
48 const int z = get_global_id(2);
49
50 const int4 srcCoord = (int4)(x, y, z, 0) + srcOffset;
51 const int4 dstCoord = (int4)(x, y, z, 0) + dstOffset;
52 const uint4 c = read_imageui(input, srcCoord);
53 write_imageui(output, dstCoord.x, c);
54 }
55
56 __kernel void CopyImage1dBufferToImage1dBuffer(
57 __read_only image1d_buffer_t input,
58 __write_only image1d_buffer_t output,
59 int4 srcOffset,
60 int4 dstOffset) {
61 const int x = get_global_id(0);
62 const int y = get_global_id(1);
63 const int z = get_global_id(2);
64
65 const int4 srcCoord = (int4)(x, y, z, 0) + srcOffset;
66 const int4 dstCoord = (int4)(x, y, z, 0) + dstOffset;
67 const uint4 c = read_imageui(input, srcCoord.x);
68 write_imageui(output, dstCoord.x, c);
69 }
70 )==="