Home
last modified time | relevance | path

Searched refs:Float16 (Results 1 – 25 of 167) sorted by relevance

1234567

/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/source/util/
Dhex_float.h39 class Float16 {
41 Float16(uint16_t v) : val(v) {} in Float16() function
42 Float16() = default;
43 static bool isNan(const Float16& val) { in isNan()
47 static bool isInfinity(const Float16& val) { in isInfinity()
50 Float16(const Float16& other) { val = other.val; } in Float16() function
54 static Float16 max() { return Float16(0x7bff); } in max()
56 static Float16 lowest() { return Float16(0xfbff); } in lowest()
114 struct FloatProxyTraits<Float16> {
116 static bool isNan(Float16 f) { return Float16::isNan(f); }
[all …]
/third_party/skia/third_party/externals/spirv-tools/source/util/
Dhex_float.h39 class Float16 {
41 Float16(uint16_t v) : val(v) {} in Float16() function
42 Float16() = default;
43 static bool isNan(const Float16& val) { in isNan()
47 static bool isInfinity(const Float16& val) { in isInfinity()
50 Float16(const Float16& other) { val = other.val; } in Float16() function
54 static Float16 max() { return Float16(0x7bff); } in max()
56 static Float16 lowest() { return Float16(0xfbff); } in lowest()
114 struct FloatProxyTraits<Float16> {
116 static bool isNan(Float16 f) { return Float16::isNan(f); }
[all …]
/third_party/vixl/src/
Dutils-vixl.cc36 const Float16 kFP16DefaultNaN = RawbitsToFloat16(0x7e00);
39 const Float16 kFP16PositiveZero = RawbitsToFloat16(0x0);
40 const Float16 kFP16NegativeZero = RawbitsToFloat16(0x8000);
43 const Float16 kFP16PositiveInfinity = RawbitsToFloat16(0x7c00);
44 const Float16 kFP16NegativeInfinity = RawbitsToFloat16(0xfc00);
52 bool IsZero(Float16 value) { in IsZero()
58 uint16_t Float16ToRawbits(Float16 value) { return value.rawbits_; } in Float16ToRawbits()
74 Float16 RawbitsToFloat16(uint16_t bits) { in RawbitsToFloat16()
75 Float16 f; in RawbitsToFloat16()
168 int Float16Classify(Float16 value) { in Float16Classify()
[all …]
Dutils-vixl.h384 class Float16 {
386 explicit Float16(double dvalue);
387 Float16() : rawbits_(0x0) {}
388 friend uint16_t Float16ToRawbits(Float16 value);
389 friend Float16 RawbitsToFloat16(uint16_t bits);
396 uint16_t Float16ToRawbits(Float16 value);
411 Float16 RawbitsToFloat16(uint16_t bits);
442 class SimFloat16 : public Float16 {
447 SimFloat16(double dvalue) : Float16(dvalue) {} // NOLINT(runtime/explicit)
448 SimFloat16(Float16 f) { // NOLINT(runtime/explicit)
[all …]
/third_party/glslang/SPIRV/
Dhex_float.h43 class Float16 {
45 Float16(uint16_t v) : val(v) {} in Float16() function
46 Float16() {} in Float16() function
47 static bool isNan(const Float16& val) { in isNan()
51 static bool isInfinity(const Float16& val) { in isInfinity()
54 Float16(const Float16& other) { val = other.val; } in Float16() function
58 static Float16 max() { return Float16(0x7bff); } in max()
60 static Float16 lowest() { return Float16(0xfbff); } in lowest()
100 struct FloatProxyTraits<Float16> {
102 static bool isNan(Float16 f) { return Float16::isNan(f); }
[all …]
/third_party/spirv-tools/source/util/
Dhex_float.h39 class Float16 {
41 Float16(uint16_t v) : val(v) {} in Float16() function
42 Float16() = default;
43 static bool isNan(const Float16& val) { in isNan()
47 static bool isInfinity(const Float16& val) { in isInfinity()
50 Float16(const Float16& other) { val = other.val; } in Float16() function
54 static Float16 max() { return Float16(0x7bff); } in max()
56 static Float16 lowest() { return Float16(0xfbff); } in lowest()
114 struct FloatProxyTraits<Float16> {
116 static bool isNan(Float16 f) { return Float16::isNan(f); }
[all …]
/third_party/glslang/gtests/
DHexFloat.cpp28 using spvutils::Float16;
545 return spvutils::HexFloat<spvutils::FloatProxy<spvutils::Float16>>(f) in unbiased_half_exponent()
739 using HF16 = spvutils::HexFloat<spvutils::FloatProxy<spvutils::Float16>>; in TEST_P()
808 using HF16 = spvutils::HexFloat<spvutils::FloatProxy<spvutils::Float16>>; in TEST_P()
867 using HF16 = spvutils::HexFloat<spvutils::FloatProxy<spvutils::Float16>>; in TEST_P()
927 using HF16 = spvutils::HexFloat<spvutils::FloatProxy<spvutils::Float16>>; in TEST_P()
972 using HF16 = spvutils::HexFloat<spvutils::FloatProxy<spvutils::Float16>>; in TEST()
1077 ::testing::TestWithParam<FloatParseCase<Float16>>;
1081 HexFloat<FloatProxy<Float16>> parsed_value(0); in TEST_P()
1095 ::testing::ValuesIn(std::vector<FloatParseCase<Float16>>{
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/test/
Dhex_float_test.cpp583 return HexFloat<FloatProxy<Float16>>(f).getUnbiasedNormalizedExponent(); in unbiased_half_exponent()
784 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
853 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
911 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
1027 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
1071 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST()
1175 ::testing::TestWithParam<FloatParseCase<Float16>>;
1179 HexFloat<FloatProxy<Float16>> parsed_value(0); in TEST_P()
1193 ::testing::ValuesIn(std::vector<FloatParseCase<Float16>>{
1195 BadFloatParseCase<Float16>("abc", false, uint16_t{0}),
[all …]
/third_party/skia/third_party/externals/spirv-tools/test/
Dhex_float_test.cpp583 return HexFloat<FloatProxy<Float16>>(f).getUnbiasedNormalizedExponent(); in unbiased_half_exponent()
784 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
853 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
911 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
1027 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
1071 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST()
1175 ::testing::TestWithParam<FloatParseCase<Float16>>;
1179 HexFloat<FloatProxy<Float16>> parsed_value(0); in TEST_P()
1193 ::testing::ValuesIn(std::vector<FloatParseCase<Float16>>{
1195 BadFloatParseCase<Float16>("abc", false, uint16_t{0}),
[all …]
/third_party/spirv-tools/test/
Dhex_float_test.cpp583 return HexFloat<FloatProxy<Float16>>(f).getUnbiasedNormalizedExponent(); in unbiased_half_exponent()
784 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
853 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
911 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
1027 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST_P()
1071 using HF16 = HexFloat<FloatProxy<Float16>>; in TEST()
1175 ::testing::TestWithParam<FloatParseCase<Float16>>;
1179 HexFloat<FloatProxy<Float16>> parsed_value(0); in TEST_P()
1193 ::testing::ValuesIn(std::vector<FloatParseCase<Float16>>{
1195 BadFloatParseCase<Float16>("abc", false, uint16_t{0}),
[all …]
/third_party/vk-gl-cts/modules/gles3/functional/
Des3fShaderPackingFunctionTests.cpp550 *inVal = tcu::Vec2(tcu::Float16(inVal->x()).asFloat(), tcu::Float16(inVal->y()).asFloat()); in iterate()
572 const deUint16 ref0 = (deUint16)tcu::Float16(inputs[valNdx].x()).bits(); in iterate()
573 const deUint16 ref1 = (deUint16)tcu::Float16(inputs[valNdx].y()).bits(); in iterate()
628 inputs.push_back((tcu::Float16( 0.0f).bits() << 16) | tcu::Float16( 1.0f).bits()); in iterate()
629 inputs.push_back((tcu::Float16( 1.0f).bits() << 16) | tcu::Float16( 0.0f).bits()); in iterate()
630 inputs.push_back((tcu::Float16(-1.0f).bits() << 16) | tcu::Float16( 0.5f).bits()); in iterate()
631 inputs.push_back((tcu::Float16( 0.5f).bits() << 16) | tcu::Float16(-0.5f).bits()); in iterate()
647 …const deUint16 value = tcu::Float16::construct(s, exp ? exp : 1 /* avoid denorm */, (deUint16)((1… in iterate()
677 const float ref0 = tcu::Float16(in0).asFloat(); in iterate()
678 const float ref1 = tcu::Float16(in1).asFloat(); in iterate()
/third_party/vk-gl-cts/external/vulkancts/modules/vulkan/shaderexecutor/
DvktShaderPackingFunctionTests.cpp617 *inVal = tcu::Vec2(tcu::Float16(inVal->x()).asFloat(), tcu::Float16(inVal->y()).asFloat()); in iterate()
638 const deUint16 ref0 = (deUint16)tcu::Float16(inputs[valNdx].x()).bits(); in iterate()
639 const deUint16 ref1 = (deUint16)tcu::Float16(inputs[valNdx].y()).bits(); in iterate()
726 inputs.push_back((tcu::Float16( 0.0f).bits() << 16) | tcu::Float16( 1.0f).bits()); in iterate()
727 inputs.push_back((tcu::Float16( 1.0f).bits() << 16) | tcu::Float16( 0.0f).bits()); in iterate()
728 inputs.push_back((tcu::Float16(-1.0f).bits() << 16) | tcu::Float16( 0.5f).bits()); in iterate()
729 inputs.push_back((tcu::Float16( 0.5f).bits() << 16) | tcu::Float16(-0.5f).bits()); in iterate()
731 inputs.push_back((tcu::Float16(composeHalfFloat(POSITIVE, 0u, 1u)).bits() << 16) in iterate()
732 | tcu::Float16(composeHalfFloat(NEGATIVE, 0u, 1u)).bits()); in iterate()
734 …inputs.push_back((tcu::Float16(composeHalfFloat(NEGATIVE, 0u, 1u << (mantBits - 1u))).bits() << 16) in iterate()
[all …]
DvktShaderFConvertTests.cpp158 std::vector<tcu::Float16> getOtherNormals<tcu::Float16> (de::Random&) in getOtherNormals()
161 return std::vector<tcu::Float16>(); in getOtherNormals()
168 return convertVector<tcu::Float16, tcu::Float32>(getRandomNormals<tcu::Float16>(rnd)); in getOtherNormals()
175 auto v1 = convertVector<tcu::Float16, tcu::Float64>(getRandomNormals<tcu::Float16>(rnd)); in getOtherNormals()
221 const std::vector<tcu::Float16>& getInputValues16 () const in getInputValues16()
239 , m_values16(getInputValues<tcu::Float16>(m_rnd)) in InputGenerator()
250 std::vector<tcu::Float16> m_values16;
550 …inputBufferSizeInfo = BufferSizeInfo::calculate<tcu::Float16>(inputValues.size(), m_params.vectorL… in iterate()
569 …outputBufferSizeInfo = BufferSizeInfo::calculate<tcu::Float16>(inputBufferSizeInfo.numValues, m_pa… in iterate()
803 …auto outputValues = unpackFloats<tcu::Float16>(outputMemory, m_params.vectorLength, inputBufferSiz… in iterate()
/third_party/vk-gl-cts/modules/gles31/functional/
Des31fShaderPackingFunctionTests.cpp550 *inVal = tcu::Vec2(tcu::Float16(inVal->x()).asFloat(), tcu::Float16(inVal->y()).asFloat()); in iterate()
572 const deUint16 ref0 = (deUint16)tcu::Float16(inputs[valNdx].x()).bits(); in iterate()
573 const deUint16 ref1 = (deUint16)tcu::Float16(inputs[valNdx].y()).bits(); in iterate()
628 inputs.push_back((tcu::Float16( 0.0f).bits() << 16) | tcu::Float16( 1.0f).bits()); in iterate()
629 inputs.push_back((tcu::Float16( 1.0f).bits() << 16) | tcu::Float16( 0.0f).bits()); in iterate()
630 inputs.push_back((tcu::Float16(-1.0f).bits() << 16) | tcu::Float16( 0.5f).bits()); in iterate()
631 inputs.push_back((tcu::Float16( 0.5f).bits() << 16) | tcu::Float16(-0.5f).bits()); in iterate()
647 …const deUint16 value = tcu::Float16::construct(s, exp ? exp : 1 /* avoid denorm */, (deUint16)((1… in iterate()
677 const float ref0 = tcu::Float16(in0).asFloat(); in iterate()
678 const float ref1 = tcu::Float16(in1).asFloat(); in iterate()
/third_party/vixl/test/aarch64/
Dtest-utils-aarch64.h52 extern const Float16 kFP16SignallingNaN;
53 extern const Float16 kFP16QuietNaN;
144 inline Float16 hreg(unsigned code) const { in hreg()
352 bool EqualFP16(Float16 expected, const RegisterDump*, uint16_t result);
365 bool EqualFP16(Float16 expected,
Dtest-assembler-fp-aarch64.cc345 __ Fmov(h24, Float16(-5.0)); in TEST()
346 __ Fmov(h25, Float16(2049.0)); in TEST()
367 ASSERT_EQUAL_FP16(Float16(-5.0), h23); in TEST()
389 __ Fmov(h8, Float16(1024.0)); in TEST()
514 ASSERT_EQUAL_FP16(Float16(4.25), h0); in TEST()
515 ASSERT_EQUAL_FP16(Float16(1.0), h1); in TEST()
516 ASSERT_EQUAL_FP16(Float16(1.0), h2); in TEST()
521 ASSERT_EQUAL_FP16(Float16(10.0), h7); in TEST()
604 ASSERT_EQUAL_FP16(Float16(2.25), h0); in TEST()
605 ASSERT_EQUAL_FP16(Float16(1.0), h1); in TEST()
[all …]
Dtest-utils-aarch64.cc49 const Float16 kFP16SignallingNaN = RawbitsToFloat16(0x7c01);
54 const Float16 kFP16QuietNaN = RawbitsToFloat16(0x7e01);
108 bool EqualFP16(Float16 expected, const RegisterDump*, Float16 result) { in EqualFP16()
224 bool EqualFP16(Float16 expected, in EqualFP16()
797 a = Float16ToRawbits(Float16(1.5)); in SetFpData()
800 b = Float16ToRawbits(Float16(lcg_mult % 1024)); in SetFpData()
Dtest-assembler-sve-aarch64.cc6545 __ Cpy(z7.VnH(), pg.Merging(), Float16ToRawbits(Float16(-31.0))); in TEST_SVE()
6643 __ Fcpy(z1.VnH(), pg.Merging(), Float16(1.0)); in TEST_SVE()
6646 __ Fcpy(z4.VnS(), pg.Merging(), Float16(-4.0)); in TEST_SVE()
6649 __ Fcpy(z7.VnD(), pg.Merging(), Float16(7.0)); in TEST_SVE()
6655 __ Fcpy(z11.VnH(), pg.Merging(), Float16(42.0)); in TEST_SVE()
6661 __ Fmov(z15.VnH(), pg.Merging(), Float16(42.0)); in TEST_SVE()
11268 __ Fdup(z1.VnS(), Float16(2.0)); in TEST_SVE()
11269 __ Fdup(z2.VnD(), Float16(3.875)); in TEST_SVE()
11278 __ Fdup(z10.VnH(), Float16(0.0)); in TEST_SVE()
12148 uint16_t expected_h[] = {Float16ToRawbits(Float16(1048.0)), in TEST_SVE()
[all …]
/third_party/vk-gl-cts/modules/gles3/accuracy/
Des3aVaryingInterpolationTests.cpp132 tcu::Float16 fp16(val); in isValidFloat()
300 float minF16 = tcu::Float16((deUint16)((0u<<15) | (0x1cu<<10) | 0x0u)).asFloat(); in init()
301 float maxF16 = tcu::Float16((deUint16)((1u<<15) | (0x1cu<<10) | 0x0u)).asFloat(); in init()
/third_party/vk-gl-cts/modules/gles2/accuracy/
Des2aVaryingInterpolationTests.cpp130 tcu::Float16 fp16(val); in isValidFloat()
294 float minF16 = tcu::Float16((deUint16)((0u<<15) | (0x1cu<<10) | 0x0u)).asFloat(); in init()
295 float maxF16 = tcu::Float16((deUint16)((1u<<15) | (0x1cu<<10) | 0x0u)).asFloat(); in init()
/third_party/vk-gl-cts/framework/referencerenderer/
DrrVertexAttrib.cpp120 dst[0] = tcu::Float16(aligned[0]).asFloat(); in readHalf()
121 if (size >= 2) dst[1] = tcu::Float16(aligned[1]).asFloat(); in readHalf()
122 if (size >= 3) dst[2] = tcu::Float16(aligned[2]).asFloat(); in readHalf()
123 if (size >= 4) dst[3] = tcu::Float16(aligned[3]).asFloat(); in readHalf()
/third_party/vk-gl-cts/external/vulkancts/modules/vulkan/spirv_assembly/
DvktSpvAsmTrinaryMinMaxTests.cpp187 static void genFloat16 (de::Random& rnd, void* ptr) { genFloat<tcu::Float16>(rnd, ptr); } in genFloat16()
226 … void* in1, const void* in2, const void* in3) { runOpFunc<tcu::Float16>(min3<tcu::Float16>, out, i… in minFloat16()
227 … void* in1, const void* in2, const void* in3) { runOpFunc<tcu::Float16>(max3<tcu::Float16>, out, i… in maxFloat16()
228 … void* in1, const void* in2, const void* in3) { runOpFunc<tcu::Float16>(mid3<tcu::Float16>, out, i… in midFloat16()
/third_party/vk-gl-cts/external/vulkancts/modules/vulkan/image/
DvktImageSubresourceLayoutTests.cpp313 tcu::Float16 getNormalFPValue<tcu::Float16> (de::Random& rnd) in getNormalFPValue()
315 tcu::Float16 value; in getNormalFPValue()
317 value = tcu::Float16(rnd.getFloat()); in getNormalFPValue()
410 fillWithRandomFloatingPoint<tcu::Float16>(rnd, bufferPtr, bufferSize); in iterateAspect()
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/source/
Dparsed_operand.cpp44 *out << spvtools::utils::FloatProxy<spvtools::utils::Float16>( in EmitNumericLiteral()
/third_party/skia/third_party/externals/spirv-tools/source/
Dparsed_operand.cpp44 *out << spvtools::utils::FloatProxy<spvtools::utils::Float16>( in EmitNumericLiteral()

1234567