mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-10-28 23:21:27 +01:00
FastPedestal + optimizations in the cluster finder (#341)
Optimized pedestal tracking with FastPedestal and performance improvements to the cluster finder. - ~2x faster hitting 14k FPS on benchmark dataset on 16 core threadripper pro **Changes** - No bounds check on interior of frame. (only within half of a cluster) (~15% improvement) - Cache threshold (std*n_rms) Biggest improvement comes from not computing std for each access - Cache pedestal subtracted frame - Switched to FastPedestal which assumes we reached steady state **Things tried but rejected:** - Always store cluster values, commit on val==max (~15% drop in frame rate) **Options** - using 16 bit clusters and 16 bit pedestal. (slows down the single threaded case but allow us to reach 12k with multi threading) **Other notes on performance** - Passing in memory frames from python and doing nothing: 0.8us/frame - Passing + pedestal subtraction: 28us/frame - Passing + pedestal + cluster finding (no store): 652us/frame - Passing + pedestal + cluster finding: 886 us/frame
This commit is contained in:
1 parent
568f94926b
commit
eddb919328
44 files changed
+2220
-320
No files matched your search
@@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
#include "aare/ClusterVector.hpp"
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
|
||||
#include <catch2/catch_all.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
@@ -21,6 +22,29 @@ TEST_CASE("After pushing back one element the ClusterVector is not empty") {
|
||||
REQUIRE(!cv.empty());
|
||||
}
|
||||
|
||||
TEST_CASE("ClusterVector move constructor preserves contents") {
|
||||
ClusterVector<C1> source(4, 42);
|
||||
source.push_back(C1{1, 2, {3, 4, 5, 6}});
|
||||
|
||||
ClusterVector<C1> moved(std::move(source));
|
||||
|
||||
REQUIRE(moved.size() == 1);
|
||||
CHECK(moved.frame_number() == 42);
|
||||
CHECK(moved[0].data[3] == 6);
|
||||
}
|
||||
|
||||
TEST_CASE("ClusterVector move assignment preserves contents") {
|
||||
ClusterVector<C1> source(4, 42);
|
||||
source.push_back(C1{1, 2, {3, 4, 5, 6}});
|
||||
ClusterVector<C1> moved(1);
|
||||
|
||||
moved = std::move(source);
|
||||
|
||||
REQUIRE(moved.size() == 1);
|
||||
CHECK(moved.frame_number() == 42);
|
||||
CHECK(moved[0].data[3] == 6);
|
||||
}
|
||||
|
||||
TEST_CASE("item_size return the size of the cluster stored") {
|
||||
ClusterVector<C1> cv(4);
|
||||
CHECK(cv.item_size() == sizeof(C1));
|
||||
@@ -275,4 +299,4 @@ TEST_CASE("Gain Map Calculation Index Map") {
|
||||
|
||||
CHECK(index_map_x == clustertestdata.index_map_x);
|
||||
CHECK(index_map_y == clustertestdata.index_map_y);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user