LibreOffice Module sc (master) 1
|
Holds an input (read-only) argument reference to a SingleVectorRef. More...
#include <opbase.hxx>
Public Member Functions | |
VectorRef (const ScCalcConfig &config, const std::string &s, const FormulaTreeNodeRef &ft, int index=0) | |
virtual | ~VectorRef () override |
virtual void | GenDecl (outputstream &ss) const override |
Generate declaration. More... | |
virtual void | GenSlidingWindowDecl (outputstream &ss) const override |
When declared as input to a sliding window function. More... | |
virtual std::string | GenSlidingWindowDeclRef (bool=false) const override |
When referenced in a sliding window function. More... | |
virtual size_t | Marshal (cl_kernel, int, int, cl_program) override |
Create buffer and pass the buffer to a given kernel. More... | |
virtual void | GenSlidingWindowFunction (outputstream &) override |
virtual size_t | GetWindowSize () const override |
virtual std::string | DumpOpName () const override |
virtual void | DumpInlineFun (std::set< std::string > &, std::set< std::string > &) const override |
const std::string & | GetName () const |
cl_mem | GetCLBuffer () const |
virtual bool | NeedParallelReduction () const override |
Public Member Functions inherited from sc::opencl::DynamicKernelArgument | |
DynamicKernelArgument (const DynamicKernelArgument &)=delete | |
delete copy constructor More... | |
const DynamicKernelArgument & | operator= (const DynamicKernelArgument &)=delete |
delete copy-assignment operator More... | |
DynamicKernelArgument (const ScCalcConfig &config, std::string s, FormulaTreeNodeRef ft) | |
virtual | ~DynamicKernelArgument () |
virtual void | GenDecl (outputstream &ss) const =0 |
Generate declaration. More... | |
virtual void | GenSlidingWindowDecl (outputstream &ss) const =0 |
When declared as input to a sliding window function. More... | |
virtual std::string | GenSlidingWindowDeclRef (bool=false) const =0 |
When referenced in a sliding window function. More... | |
virtual size_t | Marshal (cl_kernel, int, int, cl_program)=0 |
Create buffer and pass the buffer to a given kernel. More... | |
virtual size_t | GetWindowSize () const =0 |
virtual std::string | GenDoubleSlidingWindowDeclRef (bool=false) const |
When Mix, it will be called. More... | |
virtual std::string | GenStringSlidingWindowDeclRef (bool=false) const |
When Mix, it will be called. More... | |
virtual std::string | GenIsString (bool=false) const |
Will generate value saying whether the value is a string. More... | |
virtual void | GenDeclRef (outputstream &ss) const |
Generate use/references to the argument. More... | |
virtual void | GenSlidingWindowFunction (outputstream &) |
formula::FormulaToken * | GetFormulaToken () const |
virtual std::string | DumpOpName () const |
virtual void | DumpInlineFun (std::set< std::string > &, std::set< std::string > &) const |
const std::string & | GetName () const |
virtual bool | NeedParallelReduction () const |
virtual bool | IsEmpty () const |
If there's actually no argument, i.e. it expands to no code. More... | |
Protected Attributes | |
cl_mem | mpClmem |
const int | mnIndex |
bool | forceStringsToZero |
std::vector< double > | dataBuffer |
Protected Attributes inherited from sc::opencl::DynamicKernelArgument | |
const ScCalcConfig & | mCalcConfig |
std::string | mSymName |
FormulaTreeNodeRef | mFormulaTree |
Additional Inherited Members | |
Static Public Member Functions inherited from sc::opencl::DynamicKernelArgument | |
static void | ClearStringIds () |
Static Protected Member Functions inherited from sc::opencl::DynamicKernelArgument | |
static int | GetStringId (const rtl_uString *string) |
Holds an input (read-only) argument reference to a SingleVectorRef.
or a DoubleVectorRef for non-sliding-window argument of complex functions like SumOfProduct In most of the cases the argument is introduced by a Push operation in the given RPN.
Definition at line 187 of file opbase.hxx.
sc::opencl::VectorRef::VectorRef | ( | const ScCalcConfig & | config, |
const std::string & | s, | ||
const FormulaTreeNodeRef & | ft, | ||
int | index = 0 |
||
) |
Definition at line 128 of file opbase.cxx.
References config, ft, idx, mnIndex, mnIndex, and sc::opencl::DynamicKernelArgument::mSymName.
|
overridevirtual |
Definition at line 139 of file opbase.cxx.
References err, openclwrapper::errorString(), mpClmem, and SAL_WARN_IF.
|
overridevirtual |
Reimplemented from sc::opencl::DynamicKernelArgument.
Definition at line 202 of file opbase.cxx.
|
overridevirtual |
Reimplemented from sc::opencl::DynamicKernelArgument.
Definition at line 197 of file opbase.cxx.
|
overridevirtual |
Generate declaration.
Implements sc::opencl::DynamicKernelArgument.
Reimplemented in sc::opencl::DynamicKernelStringArgument.
Definition at line 150 of file opbase.cxx.
References sc::opencl::DynamicKernelArgument::mSymName.
Referenced by GenSlidingWindowDecl().
|
overridevirtual |
When declared as input to a sliding window function.
Implements sc::opencl::DynamicKernelArgument.
Reimplemented in sc::opencl::DynamicKernelStringArgument.
Definition at line 156 of file opbase.cxx.
References GenDecl().
|
overridevirtual |
When referenced in a sliding window function.
Implements sc::opencl::DynamicKernelArgument.
Definition at line 162 of file opbase.cxx.
References formula::SingleVectorRefToken::GetArrayLength(), sc::opencl::DynamicKernelArgument::GetFormulaToken(), and sc::opencl::DynamicKernelArgument::mSymName.
|
overridevirtual |
Reimplemented from sc::opencl::DynamicKernelArgument.
Reimplemented in sc::opencl::DynamicKernelStringArgument.
Definition at line 175 of file opbase.cxx.
cl_mem sc::opencl::VectorRef::GetCLBuffer | ( | ) | const |
Definition at line 209 of file opbase.cxx.
References mpClmem.
const std::string & sc::opencl::VectorRef::GetName | ( | ) | const |
Definition at line 204 of file opbase.cxx.
References sc::opencl::DynamicKernelArgument::mSymName.
|
overridevirtual |
Implements sc::opencl::DynamicKernelArgument.
Definition at line 177 of file opbase.cxx.
References sc::opencl::DynamicKernelArgument::mFormulaTree.
Create buffer and pass the buffer to a given kernel.
Map the buffer used by an argument and do necessary argument setting.
Implements sc::opencl::DynamicKernelArgument.
Reimplemented in sc::opencl::DynamicKernelStringArgument.
Definition at line 196 of file formulagroupcl.cxx.
References dataBuffer, err, openclwrapper::errorString(), forceStringsToZero, formula::SingleVectorRefToken::GetArray(), formula::DoubleVectorRefToken::GetArrayLength(), formula::SingleVectorRefToken::GetArrayLength(), formula::DoubleVectorRefToken::GetArrays(), formula::FormulaToken::GetType(), i, sc::opencl::DynamicKernelArgument::mFormulaTree, mnIndex, mpClmem, openclwrapper::KernelEnv::mpkCmdQueue, openclwrapper::KernelEnv::mpkContext, formula::VectorRefArray::mpNumericArray, formula::VectorRefArray::mpStringArray, SAL_INFO, SAL_WARN, openclwrapper::setKernelEnv(), formula::svDoubleVectorRef, and formula::svSingleVectorRef.
|
overridevirtual |
Reimplemented from sc::opencl::DynamicKernelArgument.
Definition at line 214 of file opbase.cxx.
|
protected |
Definition at line 220 of file opbase.hxx.
Referenced by Marshal().
|
protected |
Definition at line 218 of file opbase.hxx.
Referenced by Marshal(), and sc::opencl::VectorRefStringsToZero::VectorRefStringsToZero().
|
protected |
Definition at line 216 of file opbase.hxx.
Referenced by Marshal(), sc::opencl::DynamicKernelStringArgument::Marshal(), and VectorRef().
|
protected |
Definition at line 214 of file opbase.hxx.
Referenced by GetCLBuffer(), Marshal(), sc::opencl::DynamicKernelStringArgument::Marshal(), and ~VectorRef().