Kaydet (Commit) 0641dd42 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Use SAL_WARN instead of writing to std::cerr

Change-Id: I28cc30bc4cd0053ced8de0b51e7cdc3ee0a237a5
üst 9eed0d48
...@@ -77,10 +77,6 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program ) ...@@ -77,10 +77,6 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program )
static_cast<const formula::SingleVectorRefToken*>(ref); static_cast<const formula::SingleVectorRefToken*>(ref);
pHostBuffer = const_cast<double*>(pSVR->GetArray().mpNumericArray); pHostBuffer = const_cast<double*>(pSVR->GetArray().mpNumericArray);
szHostBuffer = pSVR->GetArrayLength() * sizeof(double); szHostBuffer = pSVR->GetArrayLength() * sizeof(double);
#if 0
std::cerr << "Marshal a Single vector of size " << pSVR->GetArrayLength();
std::cerr << " at argument "<< argno << "\n";
#endif
} }
else if (ref->GetType() == formula::svDoubleVectorRef) else if (ref->GetType() == formula::svDoubleVectorRef)
{ {
...@@ -3572,9 +3568,7 @@ DynamicKernel* DynamicKernel::create( ScDocument& /* rDoc */, ...@@ -3572,9 +3568,7 @@ DynamicKernel* DynamicKernel::create( ScDocument& /* rDoc */,
} }
catch (const UnhandledToken& ut) catch (const UnhandledToken& ut)
{ {
std::cerr << "\nDynamic formula compiler: unhandled token: "; SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled token: " << ut.mMessage << " at " << ut.mFile << ":" << ut.mLineNumber);
std::cerr << ut.mMessage << " at ";
std::cerr << ut.mFile << ":" << ut.mLineNumber << "\n";
#ifdef NO_FALLBACK_TO_SWINTERP #ifdef NO_FALLBACK_TO_SWINTERP
assert(false); assert(false);
#else #else
...@@ -3584,7 +3578,7 @@ DynamicKernel* DynamicKernel::create( ScDocument& /* rDoc */, ...@@ -3584,7 +3578,7 @@ DynamicKernel* DynamicKernel::create( ScDocument& /* rDoc */,
} }
catch (...) catch (...)
{ {
std::cerr << "Dynamic formula compiler: unhandled compiler error\n"; SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled compiler error");
return NULL; return NULL;
} }
return pDynamicKernel; return pDynamicKernel;
...@@ -3662,8 +3656,7 @@ bool FormulaGroupInterpreterOpenCL::interpret( ScDocument& rDoc, ...@@ -3662,8 +3656,7 @@ bool FormulaGroupInterpreterOpenCL::interpret( ScDocument& rDoc,
} }
catch (const UnhandledToken& ut) catch (const UnhandledToken& ut)
{ {
std::cerr << "\nDynamic formula compiler: unhandled token: "; SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled token: " << ut.mMessage << " at " << ut.mFile << ":" << ut.mLineNumber);
std::cerr << ut.mMessage << "\n";
#ifdef NO_FALLBACK_TO_SWINTERP #ifdef NO_FALLBACK_TO_SWINTERP
assert(false); assert(false);
return true; return true;
...@@ -3673,10 +3666,7 @@ bool FormulaGroupInterpreterOpenCL::interpret( ScDocument& rDoc, ...@@ -3673,10 +3666,7 @@ bool FormulaGroupInterpreterOpenCL::interpret( ScDocument& rDoc,
} }
catch (const OpenCLError& oce) catch (const OpenCLError& oce)
{ {
std::cerr << "Dynamic formula compiler: OpenCL error: "; SAL_WARN("sc.opencl", "Dynamic formula compiler: OpenCL error: " << oce.mError << " at " << oce.mFile << ":" << oce.mLineNumber);
std::cerr << oce.mError;
std::cerr << " at ";
std::cerr << oce.mFile << ":" << oce.mLineNumber << "\n";
#ifdef NO_FALLBACK_TO_SWINTERP #ifdef NO_FALLBACK_TO_SWINTERP
assert(false); assert(false);
return true; return true;
...@@ -3686,9 +3676,7 @@ bool FormulaGroupInterpreterOpenCL::interpret( ScDocument& rDoc, ...@@ -3686,9 +3676,7 @@ bool FormulaGroupInterpreterOpenCL::interpret( ScDocument& rDoc,
} }
catch (const Unhandled& uh) catch (const Unhandled& uh)
{ {
std::cerr << "Dynamic formula compiler: unhandled case:"; SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled case at " << uh.mFile << ":" << uh.mLineNumber);
std::cerr << " at ";
std::cerr << uh.mFile << ":" << uh.mLineNumber << "\n";
#ifdef NO_FALLBACK_TO_SWINTERP #ifdef NO_FALLBACK_TO_SWINTERP
assert(false); assert(false);
return true; return true;
...@@ -3698,7 +3686,7 @@ bool FormulaGroupInterpreterOpenCL::interpret( ScDocument& rDoc, ...@@ -3698,7 +3686,7 @@ bool FormulaGroupInterpreterOpenCL::interpret( ScDocument& rDoc,
} }
catch (...) catch (...)
{ {
std::cerr << "Dynamic formula compiler: unhandled compiler error\n"; SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled compiler error");
#ifdef NO_FALLBACK_TO_SWINTERP #ifdef NO_FALLBACK_TO_SWINTERP
assert(false); assert(false);
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment