20 const std::string &sSymName,
SubArguments &vSubArguments)
27 ss <<
" int gid0=get_global_id(0);\n";
28 ss <<
" double tmp =0;\n";
30 " tmp +=pow(arg1,2) - pow(arg2,2);\n"
32 ss <<
" return tmp;\n";
37 const std::string &sSymName,
SubArguments &vSubArguments)
44 ss <<
" int gid0=get_global_id(0);\n";
45 ss <<
" double tmp =0;\n";
47 " tmp +=pow(arg1,2) + pow(arg2,2);\n"
49 ss <<
" return tmp;\n";
54 const std::string &sSymName,
SubArguments &vSubArguments)
61 ss <<
" int gid0=get_global_id(0);\n";
62 ss <<
" double tmp =0;\n";
64 " tmp +=pow((arg1-arg2),2);\n"
66 ss <<
" return tmp;\n";
virtual void GenSlidingWindowFunction(outputstream &ss, const std::string &sSymName, SubArguments &vSubArguments) override
virtual void GenSlidingWindowFunction(outputstream &ss, const std::string &sSymName, SubArguments &vSubArguments) override
virtual void GenSlidingWindowFunction(outputstream &ss, const std::string &sSymName, SubArguments &vSubArguments) override
void GenerateFunctionDeclaration(const std::string &sSymName, SubArguments &vSubArguments, outputstream &ss)
static void GenerateRangeArgPair(int arg1, int arg2, SubArguments &vSubArguments, outputstream &ss, EmptyArgType empty, const char *code, const char *firstElementDiff=nullptr)
std::vector< DynamicKernelArgumentRef > SubArguments
#define CHECK_PARAMETER_DOUBLEVECTORREF(arg)
#define CHECK_PARAMETER_COUNT(min, max)