updated gpu accuracy tests

added posibility to specify device on which tests will be executed
This commit is contained in:
Vladislav Vinogradov
2012-08-16 16:23:27 +04:00
parent cfdeb50335
commit ddca47040b
4 changed files with 219 additions and 77 deletions

View File

@@ -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