MCPcopy Create free account
hub / github.com/catboost/catboost / ReadBinaryDouble

Method ReadBinaryDouble

library/cpp/yson/detail.h:614–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612 }
613
614 void ReadBinaryDouble(double* value) {
615 size_t needToRead = sizeof(double);
616
617 while (needToRead != 0) {
618 if (TBaseStream::IsEmpty()) {
619 TBaseStream::Refresh();
620 continue;
621 }
622
623 size_t chunkSize = Min(needToRead, TBaseStream::Length());
624 if (chunkSize == 0) {
625 ythrow TYsonException() << "Error parsing binary double literal";
626 }
627 std::copy(
628 TBaseStream::Begin(),
629 TBaseStream::Begin() + chunkSize,
630 reinterpret_cast<char*>(value) + (sizeof(double) - needToRead));
631 needToRead -= chunkSize;
632 TBaseStream::Advance(chunkSize);
633 }
634 }
635
636 /// Helpers
637 void SkipCharToken(char symbol) {

Callers

nothing calls this directly

Calls 6

LengthClass · 0.85
BeginClass · 0.85
IsEmptyFunction · 0.50
MinFunction · 0.50
copyFunction · 0.50
AdvanceFunction · 0.50

Tested by

no test coverage detected