MCPcopy Create free account
hub / github.com/AllentDan/LibtorchSegmentation / get_binary

Method get_binary

src/utils/json.hpp:10000–10016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9998 */
9999 template<typename NumberType>
10000 bool get_binary(const input_format_t format,
10001 const NumberType len,
10002 binary_t& result)
10003 {
10004 bool success = true;
10005 for (NumberType i = 0; i < len; i++)
10006 {
10007 get();
10008 if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "binary")))
10009 {
10010 success = false;
10011 break;
10012 }
10013 result.push_back(static_cast<std::uint8_t>(current));
10014 }
10015 return success;
10016 }
10017
10018 /*!
10019 @param[in] format the current format (for diagnostics)

Callers 1

hashFunction · 0.80

Calls 2

getFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected