summaryrefslogtreecommitdiff
path: root/opencl
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2020-07-06 03:01:51 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-07-10 01:34:54 +0200
commit493ae7a6bb0c3ad50615db0090e7ae8d391bc327 (patch)
tree9f60f522f1ff9dde6a8131d155654f4d47b37fd0 /opencl
parent005f5db47b8e1bbd7ebddee92009be072e835fd5 (diff)
replace usage of blacklist with denylist
.. and a few cases of instead doing blacklist->excludelist where that made more sense. Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 [API CHANGE] officecfg::Office::Canvas::DeviceBlacklist -> DeviceDenylist [API CHANGE] officecfg::Office::Canvas::BlacklistCurrentDevice -> DenylistCurrentDevice [API CHANGE] officecfg::Office::Common::Misc::OpenCLBlackList -> OpenCLDenyList Change-Id: Ia35e25496bf0cc0692d5de4cb66bfc232d3a869e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98180 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'opencl')
-rw-r--r--opencl/source/opencl_device.cxx6
-rw-r--r--opencl/source/openclconfig.cxx16
2 files changed, 11 insertions, 11 deletions
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx
index 1b6800e0ef8c..971c63ee3fe0 100644
--- a/opencl/source/opencl_device.cxx
+++ b/opencl/source/opencl_device.cxx
@@ -345,7 +345,7 @@ int pickBestDevice(std::unique_ptr<ds_profile> const & profile)
{
ds_device& device = profile->devices[d];
- // Check blacklist and whitelist for actual devices
+ // Check denylist and whitelist for actual devices
if (device.eType == DeviceType::OpenCLDevice)
{
// There is a silly impedance mismatch here. Why do we
@@ -360,10 +360,10 @@ int pickBestDevice(std::unique_ptr<ds_profile> const & profile)
aDevice.maName = OStringToOUString(device.sDeviceName, RTL_TEXTENCODING_UTF8);
aDevice.maDriver = OStringToOUString(device.sDriverVersion, RTL_TEXTENCODING_UTF8);
- // If blacklisted or not whitelisted, ignore it
+ // If denylisted or not whitelisted, ignore it
if (OpenCLConfig::get().checkImplementation(aPlatform, aDevice))
{
- SAL_INFO("opencl.device", "Device[" << d << "] " << device.sDeviceName << " is blacklisted or not whitelisted");
+ SAL_INFO("opencl.device", "Device[" << d << "] " << device.sDeviceName << " is denylisted or not whitelisted");
device.fTime = DBL_MAX;
device.bErrors = false;
}
diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx
index 643d9fc2a8a1..9a4b1d6bc4c0 100644
--- a/opencl/source/openclconfig.cxx
+++ b/opencl/source/openclconfig.cxx
@@ -25,10 +25,10 @@
OpenCLConfig::OpenCLConfig() :
mbUseOpenCL(true)
{
- // This entry we have had for some time (when blacklisting was
+ // This entry we have had for some time (when denylisting was
// done elsewhere in the code), so presumably there is a known
// good reason for it.
- maBlackList.insert(ImplMatcher("Windows", "", "Intel\\(R\\) Corporation", "", "9\\.17\\.10\\.2884"));
+ maDenyList.insert(ImplMatcher("Windows", "", "Intel\\(R\\) Corporation", "", "9\\.17\\.10\\.2884"));
// This is what I have tested on Linux and it works for our unit tests.
maWhiteList.insert(ImplMatcher("Linux", "", "Advanced Micro Devices, Inc\\.", "", "1445\\.5 \\(sse2,avx\\)"));
@@ -42,7 +42,7 @@ OpenCLConfig::OpenCLConfig() :
bool OpenCLConfig::operator== (const OpenCLConfig& r) const
{
return (mbUseOpenCL == r.mbUseOpenCL &&
- maBlackList == r.maBlackList &&
+ maDenyList == r.maDenyList &&
maWhiteList == r.maWhiteList);
}
@@ -180,7 +180,7 @@ OpenCLConfig OpenCLConfig::get()
result.mbUseOpenCL = officecfg::Office::Common::Misc::UseOpenCL::get();
- result.maBlackList = StringSequenceToSetOfImplMatcher(officecfg::Office::Common::Misc::OpenCLBlackList::get());
+ result.maDenyList = StringSequenceToSetOfImplMatcher(officecfg::Office::Common::Misc::OpenCLDenyList::get());
result.maWhiteList = StringSequenceToSetOfImplMatcher(officecfg::Office::Common::Misc::OpenCLWhiteList::get());
return result;
@@ -191,7 +191,7 @@ void OpenCLConfig::set()
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Misc::UseOpenCL::set(mbUseOpenCL, batch);
- officecfg::Office::Common::Misc::OpenCLBlackList::set(SetOfImplMatcherToStringSequence(maBlackList), batch);
+ officecfg::Office::Common::Misc::OpenCLDenyList::set(SetOfImplMatcherToStringSequence(maDenyList), batch);
officecfg::Office::Common::Misc::OpenCLWhiteList::set(SetOfImplMatcherToStringSequence(maWhiteList), batch);
batch->commit();
@@ -199,8 +199,8 @@ void OpenCLConfig::set()
bool OpenCLConfig::checkImplementation(const OpenCLPlatformInfo& rPlatform, const OpenCLDeviceInfo& rDevice) const
{
- // Check blacklist of known bad OpenCL implementations
- if (match(maBlackList, rPlatform, rDevice, "blacklist"))
+ // Check denylist of known bad OpenCL implementations
+ if (match(maDenyList, rPlatform, rDevice, "denylist"))
{
SAL_INFO("opencl", "Rejecting");
return true;
@@ -222,7 +222,7 @@ std::ostream& operator<<(std::ostream& rStream, const OpenCLConfig& rConfig)
{
rStream << "{"
"UseOpenCL=" << (rConfig.mbUseOpenCL ? "YES" : "NO") << ","
- "BlackList=" << rConfig.maBlackList << ","
+ "DenyList=" << rConfig.maDenyList << ","
"WhiteList=" << rConfig.maWhiteList <<
"}";
return rStream;