sim,misc: Rename Float namespace as as_float

As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

sim_clock::Float became sim_clock::as_float.

"as_float" was chosen because "float" is a reserved
keywords, and this namespace acts as a selector of
how to read the internal variables. Another
possibility to resolve this would be to remove the
namespaces "Float" and "Int" and use unions instead.

Change-Id: I7b3d9c6e9ab547493d5596c7eda080a25509a730
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45435
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
Daniel R. Carvalho
2021-05-07 15:54:51 -03:00
committed by Daniel Carvalho
parent d5ad966da5
commit c487767cff
12 changed files with 39 additions and 35 deletions

View File

@@ -55,7 +55,7 @@ Time::setTick(Tick ticks)
{
uint64_t secs = ticks / sim_clock::Frequency;
ticks -= secs * sim_clock::Frequency;
uint64_t nsecs = static_cast<uint64_t>(ticks * sim_clock::Float::GHz);
uint64_t nsecs = static_cast<uint64_t>(ticks * sim_clock::as_float::GHz);
set(secs, nsecs);
}
@@ -63,7 +63,7 @@ Tick
Time::getTick() const
{
return sec() * sim_clock::Frequency +
static_cast<uint64_t>(nsec() * sim_clock::Float::ns);
static_cast<uint64_t>(nsec() * sim_clock::as_float::ns);
}
std::string