File: dragonbox.cpp

package info (click to toggle)
dragonbox 1.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,148 kB
  • sloc: cpp: 8,752; ansic: 1,522; makefile: 18
file content (30 lines) | stat: -rw-r--r-- 1,121 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2020 Junekey Jeon
//
// The contents of this file may be used under the terms of
// the Apache License v2.0 with LLVM Exceptions.
//
//    (See accompanying file LICENSE-Apache or copy at
//     https://llvm.org/foundation/relicensing/LICENSE.txt)
//
// Alternatively, the contents of this file may be used under the terms of
// the Boost Software License, Version 1.0.
//    (See accompanying file LICENSE-Boost or copy at
//     https://www.boost.org/LICENSE_1_0.txt)
//
// Unless required by applicable law or agreed to in writing, this software
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.

#include "benchmark.h"
#include "dragonbox/dragonbox_to_chars.h"

namespace {
    void dragonbox_float_to_chars(float x, char* buffer) { jkj::dragonbox::to_chars(x, buffer); }
    void dragonbox_double_to_chars(double x, char* buffer) { jkj::dragonbox::to_chars(x, buffer); }

#if 1
    auto dummy = []() -> register_function_for_benchmark {
        return {"Dragonbox", dragonbox_float_to_chars, dragonbox_double_to_chars};
    }();
#endif
}