24 #ifndef ACLUTILITIES_H 25 #define ACLUTILITIES_H 43 typedef std::shared_ptr<ElementBase>
Element;
62 unsigned int typeSize,
80 std::vector<Element> & arguments,
81 std::vector<Element> & localDeclarations);
83 template <
typename T>
const std::string&
typeToStr();
84 template <
typename T>
inline const std::string
typeToStr(
unsigned int i);
92 return (s1 == s2 || (s1 * s2) == 0);
120 template <
typename T>
inline const std::string
typeToStr(
unsigned int i)
123 return typeToStr<T>();
130 #endif // ACLUTILITIES_H constexpr const TypeID typeToTypeID< cl_long >()
bool isDeclarable(Element e)
Advanced Computational Language.
The OpenCL C++ bindings are defined within this namespace.
constexpr const TypeID typeToTypeID< cl_int >()
std::string numToStr(T i)
Converts numbers or another type to string.
constexpr const TypeID typeToTypeID< cl_float >()
std::shared_ptr< cl::CommandQueue > CommandQueue
constexpr const TypeID typeToTypeID< cl_uint >()
void addElementToKernelSource(Element e, std::vector< Element > &arguments, std::vector< Element > &localDeclarations)
adds e either to arguments or to localDeclarations
unsigned int paddingElements(unsigned int size, const KernelConfiguration &kernelConfig)
Adds padding in elements based on vector width.
const std::string & typeToStr()
bool onSameDevice(CommandQueue queue1, CommandQueue queue2)
checks whether both elements reside on the same device
unsigned int paddingBytes(unsigned int size, unsigned int typeSize, CommandQueue queue)
Adds padding in bytes based on the device's alignment.
ACL Kernel configuration class.
bool compatibleSizes(unsigned int s, const VectorOfElements &a)
bool compatible(unsigned int size1, CommandQueue queue1, unsigned int size2, CommandQueue queue2)
std::shared_ptr< ElementBase > Element
constexpr const TypeID typeToTypeID()
const KernelConfiguration KERNEL_BASIC
bool isArgument(Element e)
constexpr const TypeID typeToTypeID< cl_double >()