CLOGS
C++ library for sorting and searching in OpenCL applications
|
Encapsulation of an OpenCL built-in type that can be stored in a buffer. More...
#include <core.h>
Public Member Functions | |
Type () | |
Default constructor, creating the void type. | |
Type (BaseType baseType, unsigned int length=1) | |
Constructor. More... | |
bool | isStorable (const cl::Device &device) const |
Whether the type can be stored in a buffer and read/written in a CL C program using the assignment operator. | |
bool | isComputable (const cl::Device &device) const |
Whether the type can be used in expressions. | |
bool | isIntegral () const |
True if the type stores integer values. | |
bool | isSigned () const |
True if the type is signed. | |
std::string | getName () const |
Name of the CL C type. | |
::size_t | getSize () const |
Size in bytes of the C API form of the type (0 for void) | |
::size_t | getBaseSize () const |
Size in bytes of the scalar elements (0 for void) | |
BaseType | getBaseType () const |
The scalar element type. | |
unsigned int | getLength () const |
The vector length (1 for scalars, 0 for void). | |
Static Public Member Functions | |
static std::vector< Type > | allTypes () |
Returns a list of all supported types. | |
Encapsulation of an OpenCL built-in type that can be stored in a buffer.
An instance of this class can represent either a scalar, a vector, or the void
type.
clogs::Type::Type | ( | BaseType | baseType, |
unsigned int | length = 1 |
||
) |