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:
copilot-swe-agent[bot]
2025-10-29 16:26:27 +00:00
parent 3addf2b05e
commit 807b9d5284
2 changed files with 6 additions and 3 deletions

View File

@@ -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)