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)
const std::string & typeToStr()
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.
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.
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 >()