Go to the documentation of this file.
18 #ifndef __itkOpenCLDevice_h
19 #define __itkOpenCLDevice_h
84 Accelerator = ( 1 << 3 ),
95 bool IsNull()
const {
return this->m_Id == 0; }
315 NotSupported = 0x0000,
317 InfinityNaN = 0x0002,
318 RoundNearest = 0x0004,
320 RoundInfinity = 0x0010,
321 FusedMultiplyAdd = 0x0020
509 template<
typename charT,
typename traits >
511 std::basic_ostream< charT, traits > &
512 operator<<( std::basic_ostream< charT, traits > & strm,
517 strm <<
"OpenCLDevice(null)";
521 const char indent =
' ';
523 strm <<
"OpenCLDevice" << std::endl
524 << indent <<
"Id: " << device.
GetDeviceId() << std::endl;
526 strm << indent <<
"OpenCL version: ";
530 strm <<
"1.0";
break;
532 strm <<
"1.1";
break;
534 strm <<
"1.2";
break;
536 strm <<
"2.0";
break;
538 strm <<
"2.1";
break;
540 strm <<
"Unknown";
break;
543 strm << std::endl << indent <<
"Version: " << device.
GetVersion() << std::endl;
545 strm << indent <<
"Device type: ";
549 strm <<
"Default";
break;
551 strm <<
"CPU";
break;
553 strm <<
"GPU";
break;
555 strm <<
"Accelerator";
break;
557 strm <<
"All";
break;
559 strm <<
"Unknown";
break;
563 strm << std::endl << indent <<
"Vendor Id: " << device.
GetVendorId() << std::endl
564 << indent <<
"Available: " << ( device.
IsAvailable() ?
"Yes" :
"No" ) << std::endl
565 << indent <<
"Has compiler: " << ( device.
HasCompiler() ?
"Yes" :
"No" ) << std::endl
566 << indent <<
"Has native kernels: " << ( device.
HasNativeKernels() ?
"Yes" :
"No" ) << std::endl
567 << indent <<
"Has out of order execution: " << ( device.
HasOutOfOrderExecution() ?
"Yes" :
"No" ) << std::endl
568 << indent <<
"Has double: " << ( device.
HasDouble() ?
"Yes" :
"No" ) << std::endl
569 << indent <<
"Has half float: " << ( device.
HasHalfFloat() ?
"Yes" :
"No" ) << std::endl
571 << indent <<
"Has unified memory: " << ( device.
HasUnifiedMemory() ?
"Yes" :
"No" ) << std::endl
572 << indent <<
"Compute units: " << device.
GetComputeUnits() << std::endl
574 << indent <<
"Address bits: " << device.
GetAddressBits() << std::endl;
576 strm << indent <<
"Byte order: ";
580 strm <<
"Big Endian";
break;
582 strm <<
"Little Endian";
break;
584 strm <<
"Unknown";
break;
593 strm << indent <<
"Has image 2D: " << ( hasImage2D ?
"Yes" :
"No" ) << std::endl;
601 strm << indent <<
"Has image 3D: " << ( hasImage3D ?
"Yes" :
"No" ) << std::endl;
607 strm << indent <<
"Has writable image 3D: " << ( device.
HasWritableImage3D() ?
"Yes" :
"No" ) << std::endl
628 strm << indent <<
"Float capabilities: ";
632 strm <<
"Not supported";
break;
634 strm <<
"Denorm";
break;
636 strm <<
"Infinity nan";
break;
638 strm <<
"Round nearest";
break;
640 strm <<
"Round zero";
break;
642 strm <<
"Round infinity";
break;
644 strm <<
"Fused multiply add";
break;
646 strm <<
"Unknown";
break;
649 strm << std::endl << indent <<
"Double capabilities: ";
653 strm <<
"Not supported";
break;
655 strm <<
"Denorm";
break;
657 strm <<
"Infinity NaN";
break;
659 strm <<
"Round nearest";
break;
661 strm <<
"Round zero";
break;
663 strm <<
"Round infinity";
break;
665 strm <<
"Fused multiply add";
break;
667 strm <<
"Unknown";
break;
670 strm << std::endl << indent <<
"Half float capabilities: ";
674 strm <<
"Not supported";
break;
676 strm <<
"Denorm";
break;
678 strm <<
"Infinity NaN";
break;
680 strm <<
"Round nearest";
break;
682 strm <<
"Round zero";
break;
684 strm <<
"Round infinity";
break;
686 strm <<
"Fused multiply add";
break;
688 strm <<
"Unknown";
break;
695 strm << indent <<
"Global memory cache type: ";
699 strm <<
"No cache";
break;
701 strm <<
"Read only cache";
break;
703 strm <<
"Read write cache";
break;
705 strm <<
"Unknown";
break;
711 << indent <<
"Local memory separated: " << ( device.
IsLocalMemorySeparate() ?
"Yes" :
"No" ) << std::endl
717 << indent <<
"Full profile: " << ( device.
IsFullProfile() ?
"Yes" :
"No" ) << std::endl
718 << indent <<
"Embedded profile: " << ( device.
IsEmbeddedProfile() ?
"Yes" :
"No" ) << std::endl
719 << indent <<
"Profile: " << device.
GetProfile() << std::endl
721 << indent <<
"Name: " << device.
GetName() << std::endl
722 << indent <<
"Vendor: " << device.
GetVendor() << std::endl
725 const std::list< std::string > extensions = device.
GetExtensions();
726 const std::size_t extensionsSize = extensions.size();
727 strm << indent <<
"Extensions(" << extensionsSize <<
"): ";
728 if( extensionsSize == 0 )
735 for( std::list< std::string >::const_iterator it = extensions.begin(); it != extensions.end(); ++it )
737 strm << indent << indent <<
"- " << *it << std::endl;
std::vcl_size_t GetMaximumParameterBytes() const
OpenCLSize GetMaximumImage3DSize() const
bool ITKOpenCL_EXPORT operator!=(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)
OpenCLDevice::DeviceType GetDeviceType() const
The OpenCLDevice class represents the collection of OpenCL devices to be used by the host.
bool IsFullProfile() const
unsigned long GetMaximumAllocationSize() const
unsigned int GetComputeUnits() const
cl_device_id GetDeviceId() const
static std::list< OpenCLDevice > GetDevices(const OpenCLDevice::DeviceType types, const OpenCLPlatform &platform=OpenCLPlatform())
unsigned int GetPreferredDoubleVectorSize() const
bool IsEmbeddedProfile() const
std::vcl_size_t GetMaximumWorkItemsPerGroup() const
bool IsLocalMemorySeparate() const
unsigned long GetLocalMemorySize() const
bool HasErrorCorrectingMemory() const
OpenCLDevice(cl_device_id id)
std::string GetVersion() const
unsigned long GetGlobalMemorySize() const
unsigned int GetPreferredLongVectorSize() const
unsigned int GetNativeCharVectorSize() const
unsigned int GetMaximumWriteImages() const
static OpenCLDevice GetMaximumFlopsDevice(const OpenCLDevice::DeviceType type)
unsigned int GetPreferredHalfFloatVectorSize() const
unsigned int GetPreferredFloatVectorSize() const
unsigned int GetMaximumSamplers() const
unsigned long GetMaximumConstantBufferSize() const
OpenCLDevice::Endian GetByteOrder() const
unsigned int GetNativeFloatVectorSize() const
unsigned int GetGlobalMemoryCacheLineSize() const
FloatCapability GetFloatCapabilities() const
static OpenCLDevice GetMaximumFlopsDeviceByPlatform(const OpenCLDevice::DeviceType types, const OpenCLPlatform &platform=OpenCLPlatform())
static std::list< OpenCLDevice > GetMaximumFlopsDevices(const OpenCLDevice::DeviceType type, const OpenCLPlatform &platform=OpenCLPlatform())
unsigned int GetDefaultAlignment() const
std::string GetProfile() const
bool HasExtension(const std::string &name) const
unsigned int GetNativeShortVectorSize() const
OpenCLSize GetMaximumImage2DSize() const
unsigned int GetMinimumAlignment() const
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &strm, const OpenCLCommandQueue &queue)
unsigned int GetNativeHalfFloatVectorSize() const
unsigned int GetVendorId() const
FloatCapability GetHalfFloatCapabilities() const
std::string GetLanguageVersion() const
bool HasNativeKernels() const
FloatCapability GetDoubleCapabilities() const
static std::list< OpenCLDevice > GetDevices(const OpenCLDevice::DeviceType type, const OpenCLPlatform::VendorType vendor)
unsigned long GetGlobalMemoryCacheSize() const
static OpenCLDevice GetMaximumFlopsDevice(const std::list< OpenCLDevice > &devices, const OpenCLDevice::DeviceType type)
bool ITKOpenCL_EXPORT operator==(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)
unsigned int GetNativeIntVectorSize() const
std::string GetName() const
unsigned int GetNativeLongVectorSize() const
bool HasWritableImage3D() const
CacheType GetGlobalMemoryCacheType() const
static std::list< OpenCLDevice > GetAllDevices()
unsigned int GetPreferredCharVectorSize() const
unsigned int GetPreferredIntVectorSize() const
The OpenCLSize class defines the size of an item of work for an OpenCL kernel.
unsigned int GetNativeDoubleVectorSize() const
OpenCLSize GetMaximumWorkItemSize() const
unsigned int GetMaximumConstantArguments() const
bool HasHalfFloat() const
OpenCLVersion GetOpenCLVersion() const
unsigned int GetPreferredShortVectorSize() const
bool HasOutOfOrderExecution() const
unsigned int GetClockFrequency() const
bool HasUnifiedMemory() const
std::string GetVendor() const
unsigned int GetMaximumReadImages() const
unsigned int GetAddressBits() const
std::list< std::string > GetExtensions() const
OpenCLPlatform GetPlatform() const
std::string GetDriverVersion() const
std::vcl_size_t GetProfilingTimerResolution() const
static OpenCLDevice GetMaximumFlopsDeviceByVendor(const OpenCLDevice::DeviceType type, const OpenCLPlatform::VendorType vendor)
Generated on OURCE_DATE_EPOCH for elastix by 1.8.18 |
|