Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 197 commits into
base: benchmark
Choose a base branch
from

Conversation

sdebionne
Copy link
Contributor

@sdebionne sdebionne commented Oct 20, 2020

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

Copy link
Member

@mloskot mloskot left a comment

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
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.

benchmark/google/view_transpose_impl.cpp Show resolved Hide resolved
benchmark/google/blaze/view_transpose.cpp Show resolved Hide resolved
benchmark/google/ipp/view_flip.cpp Show resolved Hide resolved
@mloskot mloskot added cat/performance Performance issues, speed-ups and benchmarks core boost/gil labels Oct 22, 2020
mloskot and others added 27 commits November 10, 2020 09:14
Both temp_red and max_color are float32_t so the result of the subraction already has the right type.
This should also remove the only dependency on Boost.NumericConversion
The "cxxstd" json field is being added to each Boost library's meta json information for libraries whose minumum C++ standard compilation level is C++11 on up. The value of this field matches one of the values for 'cxxstd' in Boost.Build. The purpose of doing this is to provide information for the Boost website documentation for each library which will specify the minimum C++ standard compilation that an end-user must employ in order to use the particular library. This will aid end-users who want to know if they can successfully use a Boost library based on their C++ compiler's  compilation level, without having to search the library's documentation to find this out. 

https://lists.boost.org/Archives/boost/2020/12/250543.php
…ts (boostorg#542)

If `Element` is a reference, then Element v{} is ill-formed.

Refines boostorg#273 which aimed to correctly value-initialize channel and pixel value members
The output type must be floating point, thus a check was added to make sure it
is the case. Though I had to add specific cases for float32_t as std::is_floating_point does not
consider it a floating point type

The accumulate part was wrong, it multiplied by delta_t on every sum, which is wrong

Use 8 way nabla compute.
This is just different discretization of Laplace operator
https://en.wikipedia.org/wiki/Discrete_Laplace_operator

Laplace stencils are now the same as in mathematical notation

The new function will provide a uniform way to generate stencils
by making sure directions are indexed properly

Add only required stencil points:
The 5 points Laplace stencil is now adding only required points and not assuming that others are zero
A new histogram class proposed with close suport for gil
image constructs.

Shift the stl support implmentation to extension to
serve as example for overloading fill_histogram.

Add cumulative histogram and histogram normalization.

Co-authored-by: debabrata1 <[email protected]>
Co-authored-by: codejaeger <dhabalm1@>
Allow non-equal dims along stack dim
Width can be different in hstack, height can be different in vstack
Add basic GitHub Actions configuration based on mp11
Remove Actions jobs using GCC 4.7 and 4.8 - unsupported compilers
Run b2 with --abbreviate-paths on Windows
The -std=c++1z is broken for clang-4.0 but no need to test it
Add -mbig-obj to GCC on Windows
  - That is to avoid string table overflow and file too big
Define _GLIBCXX_USE_CXX11_ABI=0 for clang 3.5, 3.6, 3.7
  - Should help avoid linker error:
    `undefined reference to std::ios_base::failure::failure(char const*, std::error_code const&)`
Disable certain check in algorithm_channel_relation test for clang<3.8
Support construction from step_size, step_count, and a function for angles

Implement angle and radious version of Hough line transform and adds a demo
with static line that goes over secondary diagonal.

Implement incremental line raster
Implement naive line raster
Implement Bresenham line raster
Leave only Bresenham line rasterization

Naive and incremental algorithms were removed because they are supposed
to produce the same results anyway.
The reason for diverging results is inaccuracy of floating point numbers

Add circle rendering through trigonometric functions, using
arctan(1 / (radius + 1)) as minimal angle step.

Trigonometric circle rasterizer does not follow circle equation, but still
produces very round shapes.
A new testing methodology needs to be devised for this rasterizer.

The new version accepts start and points inclusively and tries to use
canonic representation during computations.

Slope decided to be is (diff_y + 1) / (diff_x + 1).
Most uses of cxxflags are wrong.
Use b2 warnings instead, e.g. warnings=pedantic
marco-langer and others added 19 commits March 16, 2023 21:08
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).
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.