@@ -14,8 +14,8 @@ limitations under the License. */
14
14
15
15
#include <cl_common.h>
16
16
17
- __kernel void elementwise_mul (__global image2d_t input ,
18
- __global image2d_t bias ,
17
+ __kernel void elementwise_mul (__read_only image2d_t input ,
18
+ __read_only image2d_t bias ,
19
19
__write_only image2d_t outputImage ) {
20
20
int x = get_global_id (0 );
21
21
int y = get_global_id (1 );
@@ -36,8 +36,8 @@ __kernel void elementwise_mul(__global image2d_t input,
36
36
WRITE_IMG_TYPE (CL_DTYPE_CHAR , outputImage , coords , output );
37
37
}
38
38
39
- __kernel void channel_mul (__global image2d_t input ,
40
- __global image2d_t bias ,
39
+ __kernel void channel_mul (__read_only image2d_t input ,
40
+ __read_only image2d_t bias ,
41
41
__write_only image2d_t outputImage ,
42
42
int w ) {
43
43
int x = get_global_id (0 );
@@ -87,8 +87,8 @@ __kernel void channel_mul_d1(__read_only image2d_t input,
87
87
88
88
// etc : 1 1 1 72
89
89
// run time Y [value,0,0,0] * 72
90
- __kernel void channel_mul_d2 (__global image2d_t input ,
91
- __global image2d_t bias ,
90
+ __kernel void channel_mul_d2 (__read_only image2d_t input ,
91
+ __read_only image2d_t bias ,
92
92
__write_only image2d_t outputImage ,
93
93
int w ) {
94
94
int x = get_global_id (0 );
@@ -152,8 +152,8 @@ __kernel void channel_mul_d2(__global image2d_t input,
152
152
}
153
153
154
154
// c 1 1
155
- __kernel void channel_mul_d3 (__global image2d_t input ,
156
- __global image2d_t bias ,
155
+ __kernel void channel_mul_d3 (__read_only image2d_t input ,
156
+ __read_only image2d_t bias ,
157
157
__write_only image2d_t outputImage ,
158
158
int w ) {
159
159
int x = get_global_id (0 );
@@ -179,9 +179,10 @@ __kernel void channel_mul_d3(__global image2d_t input,
179
179
WRITE_IMG_TYPE (CL_DTYPE_CHAR , outputImage , coords , output );
180
180
}
181
181
182
- __kernel void channel_mul_d4 (__global image2d_t input ,
183
- __global image2d_t bias ,
184
- __write_only image2d_t outputImage , int w ) {
182
+ __kernel void channel_mul_d4 (__read_only image2d_t input ,
183
+ __read_only image2d_t bias ,
184
+ __write_only image2d_t outputImage ,
185
+ int w ) {
185
186
int x = get_global_id (0 );
186
187
int y = get_global_id (1 );
187
188
0 commit comments