1 #include "cheetah/data/test_utils/DmTimeDmTest.h" 2 #include "cheetah/data/test_utils/DmTrialsGeneratorUtil.h" 3 #include "cheetah/data/DmTime.h" 4 #include "cheetah/data/DmTrialsMetadata.h" 5 #include "cheetah/data/DmTrials.h" 6 #include "cheetah/data/TimeSeries.h" 14 DmTimeDmTest::DmTimeDmTest()
19 DmTimeDmTest::~DmTimeDmTest()
24 void DmTimeDmTest::SetUp()
28 void DmTimeDmTest::TearDown()
32 template <
typename Arch>
35 static void test(std::size_t nblocks, std::size_t samps_per_block, std::size_t timeseries_length)
38 typedef typename DmTrialsType::TimeType TimeType;
39 typedef typename DmTrialsType::DmType Dm;
43 for (
int block=0; block<nblocks; ++block)
45 buffer->add(trials_generator.generate(TimeType(0.000064*data::seconds),samps_per_block,3));
47 ASSERT_EQ(buffer->blocks().size(),nblocks);
48 auto slice = *(buffer->begin(2));
49 auto const& dm = *(slice->begin());
50 auto end = dm.copy_to(timeseries);
51 std::size_t diff = std::distance(timeseries.
begin(),end);
52 ASSERT_EQ(diff,std::min(nblocks*samps_per_block,timeseries.
size()));
Some limits and constants for FLDO.
ConstIterator begin() const
Iterators to device memory.
Class for time series data.
std::size_t size() const
the size of the series
A continuous memory container for dispersion measure trials of varying downsamplings.
A wrapper class for a list of DmTime instances.