1
1
/*
2
- * Copyright (c ) 2017, Intel Corporation
2
+ * Copyright (C ) 2017-2018 Intel Corporation
3
3
*
4
- * Permission is hereby granted, free of charge, to any person obtaining a
5
- * copy of this software and associated documentation files (the "Software"),
6
- * to deal in the Software without restriction, including without limitation
7
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
- * and/or sell copies of the Software, and to permit persons to whom the
9
- * Software is furnished to do so, subject to the following conditions:
4
+ * SPDX-License-Identifier: MIT
10
5
*
11
- * The above copyright notice and this permission notice shall be included
12
- * in all copies or substantial portions of the Software.
13
- *
14
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20
- * OTHER DEALINGS IN THE SOFTWARE.
21
6
*/
22
7
23
8
void block_fn (size_t tid , int mul , __global int * res )
@@ -39,15 +24,15 @@ kernel void simple_block_kernel(__global int* res)
39
24
if (enq_res != CLK_SUCCESS ) { res [tid ] = -1 ; return ; }
40
25
}
41
26
42
- void block_reflection (size_t scalar , __global uint * buffer , read_only image3d_t img , sampler_t sampler )
27
+ void block_reflection (ulong scalar , __global uint * buffer , read_only image3d_t img , sampler_t sampler )
43
28
{
44
29
float4 color ;
45
30
int4 coord ;
46
31
buffer [0 ] = scalar ;
47
32
coord .x = scalar ;
48
33
coord .y = 0 ;
49
34
coord .z = 0 ;
50
-
35
+
51
36
int width = get_image_width ( img );
52
37
int heigth = get_image_height ( img );
53
38
int depth = get_image_depth ( img );
@@ -67,7 +52,7 @@ void block_reflection(size_t scalar, __global uint* buffer, read_only image3d_t
67
52
color = read_imagef ( img , samplerA , coord );
68
53
69
54
buffer [7 ] = (uint )color .y ;
70
-
55
+
71
56
queue_t def_q = get_default_queue ();
72
57
ndrange_t ndrange = ndrange_1D (1 );
73
58
if ( scalar > 2 ){
@@ -76,7 +61,7 @@ void block_reflection(size_t scalar, __global uint* buffer, read_only image3d_t
76
61
}
77
62
}
78
63
79
- kernel void kernel_reflection (sampler_t sampler , read_only image3d_t img , __global uint * buffer , size_t scalar )
64
+ kernel void kernel_reflection (sampler_t sampler , read_only image3d_t img , __global uint * buffer , ulong scalar )
80
65
{
81
66
size_t tid = get_global_id (0 );
82
67
0 commit comments