diff --git a/benchmarks/benchmark_utils.hpp b/benchmarks/benchmark_utils.hpp index 6098cbe..1f0cfd6 100644 --- a/benchmarks/benchmark_utils.hpp +++ b/benchmarks/benchmark_utils.hpp @@ -57,10 +57,10 @@ static void benchmark_cosf(benchmark::State &state) { reinterpret_cast(backend.allocate_memory(N * sizeof(float))); float *c = reinterpret_cast(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(end - start) @@ -96,7 +96,7 @@ static void benchmark_sincosf(benchmark::State &state) { float *c = reinterpret_cast(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"] = diff --git a/include/trigdx/interface.hpp b/include/trigdx/interface.hpp index b75fed9..414caa6 100644 --- a/include/trigdx/interface.hpp +++ b/include/trigdx/interface.hpp @@ -12,7 +12,7 @@ public: virtual void init(size_t n = 0) {} virtual void *allocate_memory(size_t bytes) const { - return static_cast(new uint8_t[bytes]); + return static_cast(new uint8_t[bytes]); }; virtual void free_memory(void *ptr) const { delete[] ptr; };