Fix dx4 calculation in scalar remainder code and add null checks
- Fix dx4 computation in scalar remainder loops (should be dx2*dx2) - Add missing null pointer check in benchmark_sinf for consistency Co-authored-by: wvbbreu <185333235+wvbbreu@users.noreply.github.com>
This commit is contained in:
@@ -26,6 +26,9 @@ static void benchmark_sinf(benchmark::State &state) {
|
||||
reinterpret_cast<float *>(backend.allocate_memory(N * sizeof(float)));
|
||||
float *s =
|
||||
reinterpret_cast<float *>(backend.allocate_memory(N * sizeof(float)));
|
||||
if (!x || !s) {
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user