/*!
[config]
name: Test ushort clz built-in on CL 1.1
clc_version_min: 10
dimensions: 1

[test]
name: clz ushort1
kernel_name: test_1_clz_ushort
global_size: 5 0 0

arg_out: 0 buffer ushort[5] 15 9 16 0 16  tolerance 0 
arg_in: 1 buffer ushort[5] 1 64 0 65535 0 

[test]
name: clz ushort2
kernel_name: test_2_clz_ushort
global_size: 5 0 0

arg_out: 0 buffer ushort[10] 15 15 9 9 16 16 0 0 16 16  tolerance 0 
arg_in: 1 buffer ushort[10] 1 1 64 64 0 0 65535 65535 0 0 

[test]
name: clz ushort4
kernel_name: test_4_clz_ushort
global_size: 5 0 0

arg_out: 0 buffer ushort[20] 15 15 15 15 9 9 9 9 16 16 16 16 0 0 0 0 16 16 16 16  tolerance 0 
arg_in: 1 buffer ushort[20] 1 1 1 1 64 64 64 64 0 0 0 0 65535 65535 65535 65535 0 0 0 0 

[test]
name: clz ushort8
kernel_name: test_8_clz_ushort
global_size: 5 0 0

arg_out: 0 buffer ushort[40] 15 15 15 15 15 15 15 15 9 9 9 9 9 9 9 9 16 16 16 16 16 16 16 16 0 0 0 0 0 0 0 0 16 16 16 16 16 16 16 16  tolerance 0 
arg_in: 1 buffer ushort[40] 1 1 1 1 1 1 1 1 64 64 64 64 64 64 64 64 0 0 0 0 0 0 0 0 65535 65535 65535 65535 65535 65535 65535 65535 0 0 0 0 0 0 0 0 

[test]
name: clz ushort16
kernel_name: test_16_clz_ushort
global_size: 5 0 0

arg_out: 0 buffer ushort[80] 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16  tolerance 0 
arg_in: 1 buffer ushort[80] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 

!*/

kernel void test_1_clz_ushort(global ushort* out, global ushort* in0){
  out[get_global_id(0)] = clz(in0[get_global_id(0)]);
}

kernel void test_2_clz_ushort(global ushort* out, global ushort* in0){
  vstore2(clz(vload2(get_global_id(0), in0)), get_global_id(0), out);
}

kernel void test_4_clz_ushort(global ushort* out, global ushort* in0){
  vstore4(clz(vload4(get_global_id(0), in0)), get_global_id(0), out);
}

kernel void test_8_clz_ushort(global ushort* out, global ushort* in0){
  vstore8(clz(vload8(get_global_id(0), in0)), get_global_id(0), out);
}

kernel void test_16_clz_ushort(global ushort* out, global ushort* in0){
  vstore16(clz(vload16(get_global_id(0), in0)), get_global_id(0), out);
}

