LibreOffice Module sc (master) 1
Public Member Functions | Protected Attributes | List of all members
sc::opencl::VectorRef Class Reference

Holds an input (read-only) argument reference to a SingleVectorRef. More...

#include <opbase.hxx>

Inheritance diagram for sc::opencl::VectorRef:
[legend]
Collaboration diagram for sc::opencl::VectorRef:
[legend]

Public Member Functions

 VectorRef (const ScCalcConfig &config, const std::string &s, const FormulaTreeNodeRef &ft, int index=0)
 
virtual ~VectorRef () override
 
virtual void GenDecl (std::stringstream &ss) const override
 Generate declaration. More...
 
virtual void GenSlidingWindowDecl (std::stringstream &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 (std::stringstream &) 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 DynamicKernelArgumentoperator= (const DynamicKernelArgument &)=delete
 delete copy-assignment operator More...
 
 DynamicKernelArgument (const ScCalcConfig &config, const std::string &s, const FormulaTreeNodeRef &ft)
 
virtual ~DynamicKernelArgument ()
 
virtual void GenDecl (std::stringstream &ss) const =0
 Generate declaration. More...
 
virtual void GenSlidingWindowDecl (std::stringstream &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 void GenDeclRef (std::stringstream &ss) const
 Generate use/references to the argument. More...
 
virtual void GenSlidingWindowFunction (std::stringstream &)
 
formula::FormulaTokenGetFormulaToken () 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
 
- Protected Attributes inherited from sc::opencl::DynamicKernelArgument
const ScCalcConfigmCalcConfig
 
std::string mSymName
 
FormulaTreeNodeRef mFormulaTree
 

Detailed Description

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 158 of file opbase.hxx.

Constructor & Destructor Documentation

◆ VectorRef()

sc::opencl::VectorRef::VectorRef ( const ScCalcConfig config,
const std::string &  s,
const FormulaTreeNodeRef ft,
int  index = 0 
)

Definition at line 85 of file opbase.cxx.

References config, ft, idx, mnIndex, mnIndex, and sc::opencl::DynamicKernelArgument::mSymName.

◆ ~VectorRef()

sc::opencl::VectorRef::~VectorRef ( )
overridevirtual

Definition at line 96 of file opbase.cxx.

References err, openclwrapper::errorString(), mpClmem, and SAL_WARN_IF.

Member Function Documentation

◆ DumpInlineFun()

void sc::opencl::VectorRef::DumpInlineFun ( std::set< std::string > &  ,
std::set< std::string > &   
) const
overridevirtual

Reimplemented from sc::opencl::DynamicKernelArgument.

Definition at line 159 of file opbase.cxx.

◆ DumpOpName()

std::string sc::opencl::VectorRef::DumpOpName ( ) const
overridevirtual

Reimplemented from sc::opencl::DynamicKernelArgument.

Definition at line 154 of file opbase.cxx.

◆ GenDecl()

void sc::opencl::VectorRef::GenDecl ( std::stringstream &  ss) const
overridevirtual

Generate declaration.

Implements sc::opencl::DynamicKernelArgument.

Definition at line 107 of file opbase.cxx.

References sc::opencl::DynamicKernelArgument::mSymName.

Referenced by GenSlidingWindowDecl().

◆ GenSlidingWindowDecl()

void sc::opencl::VectorRef::GenSlidingWindowDecl ( std::stringstream &  ss) const
overridevirtual

When declared as input to a sliding window function.

Implements sc::opencl::DynamicKernelArgument.

Definition at line 113 of file opbase.cxx.

References GenDecl().

◆ GenSlidingWindowDeclRef()

std::string sc::opencl::VectorRef::GenSlidingWindowDeclRef ( bool  nested = false) const
overridevirtual

◆ GenSlidingWindowFunction()

void sc::opencl::VectorRef::GenSlidingWindowFunction ( std::stringstream &  )
overridevirtual

Reimplemented from sc::opencl::DynamicKernelArgument.

Definition at line 132 of file opbase.cxx.

◆ GetCLBuffer()

cl_mem sc::opencl::VectorRef::GetCLBuffer ( ) const

Definition at line 166 of file opbase.cxx.

References mpClmem.

◆ GetName()

const std::string & sc::opencl::VectorRef::GetName ( ) const

Definition at line 161 of file opbase.cxx.

References sc::opencl::DynamicKernelArgument::mSymName.

◆ GetWindowSize()

size_t sc::opencl::VectorRef::GetWindowSize ( ) const
overridevirtual

◆ Marshal()

size_t sc::opencl::VectorRef::Marshal ( cl_kernel  k,
int  argno,
int  ,
cl_program   
)
overridevirtual

◆ NeedParallelReduction()

bool sc::opencl::VectorRef::NeedParallelReduction ( ) const
overridevirtual

Reimplemented from sc::opencl::DynamicKernelArgument.

Definition at line 171 of file opbase.cxx.

Member Data Documentation

◆ mnIndex

const int sc::opencl::VectorRef::mnIndex
protected

Definition at line 187 of file opbase.hxx.

Referenced by Marshal(), and VectorRef().

◆ mpClmem

cl_mem sc::opencl::VectorRef::mpClmem
protected

Definition at line 185 of file opbase.hxx.

Referenced by GetCLBuffer(), Marshal(), and ~VectorRef().


The documentation for this class was generated from the following files: