updated gpu accuracy tests
added posibility to specify device on which tests will be executed
This commit is contained in:
@@ -80,14 +80,23 @@ cv::Mat readImageType(const std::string& fname, int type);
|
||||
//! return true if device supports specified feature and gpu module was built with support the feature.
|
||||
bool supportFeature(const cv::gpu::DeviceInfo& info, cv::gpu::FeatureSet feature);
|
||||
|
||||
//! return all devices compatible with current gpu module build.
|
||||
const std::vector<cv::gpu::DeviceInfo>& devices();
|
||||
class DeviceManager
|
||||
{
|
||||
public:
|
||||
static DeviceManager& instance();
|
||||
|
||||
//! return all devices compatible with current gpu module build which support specified feature.
|
||||
std::vector<cv::gpu::DeviceInfo> devices(cv::gpu::FeatureSet feature);
|
||||
void load(int i);
|
||||
void loadAll();
|
||||
|
||||
#define ALL_DEVICES testing::ValuesIn(devices())
|
||||
#define DEVICES(feature) testing::ValuesIn(devices(feature))
|
||||
const std::vector<cv::gpu::DeviceInfo>& values() const { return devices_; }
|
||||
|
||||
private:
|
||||
std::vector<cv::gpu::DeviceInfo> devices_;
|
||||
};
|
||||
|
||||
testing::internal::ParamGenerator<cv::gpu::DeviceInfo> DevicesGenerator_();
|
||||
|
||||
#define ALL_DEVICES DevicesGenerator_()
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Additional assertion
|
||||
|
Reference in New Issue
Block a user