| 299 | |
| 300 | template <int R, int W, int H> |
| 301 | __attribute__((noinline)) static void run_benchmark_blur_only(const char *label, int iters) { |
| 302 | constexpr int N = W * H; |
| 303 | static CRGB px[N]; // static to avoid stack overflow with ASAN |
| 304 | fill_test_data(px, N); // fill once before benchmark |
| 305 | |
| 306 | auto t = bench( |
| 307 | [&]() { |
| 308 | gfx::Canvas<CRGB> c(fl::span<CRGB>(px, N), W, H); |
| 309 | gfx::blurGaussian<R, R>(c); |
| 310 | }, |
| 311 | iters); |
| 312 | |
| 313 | char buf[80]; |
| 314 | fl::snprintf(buf, sizeof(buf), " %s: %d ns/iter", label, |
| 315 | static_cast<int>(t)); |
| 316 | fl::println(buf); |
| 317 | } |
| 318 | |
| 319 | FL_TEST_CASE("blur benchmark") { |
| 320 | // Debug builds use -Og (optimized for debugging) which provides enough |
nothing calls this directly
no test coverage detected