/external/eigen/test/ |
D | half_float.cpp | 16 struct half; 19 using Eigen::half; 26 VERIFY_IS_EQUAL(half(1.0f).x, 0x3c00); in test_conversion() 27 VERIFY_IS_EQUAL(half(0.5f).x, 0x3800); in test_conversion() 28 VERIFY_IS_EQUAL(half(0.33333f).x, 0x3555); in test_conversion() 29 VERIFY_IS_EQUAL(half(0.0f).x, 0x0000); in test_conversion() 30 VERIFY_IS_EQUAL(half(-0.0f).x, 0x8000); in test_conversion() 31 VERIFY_IS_EQUAL(half(65504.0f).x, 0x7bff); in test_conversion() 32 VERIFY_IS_EQUAL(half(65536.0f).x, 0x7c00); // Becomes infinity. in test_conversion() 35 VERIFY_IS_EQUAL(half(-5.96046e-08f).x, 0x8001); in test_conversion() [all …]
|
/external/llvm/test/CodeGen/AArch64/ |
D | fp16-vector-load-store.ll | 4 define <4 x half> @load_64(<4 x half>* nocapture readonly %a) #0 { 8 %0 = load <4 x half>, <4 x half>* %a, align 8 9 ret <4 x half> %0 13 define <8 x half> @load_128(<8 x half>* nocapture readonly %a) #0 { 17 %0 = load <8 x half>, <8 x half>* %a, align 16 18 ret <8 x half> %0 22 define <4 x half> @load_dup_64(half* nocapture readonly %a) #0 { 26 %0 = load half, half* %a, align 2 27 %1 = insertelement <4 x half> undef, half %0, i32 0 28 %2 = shufflevector <4 x half> %1, <4 x half> undef, <4 x i32> zeroinitializer [all …]
|
D | fp16-vector-shuffle.ll | 4 define <4 x half> @select_64(<4 x half> %a, <4 x half> %b, <4 x i16> %c) #0 { 8 %0 = bitcast <4 x half> %a to <4 x i16> 9 %1 = bitcast <4 x half> %b to <4 x i16> 14 %3 = bitcast <4 x i16> %vbsl5.i to <4 x half> 15 ret <4 x half> %3 19 define <8 x half> @select_128(<8 x half> %a, <8 x half> %b, <8 x i16> %c) #0 { 23 %0 = bitcast <8 x half> %a to <8 x i16> 24 %1 = bitcast <8 x half> %b to <8 x i16> 29 %3 = bitcast <8 x i16> %vbsl5.i to <8 x half> 30 ret <8 x half> %3 [all …]
|
D | f16-instructions.ll | 11 define half @test_fadd(half %a, half %b) #0 { 12 %r = fadd half %a, %b 13 ret half %r 22 define half @test_fsub(half %a, half %b) #0 { 23 %r = fsub half %a, %b 24 ret half %r 33 define half @test_fmul(half %a, half %b) #0 { 34 %r = fmul half %a, %b 35 ret half %r 44 define half @test_fdiv(half %a, half %b) #0 { [all …]
|
D | fp16-vector-nvcast.ll | 4 define void @nvcast_v2i32(<4 x half>* %a) #0 { 9 store volatile <4 x half> <half 0xH0000, half 0xH00AB, half 0xH0000, half 0xH00AB>, <4 x half>* %a 15 define void @nvcast_v4i16(<4 x half>* %a) #0 { 20 store volatile <4 x half> <half 0xH00AB, half 0xH00AB, half 0xH00AB, half 0xH00AB>, <4 x half>* %a 26 define void @nvcast_v8i8(<4 x half>* %a) #0 { 31 store volatile <4 x half> <half 0xHABAB, half 0xHABAB, half 0xHABAB, half 0xHABAB>, <4 x half>* %a 37 define void @nvcast_f64(<4 x half>* %a) #0 { 42 store volatile <4 x half> zeroinitializer, <4 x half>* %a 47 define void @nvcast_v4i32(<8 x half>* %a) #0 { 52 …latile <8 x half> <half 0xH0000, half 0xH00AB, half 0xH0000, half 0xH00AB, half 0xH0000, half 0xH0… [all …]
|
D | half.ll | 3 define void @test_load_store(half* %in, half* %out) { 7 %val = load half, half* %in 8 store half %val, half* %out 12 define i16 @test_bitcast_from_half(half* %addr) { 15 %val = load half, half* %addr 16 %val_int = bitcast half %val to i16 20 define i16 @test_reg_bitcast_from_half(half %in) { 26 %val = bitcast half %in to i16 30 define void @test_bitcast_to_half(half* %addr, i16 %in) { 33 %val_fp = bitcast i16 %in to half [all …]
|
D | fp16-vector-bitcast.ll | 3 define <4 x i16> @v4f16_to_v4i16(float, <4 x half> %a) #0 { 7 %1 = bitcast <4 x half> %a to <4 x i16> 11 define <2 x i32> @v4f16_to_v2i32(float, <4 x half> %a) #0 { 15 %1 = bitcast <4 x half> %a to <2 x i32> 19 define <1 x i64> @v4f16_to_v1i64(float, <4 x half> %a) #0 { 23 %1 = bitcast <4 x half> %a to <1 x i64> 27 define i64 @v4f16_to_i64(float, <4 x half> %a) #0 { 31 %1 = bitcast <4 x half> %a to i64 35 define <2 x float> @v4f16_to_v2float(float, <4 x half> %a) #0 { 39 %1 = bitcast <4 x half> %a to <2 x float> [all …]
|
D | fp16-v4-instructions.ll | 3 define <4 x half> @add_h(<4 x half> %a, <4 x half> %b) { 10 %0 = fadd <4 x half> %a, %b 11 ret <4 x half> %0 15 define <4 x half> @build_h4(<4 x half> %a) { 20 ret <4 x half> <half 0xH3CCD, half 0xH3CCD, half 0xH3CCD, half 0xH3CCD> 24 define <4 x half> @sub_h(<4 x half> %a, <4 x half> %b) { 31 %0 = fsub <4 x half> %a, %b 32 ret <4 x half> %0 36 define <4 x half> @mul_h(<4 x half> %a, <4 x half> %b) { 43 %0 = fmul <4 x half> %a, %b [all …]
|
D | fp16-v8-instructions.ll | 3 define <8 x half> @add_h(<8 x half> %a, <8 x half> %b) { 38 %0 = fadd <8 x half> %a, %b 39 ret <8 x half> %0 43 define <8 x half> @sub_h(<8 x half> %a, <8 x half> %b) { 78 %0 = fsub <8 x half> %a, %b 79 ret <8 x half> %0 83 define <8 x half> @mul_h(<8 x half> %a, <8 x half> %b) { 118 %0 = fmul <8 x half> %a, %b 119 ret <8 x half> %0 123 define <8 x half> @div_h(<8 x half> %a, <8 x half> %b) { [all …]
|
D | arm64-fast-isel-conversion-fallback.ll | 4 define i32 @fptosi_wh(half %a) nounwind ssp { 10 %conv = fptosi half %a to i32 15 define i32 @fptoui_swh(half %a) nounwind ssp { 21 %conv = fptoui half %a to i32 26 define half @sitofp_hw_i1(i1 %a) nounwind ssp { 32 %conv = sitofp i1 %a to half 33 ret half %conv 37 define half @sitofp_hw_i8(i8 %a) nounwind ssp { 43 %conv = sitofp i8 %a to half 44 ret half %conv [all …]
|
/external/eigen/Eigen/src/Core/arch/CUDA/ |
D | Half.h | 48 struct half; 76 struct half : public half_impl::half_base { struct 81 EIGEN_DEVICE_FUNC half() {} in half() function 83 EIGEN_DEVICE_FUNC half(const __half& h) : half_impl::half_base(h) {} in half() function 84 EIGEN_DEVICE_FUNC half(const half& h) : half_impl::half_base(h) {} in half() argument 86 explicit EIGEN_DEVICE_FUNC half(bool b) in half() function 89 explicit EIGEN_DEVICE_FUNC half(const T& val) in half() argument 91 explicit EIGEN_DEVICE_FUNC half(float f) in half() argument 135 EIGEN_DEVICE_FUNC half& operator=(const half& other) { argument 150 __device__ half operator + (const half& a, const half& b) { [all …]
|
D | TypeCasting.h | 18 struct scalar_cast_op<float, Eigen::half> { 20 typedef Eigen::half result_type; 21 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half operator() (const float& a) const { 25 return Eigen::half(a); 31 struct functor_traits<scalar_cast_op<float, Eigen::half> > 36 struct scalar_cast_op<int, Eigen::half> { 38 typedef Eigen::half result_type; 39 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half operator() (const int& a) const { 43 return Eigen::half(static_cast<float>(a)); 49 struct functor_traits<scalar_cast_op<int, Eigen::half> > [all …]
|
/external/llvm/test/CodeGen/ARM/ |
D | fp16-promote.ll | 17 define void @test_fadd(half* %p, half* %q) #0 { 18 %a = load half, half* %p, align 2 19 %b = load half, half* %q, align 2 20 %r = fadd half %a, %b 21 store half %r, half* %p 34 define void @test_fsub(half* %p, half* %q) #0 { 35 %a = load half, half* %p, align 2 36 %b = load half, half* %q, align 2 37 %r = fsub half %a, %b 38 store half %r, half* %p [all …]
|
D | half.ll | 5 define void @test_load_store(half* %in, half* %out) { 9 %val = load half, half* %in 10 store half %val, half* %out 14 define i16 @test_bitcast_from_half(half* %addr) { 17 %val = load half, half* %addr 18 %val_int = bitcast half %val to i16 22 define void @test_bitcast_to_half(half* %addr, i16 %in) { 25 %val_fp = bitcast i16 %in to half 26 store half %val_fp, half* %addr 30 define float @test_extend32(half* %addr) { [all …]
|
/external/eigen/unsupported/Eigen/src/SpecialFunctions/ |
D | SpecialFunctionsHalf.h | 15 template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half lgamma(const Eigen::half& a) { in lgamma() 16 return Eigen::half(Eigen::numext::lgamma(static_cast<float>(a))); in lgamma() 18 template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half digamma(const Eigen::half& a) { in digamma() 19 return Eigen::half(Eigen::numext::digamma(static_cast<float>(a))); in digamma() 21 …late<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half zeta(const Eigen::half& x, const Eigen::h… in zeta() 22 return Eigen::half(Eigen::numext::zeta(static_cast<float>(x), static_cast<float>(q))); in zeta() 24 …e<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half polygamma(const Eigen::half& n, const Eigen:… in polygamma() 25 return Eigen::half(Eigen::numext::polygamma(static_cast<float>(n), static_cast<float>(x))); in polygamma() 27 template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half erf(const Eigen::half& a) { in erf() 28 return Eigen::half(Eigen::numext::erf(static_cast<float>(a))); in erf() [all …]
|
/external/llvm/test/CodeGen/AMDGPU/ |
D | half.ll | 4 ; half args should be promoted to float 10 define void @load_f16_arg(half addrspace(1)* %out, half %arg) #0 { 11 store half %arg, half addrspace(1)* %out 22 define void @load_v2f16_arg(<2 x half> addrspace(1)* %out, <2 x half> %arg) #0 { 23 store <2 x half> %arg, <2 x half> addrspace(1)* %out 36 define void @load_v3f16_arg(<3 x half> addrspace(1)* %out, <3 x half> %arg) #0 { 37 store <3 x half> %arg, <3 x half> addrspace(1)* %out 48 define void @load_v4f16_arg(<4 x half> addrspace(1)* %out, <4 x half> %arg) #0 { 49 store <4 x half> %arg, <4 x half> addrspace(1)* %out 54 define void @load_v8f16_arg(<8 x half> addrspace(1)* %out, <8 x half> %arg) #0 { [all …]
|
D | trunc-store-f64-to-f16.ll | 6 define void @global_truncstore_f64_to_f16(half addrspace(1)* %out, double addrspace(1)* %in) #0 { 8 %cvt = fptrunc double %val to half 9 store half %cvt, half addrspace(1)* %out 15 define void @global_truncstore_v2f64_to_v2f16(<2 x half> addrspace(1)* %out, <2 x double> addrspace… 17 %cvt = fptrunc <2 x double> %val to <2 x half> 18 store <2 x half> %cvt, <2 x half> addrspace(1)* %out 24 define void @global_truncstore_v3f64_to_v3f16(<3 x half> addrspace(1)* %out, <3 x double> addrspace… 26 %cvt = fptrunc <3 x double> %val to <3 x half> 27 store <3 x half> %cvt, <3 x half> addrspace(1)* %out 33 define void @global_truncstore_v4f64_to_v4f16(<4 x half> addrspace(1)* %out, <4 x double> addrspace… [all …]
|
/external/clang/test/SemaOpenCL/ |
D | half.cl | 4 constant float f = 1.0h; // expected-error{{half precision constant requires cl_khr_fp16}} 6 half half_disabled(half *p, // expected-error{{declaring function return value of type 'half' is no… 7 … half h) // expected-error{{declaring function parameter of type 'half' is not allowed}} 9 half a[2]; // expected-error{{declaring variable of type 'half [2]' is not allowed}} 10 half b; // expected-error{{declaring variable of type 'half' is not allowed}} 11 *p; // expected-error{{loading directly from pointer to type 'half' is not allowed}} 12 p[1]; // expected-error{{loading directly from pointer to type 'half' is not allowed}} 15 b = (half) c; // expected-error{{casting to type 'half' is not allowed}} 16 c = (float) 1.0h; // expected-error{{half precision constant requires cl_khr_fp16}} 17 b = 1.0h; // expected-error{{half precision constant requires cl_khr_fp16}} [all …]
|
/external/llvm/test/CodeGen/Mips/ |
D | fp16-promote.ll | 8 define void @test_fadd(half* %p, half* %q) #0 { 9 %a = load half, half* %p, align 2 10 %b = load half, half* %q, align 2 11 %r = fadd half %a, %b 12 store half %r, half* %p 18 define float @test_fpext_float(half* %p) { 19 %a = load half, half* %p, align 2 20 %r = fpext half %a to float 27 define double @test_fpext_double(half* %p) { 28 %a = load half, half* %p, align 2 [all …]
|
/external/llvm/test/Transforms/Reassociate/ |
D | reassoc-intermediate-fnegs.ll | 3 ; CHECK: [[TMP1:%.*]] = fsub fast half 0xH8000, %a 4 ; CHECK: [[TMP2:%.*]] = fadd fast half %b, [[TMP1]] 5 ; CHECK: fmul fast half [[TMP2]], 0xH4500 8 define half @faddsubAssoc1(half %a, half %b) { 9 %tmp1 = fmul fast half %b, 0xH4200 ; 3*b 10 %tmp2 = fmul fast half %a, 0xH4500 ; 5*a 11 %tmp3 = fmul fast half %b, 0xH4000 ; 2*b 12 %tmp4 = fsub fast half %tmp2, %tmp1 ; 5 * a - 3 * b 13 %tmp5 = fsub fast half %tmp3, %tmp4 ; 2 * b - ( 5 * a - 3 * b) 14 ret half %tmp5 ; = 5 * (b - a) [all …]
|
/external/llvm/test/CodeGen/NVPTX/ |
D | half.ll | 3 define void @test_load_store(half addrspace(1)* %in, half addrspace(1)* %out) { 7 %val = load half, half addrspace(1)* %in 8 store half %val, half addrspace(1) * %out 12 define void @test_bitcast_from_half(half addrspace(1)* %in, i16 addrspace(1)* %out) { 16 %val = load half, half addrspace(1) * %in 17 %val_int = bitcast half %val to i16 22 define void @test_bitcast_to_half(half addrspace(1)* %out, i16 addrspace(1)* %in) { 27 %val_fp = bitcast i16 %val to half 28 store half %val_fp, half addrspace(1)* %out 32 define void @test_extend32(half addrspace(1)* %in, float addrspace(1)* %out) { [all …]
|
/external/eigen/unsupported/test/ |
D | cxx11_tensor_of_float16_cuda.cu | 43 …f.device(gpu_device) = gpu_float.cast<Eigen::half>().unaryExpr(Eigen::internal::scalar_isnan_op<Ei… in test_cuda_numext() 71 Eigen::half* d_half = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half)); in test_cuda_conversion() 76 Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_half( in test_cuda_conversion() 82 gpu_half.device(gpu_device) = gpu_float.cast<Eigen::half>(); in test_cuda_conversion() 118 gpu_res_half.device(gpu_device) = gpu_float.cast<Eigen::half>().abs().cast<float>(); in test_cuda_unary() 159 …e(gpu_device) = ((gpu_float1.cast<Eigen::half>() + gpu_float2.cast<Eigen::half>()) * gpu_float1.ca… in test_cuda_elementwise() 169 … VERIFY_IS_APPROX(static_cast<Eigen::half>(full_prec(i)), static_cast<Eigen::half>(half_prec(i))); in test_cuda_elementwise() 187 Eigen::half* d_res1_half = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half)); in test_cuda_trancendental() 188 Eigen::half* d_res1_float = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half)); in test_cuda_trancendental() 189 Eigen::half* d_res2_half = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half)); in test_cuda_trancendental() [all …]
|
/external/libdivsufsort/lib/ |
D | utils.c | 36 saidx_t half, i; in binarysearch_lower() local 37 for(i = 0, half = size >> 1; in binarysearch_lower() 39 size = half, half >>= 1) { in binarysearch_lower() 40 if(A[i + half] < value) { in binarysearch_lower() 41 i += half + 1; in binarysearch_lower() 42 half -= (size & 1) ^ 1; in binarysearch_lower() 263 saidx_t size, lsize, rsize, half; in sa_search() local 275 for(i = j = k = 0, lmatch = rmatch = 0, size = SAsize, half = size >> 1; in sa_search() 277 size = half, half >>= 1) { in sa_search() 279 r = _compare(T, Tsize, P, Psize, SA[i + half], &match); in sa_search() [all …]
|
/external/llvm/test/CodeGen/X86/ |
D | half.ll | 10 define void @test_load_store(half* %in, half* %out) { 15 %val = load half, half* %in 16 store half %val, half* %out 20 define i16 @test_bitcast_from_half(half* %addr) { 24 %val = load half, half* %addr 25 %val_int = bitcast half %val to i16 29 define void @test_bitcast_to_half(half* %addr, i16 %in) { 32 %val_fp = bitcast i16 %in to half 33 store half %val_fp, half* %addr 37 define float @test_extend32(half* %addr) { [all …]
|
/external/llvm/test/Assembler/ |
D | half-constprop.ll | 3 ; Testing half constant propagation. 5 define half @abc() nounwind { 7 %a = alloca half, align 2 8 %b = alloca half, align 2 10 store half 0xH4200, half* %a, align 2 11 store half 0xH4B9A, half* %b, align 2 12 %tmp = load half, half* %a, align 2 13 %tmp1 = load half, half* %b, align 2 14 %add = fadd half %tmp, %tmp1 16 ret half %add
|