24 #ifndef ACLUTILITIES_H 25 #define ACLUTILITIES_H 27 #include "aslUtilities.h" 28 #include "Kernels/aclKernelConfiguration.h" 39 extern const std::string
INDEX;
48 bool compatible(
unsigned int size1, CommandQueue queue1,
49 unsigned int size2, CommandQueue queue2);
50 bool compatible(
unsigned int size, CommandQueue queue, Element e);
62 unsigned int typeSize,
67 const KernelConfiguration & kernelConfig);
70 bool onSameDevice(CommandQueue queue1, CommandQueue queue2);
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.
bool compatibleSizes(unsigned int s, Element e)
if s and size of e are the same or at least one of them is 0
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 >()
const std::string typeToStr(unsigned int i)
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.
unsigned int paddingBytes(unsigned int size, unsigned int typeSize, CommandQueue queue)
Adds padding in bytes based on the device's alignment.
bool onSameDevice(Element e1, Element e2)
std::shared_ptr< ElementBase > Element
constexpr const TypeID typeToTypeID()
bool compatible(Element e1, Element e2)
const KernelConfiguration KERNEL_BASIC
bool isArgument(Element e)
constexpr const TypeID typeToTypeID< cl_double >()