24 #ifndef ACLUTILITIES_H
25 #define ACLUTILITIES_H
27 #include "aslUtilities.h"
28 #include "Kernels/aclKernelConfiguration.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>();
ACL Kernel configuration class.
const KernelConfiguration KERNEL_BASIC
std::string numToStr(T i)
Converts numbers or another type to string.
Advanced Computational Language.
std::shared_ptr< cl::CommandQueue > CommandQueue
bool compatible(unsigned int size1, CommandQueue queue1, unsigned int size2, CommandQueue queue2)
constexpr const TypeID typeToTypeID()
bool onSameDevice(CommandQueue queue1, CommandQueue queue2)
checks whether both elements reside on the same device
constexpr const TypeID typeToTypeID< cl_int >()
unsigned int paddingBytes(unsigned int size, unsigned int typeSize, CommandQueue queue)
Adds padding in bytes based on the device's alignment.
constexpr const TypeID typeToTypeID< cl_uint >()
unsigned int paddingElements(unsigned int size, const KernelConfiguration &kernelConfig)
Adds padding in elements based on vector width.
bool isDeclarable(Element e)
constexpr const TypeID typeToTypeID< cl_float >()
const std::string & typeToStr()
bool compatibleSizes(unsigned int s, const VectorOfElements &a)
constexpr const TypeID typeToTypeID< cl_long >()
bool isArgument(Element e)
void addElementToKernelSource(Element e, std::vector< Element > &arguments, std::vector< Element > &localDeclarations)
adds e either to arguments or to localDeclarations
constexpr const TypeID typeToTypeID< cl_double >()
std::shared_ptr< ElementBase > Element
The OpenCL C++ bindings are defined within this namespace.