llvm/llvm/lib/Support/ScaledNumber.cpp

//==- lib/Support/ScaledNumber.cpp - Support for scaled numbers -*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Implementation of some scaled number algorithms.
//
//===----------------------------------------------------------------------===//

#include "llvm/Support/ScaledNumber.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"

usingnamespacellvm;
usingnamespacellvm::ScaledNumbers;

std::pair<uint64_t, int16_t> ScaledNumbers::multiply64(uint64_t LHS,
                                                       uint64_t RHS) {}

static uint64_t getHalf(uint64_t N) {}

std::pair<uint32_t, int16_t> ScaledNumbers::divide32(uint32_t Dividend,
                                                     uint32_t Divisor) {}

std::pair<uint64_t, int16_t> ScaledNumbers::divide64(uint64_t Dividend,
                                                     uint64_t Divisor) {}

int ScaledNumbers::compareImpl(uint64_t L, uint64_t R, int ScaleDiff) {}

static void appendDigit(std::string &Str, unsigned D) {}

static void appendNumber(std::string &Str, uint64_t N) {}

static bool doesRoundUp(char Digit) {}

static std::string toStringAPFloat(uint64_t D, int E, unsigned Precision) {}

static std::string stripTrailingZeros(const std::string &Float) {}

std::string ScaledNumberBase::toString(uint64_t D, int16_t E, int Width,
                                       unsigned Precision) {}

raw_ostream &ScaledNumberBase::print(raw_ostream &OS, uint64_t D, int16_t E,
                                     int Width, unsigned Precision) {}

void ScaledNumberBase::dump(uint64_t D, int16_t E, int Width) {}