diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-11-26 22:30:33 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-11-27 11:07:37 +0200 |
commit | c1d09b1ad02160850d40c0d242a0d0ec0a8dc1bc (patch) | |
tree | e39b6a73639f483a3000cdec31890cfdd051a5af /sc/inc | |
parent | ccfb8c78277d4a4f85af5ebbd96cf87f0d729016 (diff) |
Work in progress: Move Calc-independend OpenCL configuration out of sc
Intermediate commit. More changes will follow: The device selection
logic needs to be moved, too. (And cleaned up.) Instead of the
separate formulacalculationoptions dialog we should simply have a
normal options page for those OpenCL-related settings that will remain
purely Calc-specific, like the formula opcode subsetting.
Change-Id: Id60d95e80d377cbbf5780beb473b221bce06b5e5
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/calcconfig.hxx | 59 | ||||
-rw-r--r-- | sc/inc/formulagroup.hxx | 2 | ||||
-rw-r--r-- | sc/inc/platforminfo.hxx | 50 |
3 files changed, 1 insertions, 110 deletions
diff --git a/sc/inc/calcconfig.hxx b/sc/inc/calcconfig.hxx index 0a27d1b3be1a..1477134511de 100644 --- a/sc/inc/calcconfig.hxx +++ b/sc/inc/calcconfig.hxx @@ -40,58 +40,6 @@ struct SC_DLLPUBLIC ScCalcConfig STRING_CONVERSION_UNAMBIGUOUS, ///< =1+"1" gives 2, but =1+"1.000" or =1+"x" give #VALUE! STRING_CONVERSION_LOCALE_DEPENDENT ///< =1+"1.000" may be 2 or 1001 ... =1+"x" gives #VALUE! }; - - struct OpenCLImplMatcher - { - OUString maOS; - OUString maOSVersion; - OUString maPlatformVendor; - OUString maDevice; - OUString maDriverVersion; - - OpenCLImplMatcher() - { - } - - OpenCLImplMatcher(const OUString& rOS, - const OUString& rOSVersion, - const OUString& rPlatformVendor, - const OUString& rDevice, - const OUString& rDriverVersion) - : maOS(rOS), - maOSVersion(rOSVersion), - maPlatformVendor(rPlatformVendor), - maDevice(rDevice), - maDriverVersion(rDriverVersion) - { - } - - bool operator==(const OpenCLImplMatcher& r) const - { - return maOS == r.maOS && - maOSVersion == r.maOSVersion && - maPlatformVendor == r.maPlatformVendor && - maDevice == r.maDevice && - maDriverVersion == r.maDriverVersion; - } - bool operator!=(const OpenCLImplMatcher& r) const - { - return !operator==(r); - } - bool operator<(const OpenCLImplMatcher& r) const - { - return (maOS < r.maOS || - (maOS == r.maOS && - (maOSVersion < r.maOSVersion || - (maOSVersion == r.maOSVersion && - (maPlatformVendor < r.maPlatformVendor || - (maPlatformVendor == r.maPlatformVendor && - (maDevice < r.maDevice || - (maDevice == r.maDevice && - (maDriverVersion < r.maDriverVersion))))))))); - } - }; - formula::FormulaGrammar::AddressConvention meStringRefAddressSyntax; StringConversion meStringConversion; bool mbEmptyStringAsZero:1; @@ -105,11 +53,6 @@ struct SC_DLLPUBLIC ScCalcConfig OpCodeSet maOpenCLSubsetOpCodes; - typedef std::set<OpenCLImplMatcher> OpenCLImplMatcherSet; - - OpenCLImplMatcherSet maOpenCLBlackList; - OpenCLImplMatcherSet maOpenCLWhiteList; - ScCalcConfig(); void setOpenCLConfigToDefault(); @@ -121,8 +64,6 @@ struct SC_DLLPUBLIC ScCalcConfig bool operator!= (const ScCalcConfig& r) const; }; -SC_DLLPUBLIC std::ostream& operator<<(std::ostream& rStream, const ScCalcConfig::OpenCLImplMatcher& rImpl); -SC_DLLPUBLIC std::ostream& operator<<(std::ostream& rStream, const ScCalcConfig::OpenCLImplMatcherSet& rSet); SC_DLLPUBLIC std::ostream& operator<<(std::ostream& rStream, const ScCalcConfig& rConfig); SC_DLLPUBLIC OUString ScOpCodeSetToNumberString(const ScCalcConfig::OpCodeSet& rOpCodes); diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx index ba5f31893345..19debeeec669 100644 --- a/sc/inc/formulagroup.hxx +++ b/sc/inc/formulagroup.hxx @@ -12,10 +12,10 @@ #include "address.hxx" #include "types.hxx" -#include "platforminfo.hxx" #include "stlalgorithm.hxx" #include <formula/opcode.hxx> +#include <opencl/platforminfo.hxx> #include <svl/sharedstringpool.hxx> #include <set> diff --git a/sc/inc/platforminfo.hxx b/sc/inc/platforminfo.hxx deleted file mode 100644 index 8fd0ee2aeabc..000000000000 --- a/sc/inc/platforminfo.hxx +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- 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/. - */ - -#ifndef INCLUDED_SC_INC_PLATFORMINFO_HXX -#define INCLUDED_SC_INC_PLATFORMINFO_HXX - -#include <ostream> -#include <vector> - -#include <rtl/ustring.hxx> - -#include "scdllapi.h" - -namespace sc { - -struct SC_DLLPUBLIC OpenCLDeviceInfo -{ - void* device; - OUString maName; - OUString maVendor; - OUString maDriver; - size_t mnMemory; - size_t mnComputeUnits; - size_t mnFrequency; - - OpenCLDeviceInfo(); -}; - -struct SC_DLLPUBLIC OpenCLPlatformInfo -{ - void* platform; - OUString maVendor; - OUString maName; - std::vector<OpenCLDeviceInfo> maDevices; - - OpenCLPlatformInfo(); -}; - -} - -SC_DLLPUBLIC std::ostream& operator<<(std::ostream& rStream, const sc::OpenCLPlatformInfo& rPlatform); -SC_DLLPUBLIC std::ostream& operator<<(std::ostream& rStream, const sc::OpenCLDeviceInfo& rDevice); - -#endif |