ASL
0.1.7
Advanced Simulation Library
|
Go to the documentation of this file.
24 #ifndef ACLUTILITIES_H
25 #define ACLUTILITIES_H
27 #include "aslUtilities.h"
28 #include "Kernels/aclKernelConfiguration.h"
39 extern const std::string
INDEX;
43 typedef std::shared_ptr<ElementBase>
Element;
62 unsigned int typeSize,
67 const KernelConfiguration & kernelConfig);
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
bool isArgument(Element e)
constexpr const TypeID typeToTypeID< cl_int >()
constexpr const TypeID typeToTypeID< cl_long >()
constexpr const TypeID typeToTypeID< cl_float >()
bool isDeclarable(Element e)
constexpr const TypeID typeToTypeID< cl_double >()
const std::string & typeToStr()
constexpr const TypeID typeToTypeID< cl_uint >()
std::shared_ptr< cl::CommandQueue > CommandQueue
bool onSameDevice(CommandQueue queue1, CommandQueue queue2)
checks whether both elements reside on the same device
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.
The OpenCL C++ bindings are defined within this namespace.
bool compatible(unsigned int size1, CommandQueue queue1, unsigned int size2, CommandQueue queue2)
unsigned int paddingBytes(unsigned int size, unsigned int typeSize, CommandQueue queue)
Adds padding in bytes based on the device's alignment.
std::shared_ptr< ElementBase > Element
bool compatibleSizes(unsigned int s, const VectorOfElements &a)
std::string numToStr(T i)
Converts numbers or another type to string.
const KernelConfiguration KERNEL_BASIC
Advanced Computational Language.
constexpr const TypeID typeToTypeID()