LibreOffice Module sc (master) 1
calcconfig.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#pragma once
11
12#include "scdllapi.h"
13
14#include <memory>
15#include <string_view>
16
18#include <formula/grammar.hxx>
19#include <formula/opcode.hxx>
20#include <rtl/ustring.hxx>
21
22// have to match the registry values
24{
28};
29
30// Env.var. SC_FORCE_CALCULATION can be used to force all calculation
31// to be done using OpenCL or group threading (even for single cells).
33{
34 ForceCalculationNone, // do not force anything
35 ForceCalculationCore, // "core", use only non-threaded normal code
36 ForceCalculationOpenCL, // "opencl", force OpenCL
37 ForceCalculationThreads // "threads", force threaded code
38};
39
44{
45 // from most stringent to most relaxed
47 {
48 ILLEGAL,
49 ZERO,
50 UNAMBIGUOUS,
51 LOCALE
52 };
57
58 static bool isOpenCLEnabled();
59 static bool isThreadingEnabled();
60 static ForceCalculationType getForceCalculationType();
61
66
67 typedef std::shared_ptr<o3tl::sorted_vector<OpCode>> OpCodeSet;
68
70
72
73 void setOpenCLConfigToDefault();
74
75 void reset();
76 void MergeDocumentSpecific(const ScCalcConfig& r);
77 void SetStringRefSyntax(formula::FormulaGrammar::AddressConvention eConv);
78
79 bool operator==(const ScCalcConfig& r) const;
80 bool operator!=(const ScCalcConfig& r) const;
81};
82
84ScCalcConfig::OpCodeSet ScStringToOpCodeSet(std::u16string_view rOpCodes);
85
86/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScRecalcOptions
Definition: calcconfig.hxx:24
@ RECALC_NEVER
Definition: calcconfig.hxx:26
@ RECALC_ALWAYS
Definition: calcconfig.hxx:25
@ RECALC_ASK
Definition: calcconfig.hxx:27
OUString ScOpCodeSetToSymbolicString(const ScCalcConfig::OpCodeSet &rOpCodes)
Definition: calcconfig.cxx:187
ScCalcConfig::OpCodeSet ScStringToOpCodeSet(std::u16string_view rOpCodes)
Definition: calcconfig.cxx:203
ForceCalculationType
Definition: calcconfig.hxx:33
@ ForceCalculationThreads
Definition: calcconfig.hxx:37
@ ForceCalculationOpenCL
Definition: calcconfig.hxx:36
@ ForceCalculationCore
Definition: calcconfig.hxx:35
@ ForceCalculationNone
Definition: calcconfig.hxx:34
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
Configuration options for formula interpreter.
Definition: calcconfig.hxx:44
sal_Int32 mnOpenCLMinimumFormulaGroupSize
Definition: calcconfig.hxx:65
bool mbOpenCLSubsetOnly
Definition: calcconfig.hxx:62
StringConversion meStringConversion
Definition: calcconfig.hxx:54
OpCodeSet mpOpenCLSubsetOpCodes
Definition: calcconfig.hxx:69
std::shared_ptr< o3tl::sorted_vector< OpCode > > OpCodeSet
Definition: calcconfig.hxx:67
bool mbOpenCLAutoSelect
Definition: calcconfig.hxx:63
formula::FormulaGrammar::AddressConvention meStringRefAddressSyntax
Definition: calcconfig.hxx:53
OUString maOpenCLDevice
Definition: calcconfig.hxx:64
bool mbHasStringRefSyntax
Definition: calcconfig.hxx:56
bool mbEmptyStringAsZero
Definition: calcconfig.hxx:55
constexpr OUStringLiteral LOCALE
Definition: vbaformat.cxx:58
bool operator!=(const XclExpString &rLeft, const XclExpString &rRight)
Definition: xestring.hxx:248
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Definition: xlstyle.cxx:518