eckit::Bytes class

Public static functions

static auto KiB(uint64_t n) -> uint64_t
static auto MiB(uint64_t n) -> uint64_t
static auto GiB(uint64_t n) -> uint64_t
static auto TiB(uint64_t n) -> uint64_t
static auto PiB(uint64_t n) -> uint64_t
static auto EiB(uint64_t n) -> uint64_t
static auto rate(double num, double den) -> double
Handle rate computations avoiding floating point exceptions.

Constructors, destructors, conversion operators

Bytes(double)
Bytes(double, Timer&)
Computes a rate.
Bytes(double, double)
Computes a rate.
operator std::string() const

Public functions

auto value() const -> double
auto shorten() const -> std::string

Friends

auto operator<<(std::ostream&, const Bytes&) -> std::ostream&

Function documentation

static uint64_t eckit::Bytes::KiB(uint64_t n)

Parameters
n nuber of Kibibytes

Compute number of bytes in 'n' Kibibytes.

static uint64_t eckit::Bytes::MiB(uint64_t n)

Parameters
n nuber of Mebibytes

Compute number of bytes in 'n' Mebibytes.

static uint64_t eckit::Bytes::GiB(uint64_t n)

Parameters
n nuber of Gibibytes

Compute number of bytes in 'n' Gibibytes.

static uint64_t eckit::Bytes::TiB(uint64_t n)

Parameters
n nuber of Tebibytes

Compute number of bytes in 'n' Tebibytes.

static uint64_t eckit::Bytes::PiB(uint64_t n)

Parameters
n nuber of Pebibytes

Compute number of bytes in 'n' Pebibytes.

static uint64_t eckit::Bytes::EiB(uint64_t n)

Parameters
n nuber of Exbibytes

Compute number of bytes in 'n' Exbibytes.

This website is beyond its original expiry date and the content may be out of date. The site owner has been notified and may choose to extend the expiry date and remove this banner. If you have any questions about this, please visit our support portal.