Add src/utils/math.h

Move the RoundUp() and IsPowerOfTwo() methods from Resolver.cc to this file.

Add tests

Change-Id: Ib7af53dfa5e69083ec4fc2484da92a84c9468818
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/44682
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton
2021-03-15 13:37:41 +00:00
committed by Commit Bot service account
parent d614dd5d12
commit a75205265e
5 changed files with 114 additions and 18 deletions

View File

@@ -207,6 +207,7 @@ source_set("tint_unittests_core_src") {
"../src/type/vector_type_test.cc",
"../src/utils/command.h",
"../src/utils/command_test.cc",
"../src/utils/math_test.cc",
"../src/utils/tmpfile.h",
"../src/utils/tmpfile_test.cc",
"../src/utils/unique_vector_test.cc",