#pragma once #include namespace hwinfo { namespace unit { const auto mib_bytes = std::pow(2, 20); // NOLINT(cert-err58-cpp) /** * @brief Convert bytes to MiB * * @param bytes number of bytes * @return number of MiB as double */ inline double bytes_to_MiB(size_t bytes) { return static_cast(bytes) / mib_bytes; } } // namespace unit } // namespace hwinfo