20 const std::string &sSymName,
SubArguments &vSubArguments)
25 ss <<
" int gid0 = get_global_id(0);\n";
26 ss <<
" bool t = false;\n";
27 for(
size_t j = 0; j< vSubArguments.size(); j++)
30 ss <<
" t = t " <<
openclOperator() <<
" (arg" << j <<
" != 0);\n";
37 const std::string &sSymName,
SubArguments &vSubArguments)
42 ss <<
" int gid0 = get_global_id(0);\n";
43 ss <<
" bool t = true;\n";
44 for(
size_t j = 0; j< vSubArguments.size(); j++)
49 ss <<
" if( !isnan( arg" << j <<
" ))\n";
50 ss <<
" t = t " <<
openclOperator() <<
" (arg" << j <<
" != 0);\n";
57 const std::string &sSymName,
SubArguments &vSubArguments)
62 ss <<
" int gid0 = get_global_id(0);\n";
64 ss <<
" return arg0 == 0;\n";
69 const std::string &sSymName,
SubArguments &vSubArguments)
74 ss <<
" int gid0 = get_global_id(0);\n";
76 if(vSubArguments.size()>1)
79 ss <<
" double arg1 = 1;\n";
80 if(vSubArguments.size()>2)
83 ss <<
" double arg2 = 0;\n";
85 ss <<
" if(arg0 != 0)\n";
86 ss <<
" return arg1;\n";
88 ss <<
" return arg2;\n";
virtual void GenSlidingWindowFunction(outputstream &ss, const std::string &sSymName, SubArguments &vSubArguments) override
virtual const char * openclOperator() const override
The C operator implementing the function.
virtual void GenSlidingWindowFunction(outputstream &ss, const std::string &sSymName, SubArguments &vSubArguments) override
virtual const char * openclOperator() const =0
The C operator implementing the function.
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 GenerateArg(const char *name, int arg, SubArguments &vSubArguments, outputstream &ss, EmptyArgType empty=EmptyIsZero, GenerateArgTypeType generateType=DoNotGenerateArgType)
void GenerateFunctionDeclaration(const std::string &sSymName, SubArguments &vSubArguments, outputstream &ss)
std::vector< DynamicKernelArgumentRef > SubArguments
#define CHECK_PARAMETER_COUNT(min, max)