MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / DeduceEncoding

Function DeduceEncoding

source/util/parse_number.cpp:134–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134spv_fp_encoding_t DeduceEncoding(const NumberType& type) {
135 if (type.encoding != SPV_FP_ENCODING_UNKNOWN) return type.encoding;
136 switch (type.bitwidth) {
137 case 16:
138 return SPV_FP_ENCODING_IEEE754_BINARY16;
139 case 32:
140 return SPV_FP_ENCODING_IEEE754_BINARY32;
141 case 64:
142 return SPV_FP_ENCODING_IEEE754_BINARY64;
143 default:
144 return SPV_FP_ENCODING_UNKNOWN;
145 }
146}
147EncodeNumberStatus ParseAndEncodeFloatingPointNumber(
148 const char* text, const NumberType& type,
149 std::function<void(uint32_t)> emit, std::string* error_msg) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected