/frameworks/native/libs/math/tests/ |
D | half_test.cpp | 35 EXPECT_EQ(2UL, sizeof(half)); in TEST_F() 38 EXPECT_EQ(0x0000, half( 0.0f).getBits()); in TEST_F() 39 EXPECT_EQ(0x8000, half(-0.0f).getBits()); in TEST_F() 42 EXPECT_EQ(0x7e00, half(NAN).getBits()); in TEST_F() 45 EXPECT_EQ(0x7C00, half( std::numeric_limits<float>::infinity()).getBits()); in TEST_F() 46 EXPECT_EQ(0xFC00, half(-std::numeric_limits<float>::infinity()).getBits()); in TEST_F() 49 EXPECT_EQ(0x3C01, half(1.0009765625).getBits()); in TEST_F() 50 EXPECT_EQ(0xC000, half(-2).getBits()); in TEST_F() 51 EXPECT_EQ(0x0400, half(6.10352e-5).getBits()); in TEST_F() 52 EXPECT_EQ(0x7BFF, half(65504).getBits()); in TEST_F() [all …]
|
/frameworks/native/libs/math/include/math/ |
D | half.h | 57 class half { 85 CONSTEXPR half(float v) noexcept : mBits(ftoh(v)) { } in half() function 93 friend class std::numeric_limits<half>; 94 friend CONSTEXPR half operator"" _hf(long double v); 97 explicit constexpr half(Binary, uint16_t bits) noexcept : mBits(bits) { } in half() function 103 inline CONSTEXPR half::fp16 half::ftoh(float v) noexcept { in ftoh() 131 inline CONSTEXPR float half::htof(half::fp16 in) noexcept { in htof() 153 inline CONSTEXPR android::half operator"" _hf(long double v) { 154 return android::half(android::half::binary, android::half::ftoh(static_cast<float>(v)).bits); 161 template<> struct is_floating_point<android::half> : public std::true_type {}; [all …]
|
/frameworks/compile/slang/tests/P_export_types/ |
D | export_types.rscript | 4 half h = (half) 1.2f; 5 half2 h2 = {(half) 1.2f, (half) 2.3f}; 6 half3 h3 = {(half) 1.2f, (half) 2.3f, (half) 3.4f}; 7 half4 h4 = {(half) 1.2f, (half) 2.3f, (half) 3.4f, (half) 4.5f};
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | BitmapsRectActivity.java | 57 final float half = mBitmap1.getHeight() / 2.0f; in BitmapsView() local 58 mSrcRect = new Rect((int) fourth, (int) (half - half / 2.0f), in BitmapsView() 59 (int) (fourth + fourth), (int) (half + half / 2.0f)); in BitmapsView() 60 mDstRect = new RectF(fourth, half - half / 2.0f, fourth + fourth, half + half / 2.0f); in BitmapsView() 61 mDstRect2 = new RectF(fourth, half - half / 2.0f, in BitmapsView() 62 (fourth + fourth) * 3.0f, (half + half / 2.0f) * 3.0f); in BitmapsView()
|
/frameworks/rs/driver/runtime/ |
D | rs_f16_math.c | 21 extern half __attribute__((overloadable)) copysign(half x, half y) { in copysign() 31 extern half __attribute__((overloadable)) frexp(half x, int *eptr) { in frexp() 33 static const half two12 = 4096; in frexp() 58 extern int __attribute__((overloadable)) ilogb(half x) { in ilogb() 82 extern half __attribute__((overloadable)) modf(half x, half *iptr) { in modf() 117 extern half __attribute__((overloadable)) nextafter(half x, half y) { in nextafter()
|
D | rs_cl.c | 1690 extern half __attribute__((overloadable)) fn(half h) { \ 1691 return (half) fn((float) h); \ 1708 extern half __attribute__((overloadable)) fn(half h1, half h2) { \ 1709 return (half) fn((float) h1, (float) h2); \ 1729 extern half2 __attribute__((overloadable)) fn(half2 v1, half v2) { \ 1732 extern half3 __attribute__((overloadable)) fn(half3 v1, half v2) { \ 1735 extern half4 __attribute__((overloadable)) fn(half4 v1, half v2) { \ 1744 extern half __attribute__((overloadable)) fn(half h1, half h2, half h3) { \ 1745 return (half) fn((float) h1, (float) h2, (float) h3); \ 1769 extern half __attribute__((overloadable)) fn(half h1, int v) { \ [all …]
|
D | rs_convert.c | 41 CVT_FUNC_2(type, half) \ 53 CVT_FUNC(half)
|
/frameworks/rs/tests/java_api/RSUnitTests/src/com/android/rs/unittest/ |
D | math_fp16.rscript | 19 static volatile half h1; 78 h1 = fn(h1, (half *) &h1); \ 275 half hval; 279 /* half h = unsigned short s; */ 290 half out = frexp(((half) inp), &exp); \ 291 _RS_ASSERT_EQU(out, ((half) ref)); \ 312 half intPart[3]; \ 313 intPart[0] = (half) 42.0f; \ 314 intPart[2] = (half) 3.14f; \ 315 half out = modf(((half) inp), &intPart[1]); \ [all …]
|
D | rsdebug_24.rscript | 25 // http://b/27526302 - globals of half type cannot be exported and fail compilation 26 half halfTest = (half) 1.5f; 27 half2 half2Test = {(half) 1.5f, (half) 2.5f}; 28 half3 half3Test = {(half) 1.5f, (half) 2.5f, (half) 3.5f}; 29 half4 half4Test = {(half) 0.f, (half) -0.f, (half) 1.f/0.f, (half) 0.f/0.f};
|
D | fp16.rscript | 22 static half gStart = 12.0f; 23 static half gIncr = 0.125; 28 static half ElementAt_half(int x, int y, int z) { 33 half r = gStart + x + y * gDimX + z * gDimX * gDimY; 39 half r = gStart + x + y * gDimX + z * gDimX * gDimY; 45 half r = gStart + x + y * gDimX + z * gDimX * gDimY; 50 static void compare_half(half x, half y) { 53 rsDebug("Different half values: ", x, y); 61 rsDebug("Different half vectors v1: ", x.r, x.g); 71 rsDebug("Different half vectors v1: ", x.r, x.g, x.b); [all …]
|
D | fp16_globals.rscript | 19 half gHalf; 26 void validateHalf(half h) { 48 void test(half h, half2 h2, half3 h3, half4 h4) {
|
/frameworks/rs/tests/java_api/RSUnitTests/supportlibsrc_gen/com/android/rs/unittest/ |
D | rsdebug_24.rscript | 27 // http://b/27526302 - globals of half type cannot be exported and fail compilation 28 half halfTest = (half) 1.5f; 29 half2 half2Test = {(half) 1.5f, (half) 2.5f}; 30 half3 half3Test = {(half) 1.5f, (half) 2.5f, (half) 3.5f}; 31 half4 half4Test = {(half) 0.f, (half) -0.f, (half) 1.f/0.f, (half) 0.f/0.f};
|
/frameworks/rs/script_api/include/ |
D | rs_vector_math.rsh | 82 extern half __attribute__((const, overloadable)) 83 distance(half left_vector, half right_vector); 87 extern half __attribute__((const, overloadable)) 92 extern half __attribute__((const, overloadable)) 97 extern half __attribute__((const, overloadable)) 119 extern half __attribute__((const, overloadable)) 120 dot(half left_vector, half right_vector); 124 extern half __attribute__((const, overloadable)) 129 extern half __attribute__((const, overloadable)) 134 extern half __attribute__((const, overloadable)) [all …]
|
D | rs_math.rsh | 219 extern half __attribute__((const, overloadable)) 220 acos(half v); 258 extern half __attribute__((const, overloadable)) 259 acosh(half v); 299 extern half __attribute__((const, overloadable)) 300 acospi(half v); 338 extern half __attribute__((const, overloadable)) 339 asin(half v); 377 extern half __attribute__((const, overloadable)) 378 asinh(half v); [all …]
|
D | rs_value_types.rsh | 29 * Floating point: half float double 95 * half: 16 bit floating point value 100 typedef __fp16 half; 106 * Vector version of the half float type. Provides two half fields packed 110 typedef half __attribute__((ext_vector_type(2))) half2; 116 * Vector version of the half float type. Provides three half fields packed 120 typedef half __attribute__((ext_vector_type(3))) half3; 126 * Vector version of the half float type. Provides four half fields packed 130 typedef half __attribute__((ext_vector_type(4))) half4;
|
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/ |
D | threshold_half.rscript | 31 static half gaussian[MAX_RADIUS * 2 + 1]; 37 half e = 2.718281828459045f; 38 half pi = 3.1415926535897932f; 48 half sigma = 0.4f * (half)radius + 0.6f; 54 half coeff1 = 1.0f / (sqrt( 2.0f * pi ) * sigma); 55 half coeff2 = - 1.0f / (2.0f * sigma * sigma); 57 half normalizeFactor = 0.0f; 58 half halfR = 0.0f; 60 halfR = (half)r; 68 halfR = (half)r; [all …]
|
/frameworks/compile/slang/lit-tests/padding/ |
D | more_structs.rscript | 8 …%struct.five_struct{{(\.[0-9]+)?}} = type { i8, [7 x i8], i64, i16, [6 x i8], i64, half, [6 x i8] } 20 // CHECK-LL: define void @.helper_check_five_struct({ i8, [7 x i8], i64, i16, [6 x i8], i64, half, … 21 …nds { i8, [7 x i8], i64, i16, [6 x i8], i64, half, [6 x i8] }, { i8, [7 x i8], i64, i16, [6 x i8],… 23 …nds { i8, [7 x i8], i64, i16, [6 x i8], i64, half, [6 x i8] }, { i8, [7 x i8], i64, i16, [6 x i8],… 25 …nds { i8, [7 x i8], i64, i16, [6 x i8], i64, half, [6 x i8] }, { i8, [7 x i8], i64, i16, [6 x i8],… 27 …nds { i8, [7 x i8], i64, i16, [6 x i8], i64, half, [6 x i8] }, { i8, [7 x i8], i64, i16, [6 x i8],… 29 …nds { i8, [7 x i8], i64, i16, [6 x i8], i64, half, [6 x i8] }, { i8, [7 x i8], i64, i16, [6 x i8],… 30 // CHECK-LL: [[F_F5_VAL:%[0-9]+]] = load half, half* [[F_F5_ADDR]] 31 …ve_struct(i8 [[F_F1_VAL]], i64 [[F_F2_VAL]], i16 [[F_F3_VAL]], i64 [[F_F4_VAL]], half [[F_F5_VAL]]) 104 half f5; [all …]
|
/frameworks/ml/nn/common/random/ |
D | random_distributions.h | 37 PHILOX_DEVICE_INLINE Eigen::half Uint16ToHalf(uint16 x); 73 class UniformDistribution<Generator, Eigen::half> { 82 typedef Array<Eigen::half, kResultElementCount> ResultType; 83 typedef Eigen::half ResultElementType; 325 class NormalDistribution<Generator, Eigen::half> { 334 typedef Array<Eigen::half, kResultElementCount> ResultType; 335 typedef Eigen::half ResultElementType; 344 result[i] = Eigen::half(f[0]); in operator() 345 result[i + 1] = Eigen::half(f[1]); in operator() 448 class TruncatedNormalDistribution<SingleSampleGenerator, Eigen::half> { [all …]
|
/frameworks/compile/slang/tests/P_all_api_24/ |
D | all24.rscript | 6502 *(half*)buf32 = acos(*(half*)buf33); 6510 *(half*)buf48 = acosh(*(half*)buf49); 6518 *(half*)buf64 = acospi(*(half*)buf65); 6526 *(half*)buf80 = asin(*(half*)buf81); 6534 *(half*)buf96 = asinh(*(half*)buf97); 6542 *(half*)buf112 = asinpi(*(half*)buf113); 6550 *(half*)buf128 = atan(*(half*)buf129); 6558 *(half*)buf148 = atan2(*(half*)buf149, *(half*)buf150); 6566 *(half*)buf172 = atan2pi(*(half*)buf173, *(half*)buf174); 6574 *(half*)buf192 = atanh(*(half*)buf193); [all …]
|
/frameworks/ml/nn/ |
D | Android.bp | 22 "-Xclang", "-fnative-half-type", 23 "-Xclang", "-fallow-half-arguments-and-returns" ], 27 "-Xclang", "-fnative-half-type", 28 "-Xclang", "-fallow-half-arguments-and-returns" ],
|
/frameworks/native/libs/renderengine/include/renderengine/ |
D | LayerSettings.h | 108 half alpha = half(0.0);
|
/frameworks/wilhelm/tests/sandbox/ |
D | intbufq.c | 66 frame_t half[HALF_FRAMES]; variable 165 half[i].left = sine[i].left; in main() 166 half[i].right = sawtooth[i].right / 2; in main() 197 buffer = half; in main() 198 size = sizeof(half); in main()
|
/frameworks/native/libs/renderengine/tests/ |
D | RenderEngineTest.cpp | 148 void fillBuffer(half r, half g, half b, half a); 240 static void fillColor(renderengine::LayerSettings& layer, half r, half g, half b, in fillColor() 268 static void fillColor(renderengine::LayerSettings& layer, half r, half g, half b, in fillColor() 299 void RenderEngineTest::fillBuffer(half r, half g, half b, half a) { in fillBuffer()
|
/frameworks/rs/tests/cpp_api/cppf16/ |
D | compute.cpp | 34 sp<const Element> half = Element::F16(rs); in main() local 40 testAllocationCreation(rs, half, nDims); in main()
|
/frameworks/rs/driver/runtime/ll32/ |
D | allocation.ll | 657 !61 = !{!"half", !15} 658 define void @rsSetElementAtImpl_half([1 x i32] %a.coerce, half %val, i32 %x, i32 %y, i32 %z) #1 { 660 %2 = bitcast i8* %1 to half* 661 store half %val, half* %2, align 2, !tbaa !61 665 define half @rsGetElementAtImpl_half([1 x i32] %a.coerce, i32 %x, i32 %y, i32 %z) #0 { 667 %2 = bitcast i8* %1 to half* 668 %3 = load half, half* %2, align 2, !tbaa !61 669 ret half %3 673 define void @rsSetElementAtImpl_half2([1 x i32] %a.coerce, <2 x half> %val, i32 %x, i32 %y, i32 %z)… 675 %2 = bitcast i8* %1 to <2 x half>* [all …]
|