-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve polar extent panning performance
this is nearly a full rewrite of this component - The calculation of the weighting function is vastly simplified -- in most cases it's just a dot product and a couple of comparisons. - There is a parallel (SIMD) implementation of this which operates on multiple points at once. - Processing more than one point at once breaks the interface between the weighting function and the spreading panner, so this is removed. Instead the separation is between a 'core' which calculates some gains based on some internal parameters, the point positions and point gains, and the rest of it which sets up these parameters and post-processes the gains. - There are multiple implementations of the 'core', one for scalars and one for each supported instruction set, and these are chosen at run-time. - If all points in a batch have a gain of 1, a pre-computed sum of all gains in this batch can be added to the result, which makes the performance less dependent on the extent size. - The old implementation is kept as part of the tests as a reference to compare against, because it's known-good and this is hard to test. - The interface is changed to avoid allocation. - Single-precision floats are used instead of doubles for calculating the weights and summing the gains, as the difference in results is negligible.
- Loading branch information
Showing
18 changed files
with
1,326 additions
and
443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
#include <xsimd/types/xsimd_all_registers.hpp> | ||
|
||
namespace xsimd { | ||
// aliases for things which will be used via preprocessor defines, to avoid | ||
// quoting issues | ||
using avx2_fma = fma3<avx2>; | ||
|
||
// a version of generic which works with xsimd::dispatch | ||
struct generic_for_dispatch : generic { | ||
static constexpr bool supported() noexcept { return true; } | ||
static constexpr bool available() noexcept { return true; } | ||
static constexpr bool requires_alignment() noexcept { return false; } | ||
static constexpr unsigned version() noexcept { | ||
return generic::version(0, 0, 0); | ||
} | ||
static constexpr std::size_t alignment() noexcept { return 0; } | ||
static constexpr char const* name() noexcept { | ||
return "generic_for_dispatch"; | ||
} | ||
}; | ||
} // namespace xsimd |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.