diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-19 16:32:49 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2020-05-11 09:39:26 +0200 |
commit | 261b4dc45b359e07d4d3785aca55d75d78035551 (patch) | |
tree | 96dbc91a83b69cdb2d34aaa8751079ab2add01cc /sc | |
parent | b06b67463a7c08fe28180e495e204ed38cfa86dd (diff) |
Extend loplugin:external to warn about classes
Just for a single file in this change, to make another cherry-picked
fix to it apply cleanly.
Change-Id: Ic04ba454102753d1c8958597af293aadfab6280a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93698
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/formulagroupcl.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index cb1d01361fde..233ebaea14a3 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -345,6 +345,8 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program ) /// automatically disables use of OpenCL for a formula group. If at some point there are resources /// to drain the OpenCL swamp, this should go away. +namespace { + class ConstStringArgument : public DynamicKernelArgument { public: @@ -875,6 +877,8 @@ public: virtual size_t Marshal( cl_kernel, int, int, cl_program ) override; }; +} + /// Marshal a string vector reference size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_program ) { @@ -964,6 +968,8 @@ size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_pro return 1; } +namespace { + /// A mixed string/numeric vector class DynamicKernelMixedArgument : public VectorRef { @@ -1304,6 +1310,8 @@ private: std::vector<DynamicKernelArgumentRef> mParams; }; +} + void SymbolTable::Marshal( cl_kernel k, int nVectorWidth, cl_program pProgram ) { int i = 1; //The first argument is reserved for results @@ -1313,6 +1321,8 @@ void SymbolTable::Marshal( cl_kernel k, int nVectorWidth, cl_program pProgram ) } } +namespace { + /// Handling a Double Vector that is used as a sliding window input /// Performs parallel reduction based on given operator template<class Base> @@ -2316,7 +2326,7 @@ public: } virtual std::string BinFuncName() const override { return "fsop"; } }; -namespace { + struct SumIfsArgs { explicit SumIfsArgs(cl_mem x) : mCLMem(x), mConst(0.0) { } @@ -2324,7 +2334,6 @@ struct SumIfsArgs cl_mem mCLMem; double mConst; }; -} /// Helper functions that have multiple buffers class DynamicKernelSoPArguments : public DynamicKernelArgument @@ -2619,6 +2628,8 @@ private: cl_mem mpClmem2; }; +} + static DynamicKernelArgumentRef SoPHelper( const ScCalcConfig& config, const std::string& ts, const FormulaTreeNodeRef& ft, SlidingFunctionBase* pCodeGen, int nResultSize ) @@ -3793,6 +3804,8 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config, } } +namespace { + class DynamicKernel : public CompiledFormula { public: @@ -3833,6 +3846,8 @@ private: int const mnResultSize; }; +} + DynamicKernel::DynamicKernel( const ScCalcConfig& config, const FormulaTreeNodeRef& r, int nResultSize ) : mCalcConfig(config), mpRoot(r), |