/*!
[config]
name: Vector store_half global float2,3,4,8,16
clc_version_min: 11

dimensions: 1
global_size: 1 0 0

[test]
name: vector store_half global float
kernel_name: vstore_half_global
arg_out: 0 buffer half[3] 0 68 0xdeadp1
arg_in: 0 buffer half[3] 0 0  0xdeadp1
arg_in:  1 buffer float[1] 68

[test]
name: vector store_half global offset float
kernel_name: vstore_half_global_offset
arg_out: 0 buffer half[4] 0  68  68 0xdeadp1
arg_in: 0 buffer half[4] 0 0 0  0xdeadp1
arg_in: 1 buffer float[1] 68

[test]
name: vector store_half global float2
kernel_name: vstore_half2_global
arg_out: 0 buffer half[4] 0 28 46 0xdeadp1
arg_in: 0 buffer half[4] 0 0 0  0xdeadp1
arg_in:  1 buffer float2[1] 28 46

[test]
name: vector store_half global offset float2
kernel_name: vstore_half2_global_offset
arg_out: 0 buffer half[6] 0  28 46  28 46 0xdeadp1
arg_in: 0 buffer half[6] 0 0 0 0 0  0xdeadp1
arg_in: 1 buffer float2[1] 28 46

[test]
name: vector store_half global float3
kernel_name: vstore_half3_global
arg_out: 0 buffer half[5] 0 121 66 189 0xdeadp1
arg_in: 0 buffer half[5] 0 0 0 0  0xdeadp1
arg_in:  1 buffer float3[1] 121 66 189

[test]
name: vector store_half global offset float3
kernel_name: vstore_half3_global_offset
arg_out: 0 buffer half[8] 0  121 66 189  121 66 189 0xdeadp1
arg_in: 0 buffer half[8] 0 0 0 0 0 0 0  0xdeadp1
arg_in: 1 buffer float3[1] 121 66 189

[test]
name: vector store_half global float4
kernel_name: vstore_half4_global
arg_out: 0 buffer half[6] 0 120 155 52 202 0xdeadp1
arg_in: 0 buffer half[6] 0 0 0 0 0  0xdeadp1
arg_in:  1 buffer float4[1] 120 155 52 202

[test]
name: vector store_half global offset float4
kernel_name: vstore_half4_global_offset
arg_out: 0 buffer half[10] 0  120 155 52 202  120 155 52 202 0xdeadp1
arg_in: 0 buffer half[10] 0 0 0 0 0 0 0 0 0  0xdeadp1
arg_in: 1 buffer float4[1] 120 155 52 202

[test]
name: vector store_half global float8
kernel_name: vstore_half8_global
arg_out: 0 buffer half[10] 0 116 189 192 64 98 22 43 70 0xdeadp1
arg_in: 0 buffer half[10] 0 0 0 0 0 0 0 0 0  0xdeadp1
arg_in:  1 buffer float8[1] 116 189 192 64 98 22 43 70

[test]
name: vector store_half global offset float8
kernel_name: vstore_half8_global_offset
arg_out: 0 buffer half[18] 0  116 189 192 64 98 22 43 70  116 189 192 64 98 22 43 70 0xdeadp1
arg_in: 0 buffer half[18] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  0xdeadp1
arg_in: 1 buffer float8[1] 116 189 192 64 98 22 43 70

[test]
name: vector store_half global float16
kernel_name: vstore_half16_global
arg_out: 0 buffer half[18] 0 185 240 246 145 213 116 228 2 209 132 121 113 5 151 154 171 0xdeadp1
arg_in: 0 buffer half[18] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  0xdeadp1
arg_in:  1 buffer float16[1] 185 240 246 145 213 116 228 2 209 132 121 113 5 151 154 171

[test]
name: vector store_half global offset float16
kernel_name: vstore_half16_global_offset
arg_out: 0 buffer half[34] 0  185 240 246 145 213 116 228 2 209 132 121 113 5 151 154 171  185 240 246 145 213 116 228 2 209 132 121 113 5 151 154 171 0xdeadp1
arg_in: 0 buffer half[34] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  0xdeadp1
arg_in: 1 buffer float16[1] 185 240 246 145 213 116 228 2 209 132 121 113 5 151 154 171

!*/

kernel void vstore_half_global(global half *out,
                             global float *in) {
    float tmp = in[0];
    vstore_half(tmp, 0, out + 1);
}

kernel void vstore_half_global_offset(global half *out,
                                    global float *in) {
    float tmp = in[0];
    vstore_half(tmp, 0, out + 1);
    vstore_half(tmp, 1, out + 1);
}

kernel void vstore_half2_global(global half *out,
                             global float2 *in) {
    float2 tmp = in[0];
    vstore_half2(tmp, 0, out + 1);
}

kernel void vstore_half2_global_offset(global half *out,
                                    global float2 *in) {
    float2 tmp = in[0];
    vstore_half2(tmp, 0, out + 1);
    vstore_half2(tmp, 1, out + 1);
}

kernel void vstore_half3_global(global half *out,
                             global float3 *in) {
    float3 tmp = in[0];
    vstore_half3(tmp, 0, out + 1);
}

kernel void vstore_half3_global_offset(global half *out,
                                    global float3 *in) {
    float3 tmp = in[0];
    vstore_half3(tmp, 0, out + 1);
    vstore_half3(tmp, 1, out + 1);
}

kernel void vstore_half4_global(global half *out,
                             global float4 *in) {
    float4 tmp = in[0];
    vstore_half4(tmp, 0, out + 1);
}

kernel void vstore_half4_global_offset(global half *out,
                                    global float4 *in) {
    float4 tmp = in[0];
    vstore_half4(tmp, 0, out + 1);
    vstore_half4(tmp, 1, out + 1);
}

kernel void vstore_half8_global(global half *out,
                             global float8 *in) {
    float8 tmp = in[0];
    vstore_half8(tmp, 0, out + 1);
}

kernel void vstore_half8_global_offset(global half *out,
                                    global float8 *in) {
    float8 tmp = in[0];
    vstore_half8(tmp, 0, out + 1);
    vstore_half8(tmp, 1, out + 1);
}

kernel void vstore_half16_global(global half *out,
                             global float16 *in) {
    float16 tmp = in[0];
    vstore_half16(tmp, 0, out + 1);
}

kernel void vstore_half16_global_offset(global half *out,
                                    global float16 *in) {
    float16 tmp = in[0];
    vstore_half16(tmp, 0, out + 1);
    vstore_half16(tmp, 1, out + 1);
}
