From 8003afa1f35821e6f8ca8b917b9d446219b6a1ae Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 13 Nov 2014 15:24:40 +0200 Subject: Blacklist has precedence over whitelist, so order them like that Change-Id: I0cf00abd582aaaaa4be4d385a6ef4f199c7aa0bc --- .../registry/schema/org/openoffice/Office/Calc.xcs | 12 +++++----- sc/inc/calcconfig.hxx | 2 +- sc/source/core/tool/calcconfig.cxx | 11 +++++---- sc/source/core/tool/formulaopt.cxx | 28 +++++++++++----------- sc/source/ui/optdlg/calcoptionsdlg.cxx | 14 +++++------ sc/uiconfig/scalc/ui/formulacalculationoptions.ui | 16 ++++++------- 6 files changed, 42 insertions(+), 41 deletions(-) diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 42b28bcc86a0..8a74759c9651 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1389,19 +1389,19 @@ - + - Combinations of (OS, OS version, OpenCL platform vendor, OpenCL device name, OpenCL driver version) that are known to be good. Has higher priority than OpenCLBlackList. Each entry is a string consisting of five parts separated by slashes. In case a slash occurs inside a part, it is prefixed by a backslash. And in case a backslash occurs inside a part, it is also prefixed by another backslash. Any part might contain a single asterisk as a wildcard, matching any value, but there is no more generic regexp support. + Combinations of (OS, OS version, OpenCL platform vendor, OpenCL device name, OpenCL driver version) that are known to be bad. Each entry is a string consisting of six parts separated by slashes. In case a slash, percent or semicolon occurs inside a part, it is replaced by a percent followed by the corresponding number as two hex digits. Any part might contain a single asterisk as a wildcard, matching any value, but there is no more generic regexp support. Has higher priority than OpenCLWhiteList. - Linux/*/Advanced Micro Devices, Inc./*/1445.5 (sse2,avx)/ + Windows/*/Intel(R) Corporation/*/9.17.10.2884/;SuperOS/*/Big Corp, Inc./Whizz\Grafix/4.2%2Fbeta%3B3/4.4 - + - Like OpenCLWhiteList, but for combinations known to be bad. + Like OpenCLWhiteList, but for combinations known to be good. - Windows/*/Intel(R) Corporation/*/9.17.10.2884/;SuperOS/*/Big Corp, Inc./Whizz\Grafix/4.2%2Fbeta%3B3/4.4 + Linux/*/Advanced Micro Devices, Inc./*/1445.5 (sse2,avx)/ diff --git a/sc/inc/calcconfig.hxx b/sc/inc/calcconfig.hxx index d46fa844d23a..40a33b6bcd7b 100644 --- a/sc/inc/calcconfig.hxx +++ b/sc/inc/calcconfig.hxx @@ -114,8 +114,8 @@ struct SC_DLLPUBLIC ScCalcConfig typedef std::set OpenCLImplMatcherSet; - OpenCLImplMatcherSet maOpenCLWhiteList; OpenCLImplMatcherSet maOpenCLBlackList; + OpenCLImplMatcherSet maOpenCLWhiteList; ScCalcConfig(); diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 0d9b769c5ce7..8825ac3567d9 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -45,10 +45,10 @@ void ScCalcConfig::setOpenCLConfigToDefault() maOpenCLSubsetOpCodes.insert(ocAverage); maOpenCLSubsetOpCodes.insert(ocSumIfs); - maOpenCLWhiteList.insert(OpenCLImplMatcher("Linux", "*", "Advanced Micro Devices, Inc.", "*", "1445.5 (sse2,avx)", "")); - maOpenCLBlackList.insert(OpenCLImplMatcher("Windows", "*", "Intel(R) Corporation", "*", "9.17.10.2884", "")); maOpenCLBlackList.insert(OpenCLImplMatcher("SuperOS", "*", "Big Corp, Inc.", "Whizz\\Grafix", "4.2/beta;3", "4.4")); + + maOpenCLWhiteList.insert(OpenCLImplMatcher("Linux", "*", "Advanced Micro Devices, Inc.", "*", "1445.5 (sse2,avx)", "")); } void ScCalcConfig::reset() @@ -76,8 +76,9 @@ bool ScCalcConfig::operator== (const ScCalcConfig& r) const maOpenCLDevice == r.maOpenCLDevice && mnOpenCLMinimumFormulaGroupSize == r.mnOpenCLMinimumFormulaGroupSize && maOpenCLSubsetOpCodes == r.maOpenCLSubsetOpCodes && + maOpenCLBlackList == r.maOpenCLBlackList && maOpenCLWhiteList == r.maOpenCLWhiteList && - maOpenCLBlackList == r.maOpenCLBlackList; + true; } bool ScCalcConfig::operator!= (const ScCalcConfig& r) const @@ -123,8 +124,8 @@ std::ostream& operator<<(std::ostream& rStream, const ScCalcConfig& rConfig) "OpenCLDevice='" << rConfig.maOpenCLDevice << "'," "OpenCLMinimumFormulaGroupSize=" << rConfig.mnOpenCLMinimumFormulaGroupSize << "," "OpenCLSubsetOpCodes={" << ScOpCodeSetToSymbolicString(rConfig.maOpenCLSubsetOpCodes) << "}," - "OpenCLWhiteList=" << rConfig.maOpenCLWhiteList << "," - "OpenCLBlackList=" << rConfig.maOpenCLBlackList << + "OpenCLBlackList=" << rConfig.maOpenCLBlackList << "," + "OpenCLWhiteList=" << rConfig.maOpenCLWhiteList << "}"; return rStream; } diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx index ae79e7519a76..75af8ff355ae 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -205,8 +205,8 @@ SfxPoolItem* ScTpFormulaItem::Clone( SfxItemPool * ) const #define SCFORMULAOPT_OPENCL_SUBSET_ONLY 13 #define SCFORMULAOPT_OPENCL_MIN_SIZE 14 #define SCFORMULAOPT_OPENCL_SUBSET_OPS 15 -#define SCFORMULAOPT_OPENCL_WHITELIST 16 -#define SCFORMULAOPT_OPENCL_BLACKLIST 17 +#define SCFORMULAOPT_OPENCL_BLACKLIST 16 +#define SCFORMULAOPT_OPENCL_WHITELIST 17 #define SCFORMULAOPT_COUNT 18 Sequence ScFormulaCfg::GetPropertyNames() @@ -229,8 +229,8 @@ Sequence ScFormulaCfg::GetPropertyNames() "Calculation/OpenCLSubsetOnly", // SCFORMULAOPT_OPENCL_SUBSET_ONLY "Calculation/OpenCLMinimumDataSize", // SCFORMULAOPT_OPENCL_MIN_SIZE "Calculation/OpenCLSubsetOpCodes", // SCFORMULAOPT_OPENCL_SUBSET_OPS - "Calculation/OpenCLWhiteList", // SCFORMULAOPT_OPENCL_WHITELIST "Calculation/OpenCLBlackList", // SCFORMULAOPT_OPENCL_BLACKLIST + "Calculation/OpenCLWhiteList", // SCFORMULAOPT_OPENCL_WHITELIST }; Sequence aNames(SCFORMULAOPT_COUNT); OUString* pNames = aNames.getArray(); @@ -260,8 +260,8 @@ ScFormulaCfg::PropsToIds ScFormulaCfg::GetPropNamesToId() SCFORMULAOPT_OPENCL_SUBSET_ONLY, SCFORMULAOPT_OPENCL_MIN_SIZE, SCFORMULAOPT_OPENCL_SUBSET_OPS, - SCFORMULAOPT_OPENCL_WHITELIST, SCFORMULAOPT_OPENCL_BLACKLIST, + SCFORMULAOPT_OPENCL_WHITELIST, }; OSL_ENSURE( SAL_N_ELEMENTS(aVals) == aPropNames.getLength(), "Properties and ids are out of Sync"); PropsToIds aPropIdMap; @@ -589,18 +589,18 @@ void ScFormulaCfg::UpdateFromProperties( const Sequence& aNames ) GetCalcConfig().maOpenCLSubsetOpCodes = ScStringToOpCodeSet(sVal); } break; - case SCFORMULAOPT_OPENCL_WHITELIST: + case SCFORMULAOPT_OPENCL_BLACKLIST: { - css::uno::Sequence sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLWhiteList); + css::uno::Sequence sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLBlackList); pValues[nProp] >>= sVal; - GetCalcConfig().maOpenCLWhiteList = StringSequenceToSetOfOpenCLImplMatcher(sVal); + GetCalcConfig().maOpenCLBlackList = StringSequenceToSetOfOpenCLImplMatcher(sVal); } break; - case SCFORMULAOPT_OPENCL_BLACKLIST: + case SCFORMULAOPT_OPENCL_WHITELIST: { - css::uno::Sequence sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLBlackList); + css::uno::Sequence sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLWhiteList); pValues[nProp] >>= sVal; - GetCalcConfig().maOpenCLBlackList = StringSequenceToSetOfOpenCLImplMatcher(sVal); + GetCalcConfig().maOpenCLWhiteList = StringSequenceToSetOfOpenCLImplMatcher(sVal); } break; } @@ -756,15 +756,15 @@ void ScFormulaCfg::Commit() pValues[nProp] <<= sVal; } break; - case SCFORMULAOPT_OPENCL_WHITELIST: + case SCFORMULAOPT_OPENCL_BLACKLIST: { - css::uno::Sequence sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLWhiteList); + css::uno::Sequence sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLBlackList); pValues[nProp] <<= sVal; } break; - case SCFORMULAOPT_OPENCL_BLACKLIST: + case SCFORMULAOPT_OPENCL_WHITELIST: { - css::uno::Sequence sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLBlackList); + css::uno::Sequence sVal = SetOfOpenCLImplMatcherToStringSequence(GetCalcConfig().maOpenCLWhiteList); pValues[nProp] <<= sVal; } break; diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 7925158df3e5..5e003dfcb01e 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -30,8 +30,8 @@ typedef enum { CALC_OPTION_ENABLE_OPENCL_SUBSET, CALC_OPTION_OPENCL_MIN_SIZE, CALC_OPTION_OPENCL_SUBSET_OPS, - CALC_OPTION_OPENCL_WHITELIST, CALC_OPTION_OPENCL_BLACKLIST, + CALC_OPTION_OPENCL_WHITELIST, } CalcOptionOrder; class OptionString : public SvLBoxString @@ -207,12 +207,12 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi maCaptionOpenCLSubsetOpCodes = get("opencl_subset_opcodes")->GetText(); maDescOpenCLSubsetOpCodes = get("opencl_subset_opcodes_desc")->GetText(); - maCaptionOpenCLWhiteList = get("opencl_whitelist")->GetText(); - maDescOpenCLWhiteList = get("opencl_whitelist_desc")->GetText(); - maCaptionOpenCLBlackList = get("opencl_blacklist")->GetText(); maDescOpenCLBlackList = get("opencl_blacklist_desc")->GetText(); + maCaptionOpenCLWhiteList = get("opencl_whitelist")->GetText(); + maDescOpenCLWhiteList = get("opencl_whitelist_desc")->GetText(); + maSoftware = get("software")->GetText(); mpLbSettings->set_height_request(8 * mpLbSettings->GetTextHeight()); @@ -378,8 +378,8 @@ void ScCalcOptionsDialog::FillOptionsList() pModel->Insert(createItem(maCaptionOpenCLSubsetEnabled,toString(maConfig.mbOpenCLSubsetOnly))); pModel->Insert(createItem(maCaptionOpenCLMinimumFormulaSize,toString(maConfig.mnOpenCLMinimumFormulaGroupSize))); pModel->Insert(createItem(maCaptionOpenCLSubsetOpCodes,ScOpCodeSetToSymbolicString(maConfig.maOpenCLSubsetOpCodes))); - pModel->Insert(createItem(maCaptionOpenCLWhiteList,"")); pModel->Insert(createItem(maCaptionOpenCLBlackList,"")); + pModel->Insert(createItem(maCaptionOpenCLWhiteList,"")); fillOpenCLList(); @@ -577,8 +577,8 @@ void ScCalcOptionsDialog::SelectionChanged() break; // string lists - case CALC_OPTION_OPENCL_WHITELIST: case CALC_OPTION_OPENCL_BLACKLIST: + case CALC_OPTION_OPENCL_WHITELIST: { mpLbOptionEdit->Hide(); mpBtnTrue->Hide(); @@ -654,8 +654,8 @@ void ScCalcOptionsDialog::ListOptionValueChanged() case CALC_OPTION_ENABLE_OPENCL_SUBSET: case CALC_OPTION_OPENCL_MIN_SIZE: case CALC_OPTION_OPENCL_SUBSET_OPS: - case CALC_OPTION_OPENCL_WHITELIST: case CALC_OPTION_OPENCL_BLACKLIST: + case CALC_OPTION_OPENCL_WHITELIST: break; } } diff --git a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui index 312f3be2c088..e829c28511d1 100644 --- a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui +++ b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui @@ -705,10 +705,10 @@ - + False True - List known-good OpenCL implementations + List of known-bad OpenCL implementations 0 @@ -718,10 +718,10 @@ - + False True - List of known-good OpenCL implementations. + List of known-bad OpenCL implementations. True 56 @@ -733,10 +733,10 @@ - + False True - List of known-bad OpenCL implementations + List of known-good OpenCL implementations 0 @@ -746,10 +746,10 @@ - + False True - List of known-bad OpenCL implementations. + List of known-good OpenCL implementations. True 56 -- cgit