[Libreoffice-commits] core.git: Branch 'feature/calc-pluggable-opencl' - 2 commits - sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Mon Sep 16 15:52:25 PDT 2013
sc/source/core/opencl/openclwrapper.cxx | 10 --------
sc/source/core/opencl/openclwrapper.hxx | 39 ++++----------------------------
2 files changed, 6 insertions(+), 43 deletions(-)
New commits:
commit 08fe4b32a18e034c317736ec219ad948799e7e48
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Mon Sep 16 18:54:04 2013 -0400
This base class is pointless.
Change-Id: I16094fa3aea2ac31b5289367dac21bc901bc9f23
diff --git a/sc/source/core/opencl/openclwrapper.hxx b/sc/source/core/opencl/openclwrapper.hxx
index a055f25..0ecca64 100644
--- a/sc/source/core/opencl/openclwrapper.hxx
+++ b/sc/source/core/opencl/openclwrapper.hxx
@@ -142,30 +142,6 @@ struct DoubleVectorFormula
int mnInputEndOffset;
};
-class OpenclCalcBase
-{
-public:
- OpenclCalcBase(){};
- virtual ~OpenclCalcBase(){};
- virtual int oclHostArithmeticOperator64Bits( const char* aKernelName, double *&rResult, int nRowSize )=0;
- virtual int oclMoreColHostArithmeticOperator64Bits( int nDataSize,int neOpSize,double *rResult, int nRowSize )=0;
- virtual int oclHostFormulaStatistics64Bits( const char* aKernelName,double *&output, int outputSize )=0;
- virtual int oclHostFormulaCount64Bits( uint *npStartPos, uint *npEndPos, double *&dpOutput, int nSize)=0;
- virtual int oclHostFormulaSumProduct64Bits( double *fpSumProMergeLfData, double *fpSumProMergeRrData, uint *npSumSize, double *&dpOutput, int nSize )=0;
- virtual int oclHostMatrixInverse64Bits( const char* aKernelName, double *dpOclMatrixSrc, double *dpOclMatrixDst,std::vector<double>&dpResult, uint nDim)=0;
- virtual int oclMoreColHostArithmeticOperator32Bits( int nDataSize,int neOpSize,double *rResult, int nRowSize )=0;
-
- virtual int oclHostArithmeticOperator32Bits( const char* aKernelName, double *rResult, int nRowSize )=0;
- virtual int oclHostFormulaStatistics32Bits( const char* aKernelName,double *output, int outputSize )=0;
- virtual int oclHostFormulaCount32Bits( uint *npStartPos, uint *npEndPos, double *dpOutput, int nSize)=0;
- virtual int oclHostFormulaSumProduct32Bits( float *fpSumProMergeLfData, float *fpSumProMergeRrData, uint *npSumSize, double *dpOutput, int nSize )=0;
- virtual int oclHostMatrixInverse32Bits( const char* aKernelName, float *fpOclMatrixSrc, float *fpOclMatrixDst, std::vector<double>& dpResult, uint nDim )=0;
-
- virtual int oclGroundWaterGroup( uint *eOp, uint eOpNum, const double *pOpArray, const double *pSubtractSingle, size_t nSrcDataSize,size_t nElements, double delta,uint *nStartPos,uint *nEndPos ,double *deResult)=0;
- virtual double *oclSimpleDeltaOperation( OpCode eOp, const double *pOpArray, const double *pSubtractSingle, size_t nElements, double delta )=0;
-};
-
-
class OpenclDevice
{
public:
@@ -193,7 +169,7 @@ public:
static void setOpenclState( int state );
};
-class OclCalc: public OpenclDevice,OpenclCalcBase
+class OclCalc: public OpenclDevice
{
public:
commit 7680f2431f7ae35e4eae799215970c69b26a10f4
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Mon Sep 16 18:51:51 2013 -0400
OpenclDevice is a stateless class. Make all its methods static.
Change-Id: I5eb1bead219ec9ffd759a26d8d5f1abe499f1ee1
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index df35f3d..b99dd12 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -124,16 +124,6 @@ int OpenclDevice::registOpenclKernel()
return 0;
}
-OpenclDevice::OpenclDevice()
-{
- //initEnv();
-}
-
-OpenclDevice::~OpenclDevice()
-{
- //releaseOpenclRunEnv();
-}
-
int OpenclDevice::setKernelEnv( KernelEnv *envInfo )
{
envInfo->mpkContext = gpuEnv.mpContext;
diff --git a/sc/source/core/opencl/openclwrapper.hxx b/sc/source/core/opencl/openclwrapper.hxx
index 3327f1c..a055f25 100644
--- a/sc/source/core/opencl/openclwrapper.hxx
+++ b/sc/source/core/opencl/openclwrapper.hxx
@@ -168,12 +168,9 @@ public:
class OpenclDevice
{
-
public:
static GPUEnv gpuEnv;
static int isInited;
- OpenclDevice();
- ~OpenclDevice();
static int initEnv();
static int registOpenclKernel();
static int releaseOpenclRunEnv();
@@ -188,12 +185,12 @@ public:
static int compileKernelFile( const char *filename, GPUEnv *gpuInfo, const char *buildOption );
static int initOpenclAttr( OpenCLEnv * env );
- int setKernelEnv( KernelEnv *envInfo );
- int convertToString( const char *filename, char **source );
- int checkKernelName( KernelEnv *envInfo, const char *kernelName );
+ static int setKernelEnv( KernelEnv *envInfo );
+ static int convertToString( const char *filename, char **source );
+ static int checkKernelName( KernelEnv *envInfo, const char *kernelName );
- int getOpenclState();
- void setOpenclState( int state );
+ static int getOpenclState();
+ static void setOpenclState( int state );
};
class OclCalc: public OpenclDevice,OpenclCalcBase
More information about the Libreoffice-commits
mailing list