Skip to content

Add benchmarks for geometry transformations (rot, flip, transpose) - #525

Draft
sdebionne wants to merge 320 commits into
boostorg:benchmarkfrom
sdebionne:add-benchmark-geom-xform
Draft

Add benchmarks for geometry transformations (rot, flip, transpose)#525
sdebionne wants to merge 320 commits into
boostorg:benchmarkfrom
sdebionne:add-benchmark-geom-xform

Conversation

@sdebionne

@sdebionne sdebionne commented Oct 20, 2020

Copy link
Copy Markdown
Contributor

Description

Add benchmarks for geometry transformations with additional benchmarks for reference libraries such as OpenCV, IPP or Blaze for the transpose transformation.

References

Preliminary results were discussed on Slack

Tasklist

  • Add test case(s)
  • Ensure all CI builds pass
  • Review and approve

@mloskot mloskot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very good to me.

Is this still draft or shall I merge or do you prefer to merge yourself?

return res;
});

#if GIL_ENABLE_UNROLLED

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should prefix all our macros with BOOST_GIL_*, see #410

I'd suggest to rename this to BOOST_GIL_BENCHMARK_ENABLE_UNROLLED or similar.

Comment thread benchmark/google/view_transpose_impl.cpp
Comment thread benchmark/google/blaze/view_transpose.cpp
Comment thread benchmark/google/ipp/view_flip.cpp
@mloskot mloskot added cat/performance Performance issues, speed-ups and benchmarks core boost/gil labels Oct 22, 2020
mloskot and others added 27 commits February 5, 2022 14:13
moved numeric/algorithm.hpp into core
moved numeric/channel_numeric_operations.hpp into core
moved numeric/convolve.hpp into core
moved numeric/pixel_numeric_operations.hpp into core
    moved numeric/kernel.hpp into core
If neither <filesystem> nor <experimental/filesystem> is detected,
then require <boost/filesystem.hpp>.

If user defines BOOST_GIL_IO_USE_BOOST_FILESYSTEM macro,
then <boost/filesystem.hpp> is pre-selected and required,
and search for any of the C++ standard implementation is skipped.

Remove end-user macro BOOST_GIL_IO_ADD_FS_PATH_SUPPORT
Require tests to always build with support of either
detected C++ filesystem or pre-selected Boost.Filesystem.

Closes #boostorg#222
Fix for_each_pixel for non 1d iterable views
boostorg#640)

* Replace Ubuntu 16.04 with Ubuntu 18.04 in GitHub Actions

Ubuntu 16.04 is no longer available for GitHub Actions,
because support for it has ended. Some older Clang versions
seem to be unavailable in the APT repostiry, so those are not
changed to 18.04 by intention.

* Replace Ubuntu 16.04 with Ubuntu 18.04 in Azure Pipelines
The name of the clang-9 package was missing,
so it was not installed.
The image macOS-10.14 is not available anymore, but macOS-10.15
is still available.
…rg#644)

Windows 2016 has been retired in March 2022, so it's not available
anymore. For further information on that see
<actions/runner-images#4312>.

However, we can test on the newer Windows 2022 image instead.
This also brings Visual Studio 2022.
This should work around the Internal Compiler Error
due to std::vector<std::vector<bool>>, see
boostorg#645
This is workaround for clang issue with cxxstd=2a:
  error: no member named 'is_constant_evaluated' in namespace 'std'
See boostorg#621 (comment)
harshitpant1 and others added 29 commits September 2, 2026 22:15
Uses the clang-format configuration provided in the latest commit of PR boostorg#596. Formatting is applied to test file and example file as well. I have made no changes whatsoever after using the clang-format.
…interface

Fix missing Boost::stl_interfaces dependency in CMakeLists.txt
…t-overflow

Fix integer overflow in channel_converter_unsigned_integral_nondivisible
…ansform

Add distance transform functionality
Convert all prose documentation under doc/ to AsciiDoc pages built with
Antora, following the boostorg/redis and boostorg/url convention
(antora.yml, nav.adoc, build_antora.sh, package.json). Fix two
pre-existing navigation gaps in the process: the contrast_enhancement
pages that were unreachable from the old toctree, and the duplicated
histogram/extension inclusion.

The C++ API reference stays Doxygen-generated for now and is linked in
via modules/ROOT/pages/reference.adoc: MrDocs 0.8.0 segfaults on most
of GIL's CRTP-based pixel/image/iterator/locator headers, so a
MrDocs-native reference (mrdocs.yml is prepared but not wired into
antora.yml) is blocked on an upstream fix.

Update the docs CI actions and pixi.toml's new `docs` environment
(Node.js + Doxygen) accordingly, and remove the old Sphinx toolchain
files.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace the interim Doxygen reference (see previous commit) with a real
MrDocs-generated one, now that the upstream segfault blocking it is fixed
(verified against a fixed MrDocs dev build against all 49 previously-crashing
GIL headers, and against the full public API: 6796 declarations, 5662 pages).

- doc/mrdocs-src/all.cpp: the single translation unit MrDocs extracts from --
  core + concepts + image_processing + the dynamic_image/toolbox/numeric/
  histogram extensions + the generic io layer. Deliberately excludes
  extension/io/{jpeg,png,tiff,bmp,pnm,raw}, which need the matching external
  image libraries just to parse.
- doc/mrdocs.yml: scoped to that same surface; compilation-database is
  generated by build_antora.sh since it needs $BOOST_SRC_DIR baked in.
- antora.yml: ext.cppReference wired in (camelCase -- the extension doesn't
  read the kebab-case key the public docs guide shows).
- reference.adoc: rewritten from the Doxygen stopgap to a curated table of
  xref:reference:boost/gil/<Symbol>.adoc[] links, grouped by the categories
  the old doc/reference.dox Doxygen-group taxonomy used (that taxonomy has
  no equivalent in MrDocs' output, which groups by namespace/file instead).
- design/*.adoc: the ~45 concept deep-links that used to point at Doxygen
  HTML now point at the real MrDocs reference pages instead.
- doxyfile, reference.dox, header.html, footer.html, doxygen-boost.css:
  removed, no longer needed.
- local-playbook.yml: failure_level set to `fatal` rather than `error` --
  some MrDocs-generated pages (e.g. packed_pixel) link to private-member
  sub-pages (`_bitfield`) that MrDocs doesn't actually emit regardless of
  extract-private; cosmetic, worth another small upstream report, but not
  worth hard-failing the build over.
- .gitignore: `/doc/*build*` was accidentally also matching and silently
  untracking doc/build_antora.sh this whole time (the same trap the
  pre-existing `!build.jam` exception below it was clearly added for
  before); narrowed to `/doc/build/`, and doc/build_antora.sh is now
  actually tracked.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
setup-boost's `cp -r $GITHUB_WORKSPACE/* libs/gil` (into ../boost-root)
drops .git (cp -r with a glob doesn't match dotfiles), but
local-playbook.yml's Antora content source (`url: ..`) requires a real
git repository. Found via the docs-ci-smoke test branch:

  FATAL (antora): Local content source must be a git repository:
  /home/runner/work/gil/boost-root/libs/gil (url: ..)

Run the build from the original checkout instead (which does have .git),
and only use ../boost-root for BOOST_SRC_DIR (MrDocs' cross-library
header resolution), matching how boostorg/url and boostorg/redis's CI
scripts keep those two concerns separate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add libs/gil/pixi.toml -- a self-contained `docs` environment (Node, a C++
compiler, and MrDocs from the sdebionne/label/esrf-bcu channel, which
repackages a fixed MrDocs dev build until the upstream segfault fix ships
in an official release) -- so `pixi run -e docs docs-build` is a fully
self-contained one-command local build.

build_antora.sh now auto-detects a pixi/conda-provided MrDocs via
CONDA_PREFIX when MRDOCS_ROOT isn't already set, instead of falling
through to the antora-cpp-reference-extension's auto-download (which
currently fetches the still-broken official release).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
docs-prerequisites now sets up the pixi `docs` environment instead of a
plain Node install, and generate-doc runs the build through `pixi run -e
docs docs-build`. Without this, a real push to develop/master would still
hit the antora-cpp-reference-extension's auto-download of the official
MrDocs release, which segfaults on GIL's headers -- validated end-to-end
on the docs-ci-smoke test branch first.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
docs: migrate from Sphinx/RST/Doxygen to Antora/AsciiDoc
This commit adds support for benchmark definition and running, currently supporting only cmake. Configuration was tested using GIL_USE_CONAN on, on Windows. One benchmark set was run successfully
The commit adds celero into conanfile and cmakelists, also provides one incorrectly implemented benchmark, which shows results that are completely inconsistent with google-benchmark
This commit adds a guide on how to write, build and execute benchmarks with supported frameworks (google-benchmark, celero). It also changes celero benchmark to crash instead of outputting wrong results.
This way we have a bit more control on release of dependencies what solves
some annoying issues (e.g. Conan is missing latest Celero fixed for VS2019).
Benchmark of various pixel iteration and access methods for
a contiguous images composed of homogeneous pixels with single
8-bit integer channel (grayscale).
@sdebionne
sdebionne force-pushed the add-benchmark-geom-xform branch from 50eefb4 to 7b90f75 Compare September 3, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat/performance Performance issues, speed-ups and benchmarks core boost/gil

Projects

None yet

Development

Successfully merging this pull request may close these issues.