mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
benchmarks: Add a basic set of benchmarks
Add google benchmark to the DEPs. Implement a basic set of benchmarks for each of the writers and the WGSL parser. Add build rules for CMake. GN build rules TODO. Add a simple go tool (ported from Marl) to diff two benchmarks. Less noisy than the one provided by google benchmark. Bug: tint:1378 Change-Id: I73cf92c5d9fd2d3bfac8f264864fd774afbd5d01 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/76840 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
committed by
Tint LUCI CQ
parent
dcb24cea41
commit
be2362b18c
@@ -56,13 +56,7 @@ bool ReadFile(const std::string& input_file, std::vector<T>* buffer) {
|
||||
}
|
||||
|
||||
fseek(file, 0, SEEK_END);
|
||||
auto tell_file_size = ftell(file);
|
||||
if (tell_file_size <= 0) {
|
||||
std::cerr << "Input file of incorrect size: " << input_file << std::endl;
|
||||
fclose(file);
|
||||
return {};
|
||||
}
|
||||
const auto file_size = static_cast<size_t>(tell_file_size);
|
||||
const auto file_size = static_cast<size_t>(ftell(file));
|
||||
if (0 != (file_size % sizeof(T))) {
|
||||
std::cerr << "File " << input_file
|
||||
<< " does not contain an integral number of objects: "
|
||||
|
||||
Reference in New Issue
Block a user