Commit ca56e8b0 by Ben Clayton

Reactor: Add a PrintValue for Bool types.

Change-Id: I34eb45ef6c69536353449c980745a00afc65de46 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27010Tested-by: 's avatarBen Clayton <bclayton@google.com> Presubmit-Ready: Ben Clayton <bclayton@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 49d2c139
...@@ -2977,6 +2977,11 @@ namespace rr ...@@ -2977,6 +2977,11 @@ namespace rr
}; };
// PrintValue::Ty<T> specializations for standard Reactor types. // PrintValue::Ty<T> specializations for standard Reactor types.
template <> struct PrintValue::Ty<Bool>
{
static constexpr const char* fmt = "%d";
static std::vector<Value*> val(const RValue<Bool>& v) { return {v.value}; }
};
template <> struct PrintValue::Ty<Byte> template <> struct PrintValue::Ty<Byte>
{ {
static constexpr const char* fmt = "%d"; static constexpr const char* fmt = "%d";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment