[Libreoffice-commits] core.git: 4 commits - connectivity/source sc/source
Tor Lillqvist
tml at collabora.com
Thu Nov 7 20:13:36 CET 2013
connectivity/source/drivers/firebird/Connection.cxx | 2 -
sc/source/core/data/conditio.cxx | 2 -
sc/source/core/data/formulacell.cxx | 10 ++++----
sc/source/core/opencl/formulagroupcl.cxx | 4 +--
sc/source/core/opencl/op_math.cxx | 2 -
sc/source/core/opencl/openclwrapper.cxx | 23 --------------------
sc/source/core/opencl/openclwrapper.hxx | 2 -
7 files changed, 10 insertions(+), 35 deletions(-)
New commits:
commit 5d87a7f542bd98b1482842596d0aaa4c7757801a
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Nov 7 21:12:53 2013 +0200
WaE: unused variable 'sSqlStatement' [loplugin]
Change-Id: I30fe491d8257affb994083ae312d9663ef7a28e9
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index b2dfcc0..728e54f 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -428,7 +428,7 @@ Reference< XPreparedStatement > SAL_CALL Connection::prepareCall(
MutexGuard aGuard( m_aMutex );
checkDisposed(Connection_BASE::rBHelper.bDisposed);
- OUString sSqlStatement (transformPreparedStatement( _sSql ));
+ // OUString sSqlStatement (transformPreparedStatement( _sSql ));
// not implemented yet :-) a task to do
return NULL;
commit 74ab9fb5cf6505aecee15f6f7eab61c1790bbda2
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Nov 6 16:54:43 2013 +0200
Bin an unused function
Change-Id: Iedea7622d27e263b21943f7696ff71fb7fbd7c80
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index 046297f..6400dc0 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -615,29 +615,6 @@ bool OpenclDevice::buildProgramFromBinary(const char* buildOption, GPUEnv* gpuIn
return buildProgram(buildOption, gpuInfo, idx);
}
-int OpenclDevice::compileKernelFile( GPUEnv *gpuInfo, const char *buildOption )
-{
- int idx;
- const char* filename = "kernel.cl";
- fprintf(stderr, "compileKernelFile ... \n");
- if ( cachedOfKernerPrg(gpuInfo, filename) == 1 )
- {
- return 1;
- }
-
- idx = gpuInfo->mnFileCount;
-
- bool bSuccess = buildProgramFromBinary(buildOption, gpuInfo, filename, idx);
- if(!bSuccess)
- bSuccess = buildProgramFromSource(buildOption, gpuInfo, filename, idx);
-
- strcpy( gpuInfo->mArryKnelSrcFile[idx], filename );
-
- gpuInfo->mnFileCount += 1;
-
- return bSuccess;
-}
-
int OpenclDevice::initOpenclRunEnv( int argc )
{
if ( MAX_CLKERNEL_NUM <= 0 )
diff --git a/sc/source/core/opencl/openclwrapper.hxx b/sc/source/core/opencl/openclwrapper.hxx
index dd95954..aee2778 100644
--- a/sc/source/core/opencl/openclwrapper.hxx
+++ b/sc/source/core/opencl/openclwrapper.hxx
@@ -172,13 +172,11 @@ public:
static int releaseOpenclRunEnv();
static int initOpenclRunEnv( GPUEnv *gpu );
static int releaseOpenclEnv( GPUEnv *gpuInfo );
- static int compileKernelFile( GPUEnv *gpuInfo, const char *buildOption );
static int initOpenclRunEnv( int argc );
static int cachedOfKernerPrg( const GPUEnv *gpuEnvCached, const char * clFileName );
static int generatBinFromKernelSource( cl_program program, const char * clFileName );
static int writeBinaryToFile( const OString& rName, const char* birary, size_t numBytes );
static std::vector<boost::shared_ptr<osl::File> > binaryGenerated( const char * clFileName, cl_context context);
- static int compileKernelFile( const char *filename, GPUEnv *gpuInfo, const char *buildOption );
static bool buildProgramFromSource(const char* buildOption, GPUEnv* gpuEnv, const char* filename, int idx);
static bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuEnv, const char* filename, int idx);
commit aaa0ead88ce9bc8a94dbe3db82465cc5599c7dc9
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Nov 6 15:25:31 2013 +0200
Umgekehrte Polnische Notation is German for Reverse Polish Notation
Change-Id: I80480f963b643596ff1c0e93af3eaa6ffc63c9dd
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index cd1d2df..1a9f869 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -570,7 +570,7 @@ void ScConditionEntry::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt )
static bool lcl_IsEqual( const ScTokenArray* pArr1, const ScTokenArray* pArr2 )
{
- // verglichen wird nur das nicht-UPN Array
+ // verglichen wird nur das nicht-RPN Array
if ( pArr1 && pArr2 )
{
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index b0ffb74..5e92efa 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -559,7 +559,7 @@ ScFormulaCell::ScFormulaCell(
mbNeedsNumberFormat( false ),
aPos( rPos )
{
- // UPN-Array generation
+ // RPN array generation
if( pCode->GetLen() && !pCode->GetCodeError() && !pCode->GetCodeLen() )
{
ScCompiler aComp( pDocument, aPos, *pCode);
@@ -995,7 +995,7 @@ void ScFormulaCell::CalcAfterLoad()
bDirty = true;
bNewCompiled = true;
}
- // The UPN array is not created when a Calc 3.0-Doc has been read as the Range Names exist until now.
+ // The RPN array is not created when a Calc 3.0-Doc has been read as the Range Names exist until now.
if( pCode->GetLen() && !pCode->GetCodeLen() && !pCode->GetCodeError() )
{
ScCompiler aComp(pDocument, aPos, *pCode);
@@ -1312,7 +1312,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
nSeenInIteration = pDocument->GetRecursionHelper().GetIteration();
if( !pCode->GetCodeLen() && !pCode->GetCodeError() )
{
- // #i11719# no UPN and no error and no token code but result string present
+ // #i11719# no RPN and no error and no token code but result string present
// => interpretation of this cell during name-compilation and unknown names
// => can't exchange underlying code array in CompileTokenArray() /
// Compile() because interpreter's token iterator would crash or pCode
@@ -1326,7 +1326,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
pCode->SetCodeError( errNoCode );
// This is worth an assertion; if encountered in daily work
// documents we might need another solution. Or just confirm correctness.
- OSL_FAIL( "ScFormulaCell::Interpret: no UPN, no error, no token, but hybrid formula string" );
+ OSL_FAIL( "ScFormulaCell::Interpret: no RPN, no error, no token, but hybrid formula string" );
return;
}
CompileTokenArray();
@@ -1593,7 +1593,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
else
{
// Cells with compiler errors should not be marked dirty forever
- OSL_ENSURE( pCode->GetCodeError(), "no UPN-Code und no errors ?!?!" );
+ OSL_ENSURE( pCode->GetCodeError(), "no RPN code und no errors ?!?!" );
bDirty = false;
bTableOpDirty = false;
}
commit 761959e7af3ea0b7b80f33f511feec212b9dc7d0
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Nov 5 22:03:46 2013 +0200
Cosmetics: Use more consistent style in the generated OpenCL code
Change-Id: I6c292c95cb3927954d71a5513665dcf2c54166b2
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index a68188c..228df59 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -436,7 +436,7 @@ public:
else
{
#ifdef ISNAN
- ss << "nCount += 1;\n\t\t";
+ ss << "nCount += 1;\n\t";
#endif
nItems += 1;
}
@@ -1248,7 +1248,7 @@ public:
mSyms.DumpSlidingWindowFunctions(decl);
mKernelSignature = DK->DumpOpName();
decl << "__kernel void DynamicKernel" << mKernelSignature;
- decl << "(\n__global double *result, ";
+ decl << "(__global double *result, ";
DK->GenSlidingWindowDecl(decl);
decl << ") {\n\tint gid0 = get_global_id(0);\n\tresult[gid0] = " <<
DK->GenSlidingWindowDeclRef(false) << ";\n}\n";
diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx
index d7286be..9d10fce 100644
--- a/sc/source/core/opencl/op_math.cxx
+++ b/sc/source/core/opencl/op_math.cxx
@@ -36,7 +36,7 @@ void OpCos::GenSlidingWindowFunction(std::stringstream &ss,
ss << ",";
vSubArguments[i]->GenSlidingWindowDecl(ss);
}
- ss << ")\n{\n\t";
+ ss << ") {\n\t";
ss <<"int gid0=get_global_id(0);\n\t";
ss << "double arg0 = " << vSubArguments[0]->GenSlidingWindowDeclRef();
ss << ";\n\t";
More information about the Libreoffice-commits
mailing list