24 #ifndef SKA_CHEETAH_SPS_TEST_SPSTESTER_H 25 #define SKA_CHEETAH_SPS_TEST_SPSTESTER_H 27 #include "cheetah/sps/Sps.h" 28 #include "cheetah/utils/test_utils/AlgorithmTester.h" 29 #include "panda/ResourcePool.h" 30 #include "panda/test/TestResourcePool.h" 31 #include <gtest/gtest.h> 34 #include <condition_variable> 71 template<
typename ArchitectureTag,
typename ArchitectureCapability>
75 typedef ArchitectureTag Arch;
76 typedef typename BaseT::PoolType PoolType;
81 typedef typename SpsTesterTraits<ArchitectureTag, ArchitectureCapability>::PoolType PoolType;
84 TestConfig() : _pool(
nullptr) {}
85 PoolType& pool()
const { assert(_pool);
return *_pool; }
86 void set_pool(PoolType& pool) { _pool = &pool; }
99 Api& api(PoolType& pool);
116 std::shared_ptr<SpType> sp_data()
const;
121 typedef data::DedispersionMeasureType<float> Dm;
122 config.add_dm_range(Dm(0.0 * data::parsec_per_cube_cm)
123 ,Dm(60.0 * data::parsec_per_cube_cm)
124 ,Dm(10.0 * data::parsec_per_cube_cm));
134 std::shared_ptr<DmType> _dm_data;
135 mutable std::deque<std::shared_ptr<SpType>> _sp_data;
136 mutable std::mutex _sp_data_mutex;
137 mutable std::condition_variable _sp_wait;
138 std::size_t _sp_call_count;
140 std::unique_ptr<Api> _api;
143 template <
typename TestTraits>
165 #include "cheetah/sps/test_utils/detail/SpsTester.cpp" 168 #endif // SKA_CHEETAH_SPS_TEST_SPSTESTER_H
bool sp_handler_called() const
return true if the sp_handler has been called
all non-templated options for the sps module
bool wait_sp_handler_called() const
return true if the sp_handler has been called
std::size_t sp_handler_call_count() const
return true if the sp_handler has been called
Single Pulse Search top level interface.
bool dm_handler_called() const
return true if the dm_handler has been called
Some limits and constants for FLDO.
Base class for generic algortihm tests that require an accelerator device.
A continuous memory container for dispersion measure trials of varying downsamplings.