MCPcopy Create free account
hub / github.com/KhronosGroup/glslang / Decode

Function Decode

gtests/HexFloat.cpp:66–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64// Decodes a hex-float string.
65template <typename T>
66FloatProxy<T> Decode(const std::string& str) {
67 spvutils::HexFloat<FloatProxy<T>> decoded(0.f);
68 EXPECT_TRUE((std::stringstream(str) >> decoded).eof());
69 return decoded.value();
70}
71
72TEST_P(HexFloatTest, DecodeCorrectly) {
73 EXPECT_THAT(Decode<float>(GetParam().second), Eq(GetParam().first));

Callers

nothing calls this directly

Calls 1

valueMethod · 0.80

Tested by

no test coverage detected