title stringclasses 1
value | text stringlengths 30 1.11M | id stringlengths 27 31 |
|---|---|---|
single_include/nlohmann/json.hpp/assert_invariant
void assert_invariant() const noexcept
{
assert(m_type != value_t::object or m_value.object != nullptr);
assert(m_type != value_t::array or m_value.array != nullptr);
assert(m_type != value_t::string or m_value.string != nullptr);
} | negative_train_query0_00298 | |
single_include/nlohmann/json.hpp/is_number_unsigned
constexpr bool is_number_unsigned() const noexcept
{
return m_type == value_t::number_unsigned;
} | negative_train_query0_00299 | |
single_include/nlohmann/json.hpp/grisu2_digit_gen
inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent,
diyfp M_minus, diyfp w, diyfp M_plus)
{
static_assert(kAlpha >= -60, "internal error");
static_assert(kGamma <= -32, "internal error");
// Generates ... | negative_train_query0_00300 | |
single_include/nlohmann/json.hpp/meta
JSON_HEDLEY_WARN_UNUSED_RESULT
static basic_json meta()
{
basic_json result;
result["copyright"] = "(C) 2013-2017 Niels Lohmann";
result["name"] = "JSON for Modern C++";
result["url"] = "https://github.com/nlohmann/json";
result[... | negative_train_query0_00301 | |
single_include/nlohmann/json.hpp/from_json_tuple_impl
void from_json_tuple_impl(const BasicJsonType& j, Tuple& t, index_sequence<Idx...> /*unused*/)
{
t = std::make_tuple(j.at(Idx).template get<typename std::tuple_element<Idx, Tuple>::type>()...);
} | negative_train_query0_00302 | |
single_include/nlohmann/json.hpp/grisu2_round
inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta,
std::uint64_t rest, std::uint64_t ten_k)
{
assert(len >= 1);
assert(dist <= delta);
assert(rest <= delta);
assert(ten_k > 0);
// ... | negative_train_query0_00303 | |
single_include/nlohmann/json.hpp/get_allocator
static allocator_type get_allocator()
{
return allocator_type();
} | negative_train_query0_00304 | |
single_include/nlohmann/json.hpp/is_object
constexpr bool is_object() const noexcept
{
return m_type == value_t::object;
} | negative_train_query0_00305 | |
single_include/nlohmann/json.hpp/rend
const_reverse_iterator rend() const noexcept
{
return crend();
} | negative_train_query0_00306 | |
single_include/nlohmann/json.hpp/to_cbor
static std::vector<uint8_t> to_cbor(const basic_json& j)
{
std::vector<uint8_t> result;
to_cbor(j, result);
return result;
} | negative_train_query0_00307 | |
single_include/nlohmann/json.hpp/from_cbor
JSON_HEDLEY_WARN_UNUSED_RESULT
static basic_json from_cbor(detail::input_adapter&& i,
const bool strict = true,
const bool allow_exceptions = true)
{
basic_json result;
detail::json_sax... | negative_train_query0_00308 | |
single_include/nlohmann/json.hpp/unescape
static void unescape(std::string& s)
{
replace_substring(s, "~1", "/");
replace_substring(s, "~0", "~");
} | negative_train_query0_00309 | |
single_include/nlohmann/json.hpp/array
JSON_HEDLEY_WARN_UNUSED_RESULT
static basic_json array(initializer_list_t init = {})
{
return basic_json(init, false, value_t::array);
} | negative_train_query0_00310 | |
single_include/nlohmann/json.hpp/crbegin
const_reverse_iterator crbegin() const noexcept
{
return const_reverse_iterator(cend());
} | negative_train_query0_00311 | |
single_include/nlohmann/json.hpp/escape
static std::string escape(std::string s)
{
replace_substring(s, "~", "~0");
replace_substring(s, "/", "~1");
return s;
} | negative_train_query0_00312 | |
single_include/nlohmann/json.hpp/find
iterator find(KeyT&& key)
{
auto result = end();
if (is_object())
{
result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key));
}
return result;
} | negative_train_query0_00313 | |
single_include/nlohmann/json.hpp/diff
JSON_HEDLEY_WARN_UNUSED_RESULT
static basic_json diff(const basic_json& source, const basic_json& target,
const std::string& path = "")
{
// the patch
basic_json result(value_t::array);
// if the values are the same, r... | negative_train_query0_00314 | |
single_include/nlohmann/json.hpp/clear
void clear() noexcept
{
switch (m_type)
{
case value_t::number_integer:
{
m_value.number_integer = 0;
break;
}
case value_t::number_unsigned:
{
m_va... | negative_train_query0_00315 | |
single_include/nlohmann/json.hpp/insert_iterator
iterator insert_iterator(const_iterator pos, Args&& ... args)
{
iterator result(this);
assert(m_value.array != nullptr);
auto insert_pos = std::distance(m_value.array->begin(), pos.m_it.array_iterator);
m_value.array->insert(pos.m... | negative_train_query0_00316 | |
single_include/nlohmann/json.hpp/is_structured
constexpr bool is_structured() const noexcept
{
return is_array() or is_object();
} | negative_train_query0_00317 | |
single_include/nlohmann/json.hpp/merge_patch
void merge_patch(const basic_json& apply_patch)
{
if (apply_patch.is_object())
{
if (not is_object())
{
*this = object();
}
for (auto it = apply_patch.begin(); it != apply_patch.end(); ++... | negative_train_query0_00318 | |
single_include/nlohmann/json.hpp/is_primitive
constexpr bool is_primitive() const noexcept
{
return is_null() or is_string() or is_boolean() or is_number();
} | negative_train_query0_00319 | |
single_include/nlohmann/json.hpp/is_number_integer
constexpr bool is_number_integer() const noexcept
{
return m_type == value_t::number_integer or m_type == value_t::number_unsigned;
} | negative_train_query0_00320 | |
single_include/nlohmann/json.hpp/count
size_type count(KeyT&& key) const
{
// return 0 for all nonobject types
return is_object() ? m_value.object->count(std::forward<KeyT>(key)) : 0;
} | negative_train_query0_00321 | |
single_include/nlohmann/json.hpp/int_to_string
void int_to_string( string_type& target, std::size_t value )
{
target = std::to_string(value);
} | negative_train_query0_00322 | |
single_include/nlohmann/json.hpp/type
constexpr value_t type() const noexcept
{
return m_type;
} | negative_train_query0_00323 | |
single_include/nlohmann/json.hpp/is_number
constexpr bool is_number() const noexcept
{
return is_number_integer() or is_number_float();
} | negative_train_query0_00324 | |
single_include/nlohmann/json.hpp/grisu2
inline void grisu2(char* buf, int& len, int& decimal_exponent,
diyfp m_minus, diyfp v, diyfp m_plus)
{
assert(m_plus.e == m_minus.e);
assert(m_plus.e == v.e);
// --------(-----------------------+-----------------------)-------- (A)
// ... | negative_train_query0_00325 | |
single_include/nlohmann/json.hpp/sax_parse
static bool sax_parse(detail::input_adapter&& i, SAX* sax,
input_format_t format = input_format_t::json,
const bool strict = true)
{
assert(sax);
return format == input_format_t::json
? ... | negative_train_query0_00326 | |
single_include/nlohmann/json.hpp/is_boolean
constexpr bool is_boolean() const noexcept
{
return m_type == value_t::boolean;
} | negative_train_query0_00327 | |
single_include/nlohmann/json.hpp/cend
const_iterator cend() const noexcept
{
const_iterator result(this);
result.set_end();
return result;
} | negative_train_query0_00328 | |
single_include/nlohmann/json.hpp/rbegin
const_reverse_iterator rbegin() const noexcept
{
return crbegin();
} | negative_train_query0_00329 | |
single_include/nlohmann/json.hpp/is_array
constexpr bool is_array() const noexcept
{
return m_type == value_t::array;
} | negative_train_query0_00330 | |
single_include/nlohmann/json.hpp/find_largest_pow10
inline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10)
{
// LCOV_EXCL_START
if (n >= 1000000000)
{
pow10 = 1000000000;
return 10;
}
// LCOV_EXCL_STOP
else if (n >= 100000000)
{
pow10 = 100000000;
... | negative_train_query0_00331 | |
single_include/nlohmann/json.hpp/end
iterator end() noexcept
{
iterator result(this);
result.set_end();
return result;
} | negative_train_query0_00332 | |
single_include/nlohmann/json.hpp/emplace
std::pair<iterator, bool> emplace(Args&& ... args)
{
// emplace only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(not(is_null() or is_object())))
{
JSON_THROW(type_error::create(311, "cannot use emplace() with " + std::str... | negative_train_query0_00333 | |
single_include/nlohmann/json.hpp/get_cached_power_for_binary_exponent
inline cached_power get_cached_power_for_binary_exponent(int e)
{
// Now
//
// alpha <= e_c + e + q <= gamma (1)
// ==> f_c * 2^alpha <= c * 2^e * 2^q
//
// and since the c's are no... | negative_train_query0_00334 | |
single_include/nlohmann/json.hpp/to_json_tuple_impl
void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence<Idx...> /*unused*/)
{
j = { std::get<Idx>(t)... };
} | negative_train_query0_00335 | |
single_include/nlohmann/json.hpp/cbegin
const_iterator cbegin() const noexcept
{
const_iterator result(this);
result.set_begin();
return result;
} | negative_train_query0_00336 | |
single_include/nlohmann/json.hpp/output_vector_adapter/output_vector_adapter
class output_vector_adapter: explicit output_vector_adapter(std::vector<CharType>& vec) noexcept
: v(vec)
{} | negative_train_query0_00337 | |
single_include/nlohmann/json.hpp/json_reverse_iterator/json_reverse_iterator
class json_reverse_iterator: explicit json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} | negative_train_query0_00338 | |
single_include/nlohmann/json.hpp/output_string_adapter/output_string_adapter
class output_string_adapter: explicit output_string_adapter(StringType& s) noexcept
: str(s)
{} | negative_train_query0_00339 | |
single_include/nlohmann/json.hpp/json_ref/json_ref
class json_ref: json_ref(json_ref&&) = default; | negative_train_query0_00340 | |
single_include/nlohmann/json.hpp/output_stream_adapter/output_stream_adapter
class output_stream_adapter: explicit output_stream_adapter(std::basic_ostream<CharType>& s) noexcept
: stream(s)
{} | negative_train_query0_00341 | |
single_include/nlohmann/json.hpp/diyfp/diyfp
class diyfp: constexpr diyfp(std::uint64_t f_, int e_) noexcept : f(f_), e(e_) {} | negative_train_query0_00342 | |
single_include/nlohmann/json.hpp/json_value/json_value
class json_value: json_value(const array_t& value)
{
array = create<array_t>(value);
} | negative_train_query0_00343 | |
single_include/nlohmann/json.hpp/wide_string_input_adapter/wide_string_input_adapter
class wide_string_input_adapter: explicit wide_string_input_adapter(const WideStringType& w) noexcept
: str(w)
{} | negative_train_query0_00344 | |
single_include/nlohmann/json.hpp/wide_string_input_adapter/fill_buffer
class wide_string_input_adapter: void fill_buffer()
{
wide_string_input_helper<WideStringType, T>::fill_buffer(str, current_wchar, utf8_bytes, utf8_bytes_index, utf8_bytes_filled);
} | negative_train_query0_00345 | |
single_include/nlohmann/json.hpp/iter_impl/iter_impl
class iter_impl: explicit iter_impl(pointer object) noexcept : m_object(object)
{
assert(m_object != nullptr);
switch (m_object->m_type)
{
case value_t::object:
{
m_it.object_iterator = typename ... | negative_train_query0_00346 | |
single_include/nlohmann/json.hpp/json_pointer/json_pointer
class json_pointer: explicit json_pointer(const std::string& s = "")
: reference_tokens(split(s))
{} | negative_train_query0_00347 | |
single_include/nlohmann/json.hpp/json_pointer/JSON_CATCH
class json_pointer: JSON_CATCH(std::out_of_range&)
{
JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + s + "'"));
} | negative_train_query0_00348 | |
single_include/nlohmann/json.hpp/binary_reader/binary_reader
class binary_reader: binary_reader(const binary_reader&) = delete; | negative_train_query0_00349 | |
single_include/nlohmann/json.hpp/binary_reader/get_number
class binary_reader: bool get_number(const input_format_t format, NumberType& result)
{
// step 1: read input into array with system's byte order
std::array<std::uint8_t, sizeof(NumberType)> vec;
for (std::size_t i = 0; i < sizeof(... | negative_train_query0_00350 | |
single_include/nlohmann/json.hpp/binary_reader/get_bson_string
class binary_reader: bool get_bson_string(const NumberType len, string_t& result)
{
if (JSON_HEDLEY_UNLIKELY(len < 1))
{
auto last_token = get_token_string();
return sax->parse_error(chars_read, last_token, par... | negative_train_query0_00351 | |
single_include/nlohmann/json.hpp/binary_reader/get_string
class binary_reader: bool get_string(const input_format_t format,
const NumberType len,
string_t& result)
{
bool success = true;
std::generate_n(std::back_inserter(result), len, [this, &success, &for... | negative_train_query0_00352 | |
single_include/nlohmann/json.hpp/adl_serializer/from_json
class adl_serializer: static auto from_json(BasicJsonType&& j, ValueType& val) noexcept(
noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val)))
-> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void())
{
... | negative_train_query0_00353 | |
single_include/nlohmann/json.hpp/adl_serializer/to_json
class adl_serializer: static auto to_json(BasicJsonType& j, ValueType&& val) noexcept(
noexcept(::nlohmann::to_json(j, std::forward<ValueType>(val))))
-> decltype(::nlohmann::to_json(j, std::forward<ValueType>(val)), void())
{
::nlohmann... | negative_train_query0_00354 | |
single_include/nlohmann/json.hpp/json_sax_dom_parser/json_sax_dom_parser
class json_sax_dom_parser: json_sax_dom_parser(json_sax_dom_parser&&) = default; | negative_train_query0_00355 | |
single_include/nlohmann/json.hpp/json_sax_dom_callback_parser/json_sax_dom_callback_parser
class json_sax_dom_callback_parser: json_sax_dom_callback_parser(const json_sax_dom_callback_parser&) = delete; | negative_train_query0_00356 | |
single_include/nlohmann/json.hpp/json_sax_dom_callback_parser/handle_value
class json_sax_dom_callback_parser: std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
assert(not keep_stack.empty());
// do not handle this value if we know it would be added to a... | negative_train_query0_00357 | |
single_include/nlohmann/json.hpp/iteration_proxy_value/iteration_proxy_value
class iteration_proxy_value: explicit iteration_proxy_value(IteratorType it) noexcept : anchor(it) {} | negative_train_query0_00358 | |
single_include/nlohmann/json.hpp/nonesuch/nonesuch
class nonesuch: nonesuch(nonesuch const&&) = delete; | negative_train_query0_00359 | |
single_include/nlohmann/json.hpp/lexer/lexer
class lexer: lexer(lexer&&) = delete; | negative_train_query0_00360 | |
single_include/nlohmann/json.hpp/input_stream_adapter/input_stream_adapter
class input_stream_adapter: input_stream_adapter(input_stream_adapter&&) = delete; | negative_train_query0_00361 | |
single_include/nlohmann/json.hpp/iteration_proxy/iteration_proxy
class iteration_proxy: explicit iteration_proxy(typename IteratorType::reference cont) noexcept
: container(cont) {} | negative_train_query0_00362 | |
single_include/nlohmann/json.hpp/input_buffer_adapter/input_buffer_adapter
class input_buffer_adapter: input_buffer_adapter(input_buffer_adapter&&) = delete; | negative_train_query0_00363 | |
single_include/nlohmann/json.hpp/serializer/serializer
class serializer: serializer(serializer&&) = delete; | negative_train_query0_00364 | |
single_include/nlohmann/json.hpp/serializer/dump_integer
class serializer: void dump_integer(NumberType x)
{
static constexpr std::array<std::array<char, 2>, 100> digits_to_99
{
{
{{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0'... | negative_train_query0_00365 | |
single_include/nlohmann/json.hpp/output_adapter/output_adapter
class output_adapter: output_adapter(std::basic_ostream<CharType>& s)
: oa(std::make_shared<output_stream_adapter<CharType>>(s)) {} | negative_train_query0_00366 | |
single_include/nlohmann/json.hpp/parser/parser
class parser: explicit parser(detail::input_adapter_t&& adapter,
const parser_callback_t cb = nullptr,
const bool allow_exceptions_ = true)
: callback(cb), m_lexer(std::move(adapter)), allow_exceptions(allow_exceptions_)
... | negative_train_query0_00367 | |
single_include/nlohmann/json.hpp/parser/sax_parse
class parser: bool sax_parse(SAX* sax, const bool strict = true)
{
(void)detail::is_sax_static_asserts<SAX, BasicJsonType> {};
const bool result = sax_parse_internal(sax);
// strict mode: next byte must be EOF
if (result and stric... | negative_train_query0_00368 | |
single_include/nlohmann/json.hpp/parser/sax_parse_internal
class parser: bool sax_parse_internal(SAX* sax)
{
// stack to remember the hierarchy of structured values we are parsing
// true = array; false = object
std::vector<bool> states;
// value to avoid a goto (see comment where... | negative_train_query0_00369 | |
single_include/nlohmann/json.hpp/binary_writer/binary_writer
class binary_writer: explicit binary_writer(output_adapter_t<CharType> adapter) : oa(adapter)
{
assert(oa);
} | negative_train_query0_00370 | |
single_include/nlohmann/json.hpp/binary_writer/write_number_with_ubjson_prefix
class binary_writer: void write_number_with_ubjson_prefix(const NumberType n,
const bool add_prefix)
{
if ((std::numeric_limits<std::int8_t>::min)() <= n and n <= (std::numeric_limits<s... | negative_train_query0_00371 | |
single_include/nlohmann/json.hpp/binary_writer/write_number
class binary_writer: void write_number(const NumberType n)
{
// step 1: write number to array of length NumberType
std::array<CharType, sizeof(NumberType)> vec;
std::memcpy(vec.data(), &n, sizeof(NumberType));
// step 2:... | negative_train_query0_00372 | |
single_include/nlohmann/json.hpp/binary_writer/to_char_type
class binary_writer: static constexpr CharType to_char_type(std::uint8_t x) noexcept
{
return x;
} | negative_train_query0_00373 | |
single_include/nlohmann/json.hpp/parse_error/parse_error
class parse_error: parse_error(int id_, std::size_t byte_, const char* what_arg)
: exception(id_, what_arg), byte(byte_) {} | negative_train_query0_00374 | |
single_include/nlohmann/json.hpp/file_input_adapter/file_input_adapter
class file_input_adapter: file_input_adapter(file_input_adapter&&) = default; | negative_train_query0_00375 | |
single_include/nlohmann/json.hpp/input_adapter/input_adapter
class input_adapter: input_adapter(const ContiguousContainer& c)
: input_adapter(std::begin(c), std::end(c)) {} | negative_train_query0_00376 | |
benchmarks/src/benchmarks.cpp/ParseFile
static void ParseFile(benchmark::State& state, const char* filename)
{
while (state.KeepRunning())
{
state.PauseTiming();
auto* f = new std::ifstream(filename);
auto* j = new json();
state.ResumeTiming();
*j = json::parse(*f);
... | negative_train_query0_00377 | |
benchmarks/src/benchmarks.cpp/Dump
static void Dump(benchmark::State& state, const char* filename, int indent)
{
std::ifstream f(filename);
std::string str((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>());
json j = json::parse(str);
while (state.KeepRunning())
{
j.dump... | negative_train_query0_00378 | |
benchmarks/src/benchmarks.cpp/ParseString
static void ParseString(benchmark::State& state, const char* filename)
{
std::ifstream f(filename);
std::string str((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>());
while (state.KeepRunning())
{
state.PauseTiming();
auto* ... | negative_train_query0_00379 | |
benchmarks/thirdparty/benchmark/cmake/thread_safety_attributes.cpp/main
int main() {} | negative_train_query0_00380 | |
benchmarks/thirdparty/benchmark/cmake/std_regex.cpp/main
int main() {
const std::string str = "test0159";
std::regex re;
re = std::regex("^[a-z]+[0-9]+$",
std::regex_constants::extended | std::regex_constants::nosubs);
return std::regex_search(str, re) ? 0 : -1;
} | negative_train_query0_00381 | |
benchmarks/thirdparty/benchmark/cmake/gnu_posix_regex.cpp/main
int main() {
std::string str = "test0159";
regex_t re;
int ec = regcomp(&re, "^[a-z]+[0-9]+$", REG_EXTENDED | REG_NOSUB);
if (ec != 0) {
return ec;
}
return regexec(&re, str.c_str(), 0, nullptr, 0) ? -1 : 0;
} | negative_train_query0_00382 | |
benchmarks/thirdparty/benchmark/cmake/steady_clock.cpp/main
int main() {
typedef std::chrono::steady_clock Clock;
Clock::time_point tp = Clock::now();
((void)tp);
} | negative_train_query0_00383 | |
benchmarks/thirdparty/benchmark/cmake/posix_regex.cpp/main
int main() {
std::string str = "test0159";
regex_t re;
int ec = regcomp(&re, "^[a-z]+[0-9]+$", REG_EXTENDED | REG_NOSUB);
if (ec != 0) {
return ec;
}
int ret = regexec(&re, str.c_str(), 0, nullptr, 0) ? -1 : 0;
regfree(&re);
return ret;
} | negative_train_query0_00384 | |
benchmarks/thirdparty/benchmark/src/colorprint.cc/FormatString
std::string FormatString(const char* msg, ...) {
va_list args;
va_start(args, msg);
auto tmp = FormatString(msg, args);
va_end(args);
return tmp;
} | negative_train_query0_00385 | |
benchmarks/thirdparty/benchmark/src/colorprint.cc/ColorPrintf
void ColorPrintf(std::ostream& out, LogColor color, const char* fmt,
va_list args) {
#ifdef BENCHMARK_OS_WINDOWS
((void)out); // suppress unused warning
const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);
// Gets the curre... | negative_train_query0_00386 | |
benchmarks/thirdparty/benchmark/src/colorprint.cc/GetPlatformColorCode
PlatformColorCode GetPlatformColorCode(LogColor color) {
#ifdef BENCHMARK_OS_WINDOWS
switch (color) {
case COLOR_RED:
return FOREGROUND_RED;
case COLOR_GREEN:
return FOREGROUND_GREEN;
case COLOR_YELLOW:
return FOREGRO... | negative_train_query0_00387 | |
benchmarks/thirdparty/benchmark/src/colorprint.cc/IsColorTerminal
bool IsColorTerminal() {
#if BENCHMARK_OS_WINDOWS
// On Windows the TERM variable is usually not set, but the
// console there does support colors.
return 0 != _isatty(_fileno(stdout));
#else
// On non-Windows platforms, we rely on the TERM varia... | negative_train_query0_00388 | |
benchmarks/thirdparty/benchmark/src/benchmark_register.cc/ClearRegisteredBenchmarks
void ClearRegisteredBenchmarks() {
internal::BenchmarkFamilies::GetInstance()->ClearBenchmarks();
} | negative_train_query0_00389 | |
benchmarks/thirdparty/benchmark/src/benchmark_register.cc/FindBenchmarksInternal
bool FindBenchmarksInternal(const std::string& re,
std::vector<Benchmark::Instance>* benchmarks,
std::ostream* Err) {
return BenchmarkFamilies::GetInstance()->FindBenchmarks(re, ben... | negative_train_query0_00390 | |
benchmarks/thirdparty/benchmark/src/benchmark_register.cc/BenchmarkFamilies/BenchmarkFamilies
class BenchmarkFamilies: BenchmarkFamilies() {} | negative_train_query0_00391 | |
benchmarks/thirdparty/benchmark/src/console_reporter.cc/IgnoreColorPrint
static void IgnoreColorPrint(std::ostream& out, LogColor, const char* fmt,
...) {
va_list args;
va_start(args, fmt);
out << FormatString(fmt, args);
va_end(args);
} | negative_train_query0_00392 | |
benchmarks/thirdparty/benchmark/src/string_util.cc/ToExponentAndMantissa
void ToExponentAndMantissa(double val, double thresh, int precision,
double one_k, std::string* mantissa,
int64_t* exponent) {
std::stringstream mantissa_stream;
if (val < 0) {
mantiss... | negative_train_query0_00393 | |
benchmarks/thirdparty/benchmark/src/string_util.cc/StrFormatImp
std::string StrFormatImp(const char* msg, va_list args) {
// we might need a second shot at this, so pre-emptivly make a copy
va_list args_cp;
va_copy(args_cp, args);
// TODO(ericwf): use std::array for first attempt to avoid one memory
// alloc... | negative_train_query0_00394 | |
benchmarks/thirdparty/benchmark/src/string_util.cc/HumanReadableNumber
std::string HumanReadableNumber(double n, double one_k) {
// 1.1 means that figures up to 1.1k should be shown with the next unit down;
// this softens edge effects.
// 1 means that we should show one decimal place of precision.
return ToBin... | negative_train_query0_00395 | |
benchmarks/thirdparty/benchmark/src/string_util.cc/ExponentToPrefix
std::string ExponentToPrefix(int64_t exponent, bool iec) {
if (exponent == 0) return "";
const int64_t index = (exponent > 0 ? exponent - 1 : -exponent - 1);
if (index >= kUnitsSize) return "";
const char* array =
(exponent > 0 ? (iec ?... | negative_train_query0_00396 | |
benchmarks/thirdparty/benchmark/src/string_util.cc/ToBinaryStringFullySpecified
std::string ToBinaryStringFullySpecified(double value, double threshold,
int precision, double one_k = 1024.0) {
std::string mantissa;
int64_t exponent;
ToExponentAndMantissa(value, threshold, ... | negative_train_query0_00397 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.