/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
OpenCLConfig::OpenCLConfig() :
mbUseOpenCL(true)
{ // 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.
maDenyList.insert(ImplMatcher(u"Windows"_ustr, u""_ustr, u"Intel\\(R\\) Corporation"_ustr, u""_ustr, u"9\\.17\\.10\\.2884"_ustr)); // This was reported to produce bogus values in unit tests
maDenyList.insert(ImplMatcher(u"Windows"_ustr, u""_ustr, u"Intel\\(R\\) Corporation"_ustr, u""_ustr, u"27\\.20\\.100\\.8681"_ustr));
// For now, assume that AMD, Intel and NVIDIA drivers are good
maAllowList.insert(ImplMatcher(u""_ustr, u""_ustr, u"Advanced Micro Devices, Inc\\."_ustr, u""_ustr, u""_ustr));
maAllowList.insert(ImplMatcher(u""_ustr, u""_ustr, u"Intel\\(R\\) Corporation"_ustr, u""_ustr, u""_ustr));
maAllowList.insert(ImplMatcher(u""_ustr, u""_ustr, u"NVIDIA Corporation"_ustr, u""_ustr, u""_ustr));
}
bool OpenCLConfig::checkImplementation(const OpenCLPlatformInfo& rPlatform, const OpenCLDeviceInfo& rDevice) const
{ // Check denylist of known bad OpenCL implementations if (match(maDenyList, rPlatform, rDevice, "denylist"))
{
SAL_INFO("opencl", "Rejecting"); returntrue;
}
// Check for allowlist of known good OpenCL implementations if (match(maAllowList, rPlatform, rDevice, "allowlist"))
{
SAL_INFO("opencl", "Approving"); returnfalse;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.