18 #ifndef __itkOpenCLPlatform_h 19 #define __itkOpenCLPlatform_h 74 bool IsNull()
const {
return this->m_Id == 0; }
86 std::string GetVersion()
const;
90 bool IsFullProfile()
const;
94 bool IsEmbeddedProfile()
const;
99 std::string GetProfile()
const;
102 std::string GetName()
const;
105 std::string GetVendor()
const;
109 std::string GetExtensionSuffix()
const;
113 std::list< std::string > GetExtensions()
const;
121 bool HasExtension(
const std::string & name )
const;
124 static std::list< OpenCLPlatform > GetAllPlatforms();
146 template<
typename charT,
typename traits >
148 std::basic_ostream< charT, traits > &
149 operator<<( std::basic_ostream< charT, traits > & strm,
152 if( platform.IsNull() )
154 strm <<
"OpenCLPlatform(null)";
158 const char indent =
' ';
160 strm <<
"OpenCLPlatform" << std::endl
161 << indent <<
"Id: " << platform.
GetPlatformId() << std::endl;
163 strm << indent <<
"OpenCL version: ";
164 switch( platform.GetOpenCLVersion() )
167 strm <<
"1.0";
break;
169 strm <<
"1.1";
break;
171 strm <<
"1.2";
break;
173 strm <<
"2.0";
break;
175 strm <<
"Unknown";
break;
178 strm << std::endl << indent <<
"Full profile: " << ( platform.IsFullProfile() ?
"On" :
"Off" ) << std::endl
179 << indent <<
"Embedded profile: " << ( platform.IsEmbeddedProfile() ?
"On" :
"Off" ) << std::endl
180 << indent <<
"Profile: " << platform.GetProfile() << std::endl
181 << indent <<
"Version: " << platform.GetVersion() << std::endl
182 << indent <<
"Name: " << platform.GetName() << std::endl
183 << indent <<
"Vendor: " << platform.GetVendor() << std::endl
184 << indent <<
"Extension suffix: " << platform.GetExtensionSuffix() << std::endl;
186 const std::list< std::string > extensions = platform.GetExtensions();
187 const std::size_t extensionsSize = extensions.size();
188 strm << indent <<
"Extensions(" << extensionsSize <<
"): ";
189 if( extensions.empty() )
196 for( std::list< std::string >::const_iterator it = extensions.begin(); it != extensions.end(); ++it )
198 strm << indent << indent <<
"- " << *it << std::endl;
bool ITKOpenCL_EXPORT operator==(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)
bool ITKOpenCL_EXPORT operator!=(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)