43 static const string prefix;
44 static unsigned int id;
51 unsigned int offset_);
58 std::vector<Element> & localDeclarations)
const;
68 unsigned int offset_):
75 if ( (offset +
size) > vector->getSize() )
77 errorMessage(
"Subvector::Subvector() - (offset + size) > vector->getSize()");
81 buffer_create_info.origin = offset *
sizeof(T);
82 buffer_create_info.size =
size *
sizeof(T);
112 return name +
"[" +
INDEX +
"]";
129 template <
typename T>
131 std::vector<Element> & localDeclarations)
const
136 template <
typename T>
C++ bindings for OpenCL 1.0 (rev 48), OpenCL 1.1 (rev 33) and OpenCL 1.2 (rev 15)
ACL Kernel configuration class.
virtual cl::Buffer & getBuffer()
virtual string str(const KernelConfiguration &kernelConfig) const
virtual void setAsArgument(cl::Kernel &kernel, unsigned int argumentIndex) const
virtual string getName() const
virtual string getLocalDeclaration(const KernelConfiguration &kernelConfig) const
Subvector(shared_ptr< Array< T > > vector_, unsigned int size_, unsigned int offset_)
virtual string getTypeSignature(const KernelConfiguration &kernelConfig) const
virtual void addToKernelSource(std::vector< Element > &arguments, std::vector< Element > &localDeclarations) const
Class interface for Buffer Memory Objects.
Class interface for cl_kernel.
cl_int setArg(cl_uint index, const T &value)
SPDataWrapperACLData generateDataContainerACL_SP(const Block &b, unsigned int n=1)
generates pointer to ACL Data field with n components
const Block offset(const Block &bl, int a=1)
void errorMessage(cl_int status, const char *errorMessage)
Prints errorMessage and exits depending on the status.
std::string numToStr(T i)
Converts numbers or another type to string.
Advanced Computational Language.