3 name: convert_long(float)
9 name: convert_long(float)
10 kernel_name: test_long
11 arg_out: 0 buffer long[8] 0 36864 -47104 41943040 -35651584 131 5000000000 -6000000000
12 # These values were chosen to exercise all code paths in the generic
13 # implementation of __fixsfdi in compiler-rt:
14 # https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/fixsfdi.c
15 arg_in: 1 buffer float[8] 0x1.2p-5 \ # exp < 0
16 0x1.2p+15 \ # pos exp <= 23
17 -0x1.7p+15 \ # neg exp <= 23
18 0x1.4p25 \ # pos exp > 23
19 -0x1.1p25 \ # neg exp > 23
20 131.35 \ # Random non-integer value
21 5000000000.0 \ # Positive value requiring more than 32-bits
22 -6000000000.0 # Negative value requiring more than 32-bits
25 name: convert_ulong(float)
26 kernel_name: test_ulong
27 arg_out: 0 buffer ulong[8] 0 36864 47104 41943040 35651584 131 5000000000 9223372036854775808
28 # These values were chosen to exercise all code paths in the generic
29 # implementation of __fixsfdi in compiler-rt:
30 # https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/fixsfdi.c
31 arg_in: 1 buffer float[8] 0x1.2p-5 \ # exp < 0
32 0x1.2p+15 \ # pos exp <= 23
33 0x1.7p+15 \ # pos exp <= 23
34 0x1.4p25 \ # pos exp > 23
35 0x1.1p25 \ # pos exp > 23
36 131.35 \ # Random non-integer value
37 5000000000.0 \ # Positive value requiring more than 32-bits
38 9223372036854775808.0 # Positive value requiring 64-bits
42 kernel void test_long(global long *out, global float *in) {
44 for (i = 0; i < 8; i++) {
45 out[i] = convert_long(in[i]);
49 kernel void test_ulong(global ulong *out, global float *in) {
51 for (i = 0; i < 8; i++) {
52 out[i] = convert_ulong(in[i]);