fixes
This commit is contained in:
@@ -3640,7 +3640,7 @@ static void getDevices(std::vector<cl_device_id>& devices,cl_platform_id& platfo
|
||||
devices.resize(numDevices);
|
||||
}
|
||||
|
||||
struct PlatformInform::Impl
|
||||
struct PlatformInfo2::Impl
|
||||
{
|
||||
Impl(void* id)
|
||||
{
|
||||
@@ -3661,45 +3661,45 @@ struct PlatformInform::Impl
|
||||
cl_platform_id handle;
|
||||
};
|
||||
|
||||
PlatformInform::PlatformInform()
|
||||
PlatformInfo2::PlatformInfo2()
|
||||
{
|
||||
p = 0;
|
||||
}
|
||||
|
||||
PlatformInform::PlatformInform(void* platform_id)
|
||||
PlatformInfo2::PlatformInfo2(void* platform_id)
|
||||
{
|
||||
p = new Impl(platform_id);
|
||||
}
|
||||
|
||||
PlatformInform::~PlatformInform()
|
||||
PlatformInfo2::~PlatformInfo2()
|
||||
{
|
||||
if(p)
|
||||
p->release();
|
||||
}
|
||||
|
||||
int PlatformInform::deviceNumber() const
|
||||
int PlatformInfo2::deviceNumber() const
|
||||
{
|
||||
return p ? (int)p->devices.size() : 0;
|
||||
}
|
||||
|
||||
void PlatformInform::getDevice(Device& device, int d) const
|
||||
void PlatformInfo2::getDevice(Device& device, int d) const
|
||||
{
|
||||
CV_Assert(d < (int)p->devices.size() );
|
||||
if(p)
|
||||
device.set(p->devices[d]);
|
||||
}
|
||||
|
||||
String PlatformInform::name() const
|
||||
String PlatformInfo2::name() const
|
||||
{
|
||||
return p ? p->getStrProp(CL_PLATFORM_NAME) : String();
|
||||
}
|
||||
|
||||
String PlatformInform::vendor() const
|
||||
String PlatformInfo2::vendor() const
|
||||
{
|
||||
return p ? p->getStrProp(CL_PLATFORM_VENDOR) : String();
|
||||
}
|
||||
|
||||
String PlatformInform::version() const
|
||||
String PlatformInfo2::version() const
|
||||
{
|
||||
return p ? p->getStrProp(CL_PLATFORM_VERSION) : String();
|
||||
}
|
||||
@@ -3718,13 +3718,13 @@ static void getPlatforms(std::vector<cl_platform_id>& platforms)
|
||||
platforms.resize(numPlatforms);
|
||||
}
|
||||
|
||||
void getPlatfomsInfo(std::vector<PlatformInform>& platformsInfo)
|
||||
void getPlatfomsInfo(std::vector<PlatformInfo2>& platformsInfo)
|
||||
{
|
||||
std::vector<cl_platform_id> platforms;
|
||||
getPlatforms(platforms);
|
||||
for (size_t i = 0; i < platforms.size(); i++)
|
||||
{
|
||||
platformsInfo.push_back( PlatformInform((void*)&platforms[i]) );
|
||||
platformsInfo.push_back( PlatformInfo2((void*)&platforms[i]) );
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user