11/*
2- * Copyright (c ) 2017, Intel Corporation
2+ * Copyright (C ) 2017-2018 Intel Corporation
33 *
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
105 *
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.
216 */
227
238void block_fn (size_t tid , int mul , __global int * res )
@@ -39,15 +24,15 @@ kernel void simple_block_kernel(__global int* res)
3924 if (enq_res != CLK_SUCCESS ) { res [tid ] = -1 ; return ; }
4025}
4126
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 )
4328{
4429 float4 color ;
4530 int4 coord ;
4631 buffer [0 ] = scalar ;
4732 coord .x = scalar ;
4833 coord .y = 0 ;
4934 coord .z = 0 ;
50-
35+
5136 int width = get_image_width ( img );
5237 int heigth = get_image_height ( img );
5338 int depth = get_image_depth ( img );
@@ -67,7 +52,7 @@ void block_reflection(size_t scalar, __global uint* buffer, read_only image3d_t
6752 color = read_imagef ( img , samplerA , coord );
6853
6954 buffer [7 ] = (uint )color .y ;
70-
55+
7156 queue_t def_q = get_default_queue ();
7257 ndrange_t ndrange = ndrange_1D (1 );
7358 if ( scalar > 2 ){
@@ -76,7 +61,7 @@ void block_reflection(size_t scalar, __global uint* buffer, read_only image3d_t
7661 }
7762}
7863
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 )
8065{
8166 size_t tid = get_global_id (0 );
8267
0 commit comments