mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Fix OpenCL test if the OpenCL Platform is not ready
This commit is contained in:
parent
9318fe540d
commit
de79147def
@ -144,6 +144,12 @@ public:
|
||||
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
inline bool opencl_ready() const
|
||||
{
|
||||
bool ready = this->acquisition_cc_->opencl_ready();
|
||||
return ready;
|
||||
}
|
||||
|
||||
private:
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_opencl_acquisition_cc_sptr acquisition_cc_;
|
||||
|
@ -222,7 +222,6 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
@ -258,6 +257,16 @@ public:
|
||||
d_doppler_step = doppler_step;
|
||||
}
|
||||
|
||||
inline bool opencl_ready() const
|
||||
{
|
||||
bool ready = false;
|
||||
if (d_opencl == 0)
|
||||
{
|
||||
ready = true;
|
||||
}
|
||||
return ready;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
||||
*/
|
||||
|
@ -494,6 +494,12 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ValidationOfResults)
|
||||
|
||||
acquisition->init();
|
||||
|
||||
if (!acquisition->opencl_ready())
|
||||
{
|
||||
std::cout << "OpenCL Platform is not ready." << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT_NO_THROW({
|
||||
boost::shared_ptr<GenSignalSource> signal_source;
|
||||
SignalGenerator* signal_generator = new SignalGenerator(config.get(), "SignalSource", 0, 1, queue);
|
||||
@ -541,6 +547,7 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
|
||||
@ -575,7 +582,12 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ValidationOfResultsProbabilitie
|
||||
}) << "Failure connecting acquisition to the top_block.";
|
||||
|
||||
acquisition->init();
|
||||
|
||||
if (!acquisition->opencl_ready())
|
||||
{
|
||||
std::cout << "OpenCL Platform is not ready." << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT_NO_THROW({
|
||||
boost::shared_ptr<GenSignalSource> signal_source;
|
||||
SignalGenerator* signal_generator = new SignalGenerator(config.get(), "SignalSource", 0, 1, queue);
|
||||
@ -624,3 +636,4 @@ TEST_F(GpsL1CaPcpsOpenClAcquisitionGSoC2013Test, ValidationOfResultsProbabilitie
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user