Add SPU usage for program dump

This commit is contained in:
Elad Ashkenazi 2024-07-27 09:49:22 +03:00
parent b639599ade
commit faabb9e111
4 changed files with 243 additions and 16 deletions

View file

@ -320,20 +320,39 @@ namespace fmt
const uchar* data;
usz size;
base57() = default;
template <typename T>
base57(const T& arg)
: data(reinterpret_cast<const uchar*>(&arg))
base57(const T& arg) noexcept
: data(reinterpret_cast<const uchar*>(std::addressof(arg)))
, size(sizeof(T))
{
}
base57(const uchar* data, usz size)
base57(const uchar* data, usz size) noexcept
: data(data)
, size(size)
{
}
};
struct base57_result : public base57
{
std::unique_ptr<uchar[]> memory;
base57_result() noexcept = default;
base57_result(base57_result&&) = default;
base57_result& operator=(base57_result&&) = default;
explicit base57_result(usz size) noexcept
: base57(size ? new uchar[size] : nullptr, size)
, memory(const_cast<uchar*>(this->data))
{
}
static base57_result from_string(std::string_view str);
};
template <typename... Args>
constexpr const fmt_type_info type_info_v[sizeof...(Args) + 1]{fmt_type_info::make<fmt_unveil_t<Args>>()...};