Apply formatting

This commit is contained in:
Bram Veenboer
2025-09-02 16:26:59 +02:00
parent a1f2dd6c4d
commit 2c2a59d6d6
2 changed files with 6 additions and 6 deletions

View File

@@ -57,10 +57,10 @@ static void benchmark_cosf(benchmark::State &state) {
reinterpret_cast<float *>(backend.allocate_memory(N * sizeof(float)));
float *c =
reinterpret_cast<float *>(backend.allocate_memory(N * sizeof(float)));
if (!x || !c) {
throw std::runtime_error("Buffer allocation failed");
}
if (!x || !c) {
throw std::runtime_error("Buffer allocation failed");
}
auto end = std::chrono::high_resolution_clock::now();
state.counters["init_ms"] =
std::chrono::duration_cast<std::chrono::microseconds>(end - start)
@@ -96,7 +96,7 @@ static void benchmark_sincosf(benchmark::State &state) {
float *c =
reinterpret_cast<float *>(backend.allocate_memory(N * sizeof(float)));
if (!x || !s || !c) {
throw std::runtime_error("Buffer allocation failed");
throw std::runtime_error("Buffer allocation failed");
}
auto end = std::chrono::high_resolution_clock::now();
state.counters["init_ms"] =

View File

@@ -12,7 +12,7 @@ public:
virtual void init(size_t n = 0) {}
virtual void *allocate_memory(size_t bytes) const {
return static_cast<void*>(new uint8_t[bytes]);
return static_cast<void *>(new uint8_t[bytes]);
};
virtual void free_memory(void *ptr) const { delete[] ptr; };