-
Notifications
You must be signed in to change notification settings - Fork 0
Kernel
Architector edited this page Apr 18, 2019
·
6 revisions
This is an abstraction of kernels in the OpenCL program. Once created, the kernel can be used in various programs.
Kernel(const char* name);
Kernel(const std::string& name);
Example:
ecl::Kernel myKern = "name_of_my_kernel";
To get / set kernel name:
const std::string& getName() const;
void setName(const std::string& name);
You can use overloaded operators!
- Equality:
myKern = const char*;
myKern = const std::string&;
myKern += const char*;
myKern += const std::string&;
myKern += const std::Kernel&;
- Friend:
Kernel kern = myKern + const char*;
Kernel kern = myKern + const std::string&;
Kernel kern = myKern + const std::Kernel&;
Example:
ecl::Kernel kern = "name";
ecl::Kernel temp = "_of_my_";
kern += temp + "kernel"; // name_of_my_kernel
Also you can use (copy / move) (constructors / operator=)!
- Copy:
Kernel(const Kernel&);
kern = const Kernel&;
Example:
ecl::Kernel kern = "test";
ecl::Kernel kern2 = kern; // copy Kernel from kern
- Move:
Kernel(Kernel&&);
kern = std::move(Kernel&&);
Example:
ecl::Kernel kern = "test";
ecl::Kernel kern2 = std::move(kern); // now kern is clear, kern2 grab Kernel
Twitter: Architector
e-mail: olegsajaxov@yandex.ru
Wiki
Getting started
API