Kaydet (Commit) 372bef89 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Split driver version specification into a range

Change-Id: I1f26b47054e70e54ce81d3ec4cbc5ff58c1aeea3
üst 4554e71e
......@@ -1401,7 +1401,7 @@
<info>
<desc>Like OpenCLWhiteList, but for combinations known to be bad.</desc>
</info>
<value oor:separator=";">Windows/*/Intel(R) Corporation/*/9.17.10.2884;SuperOS/*/Big Corp, Inc./Whizz\Grafix/4.2%2Fbeta%3B3</value>
<value oor:separator=";">Windows/*/Intel(R) Corporation/*/9.17.10.2884/;SuperOS/*/Big Corp, Inc./Whizz\Grafix/4.2%2Fbeta%3B3/4.4</value>
</prop>
</group>
<group oor:name="Syntax">
......
......@@ -47,7 +47,8 @@ struct SC_DLLPUBLIC ScCalcConfig
OUString maOSVersion;
OUString maPlatformVendor;
OUString maDevice;
OUString maDriverVersion;
OUString maDriverVersionMin;
OUString maDriverVersionMax;
OpenCLImplMatcher()
{
......@@ -57,12 +58,14 @@ struct SC_DLLPUBLIC ScCalcConfig
const OUString& rOSVersion,
const OUString& rPlatformVendor,
const OUString& rDevice,
const OUString& rDriverVersion)
const OUString& rDriverVersionMin,
const OUString& rDriverVersionMax)
: maOS(rOS),
maOSVersion(rOSVersion),
maPlatformVendor(rPlatformVendor),
maDevice(rDevice),
maDriverVersion(rDriverVersion)
maDriverVersionMin(rDriverVersionMin),
maDriverVersionMax(rDriverVersionMax)
{
}
......@@ -72,7 +75,8 @@ struct SC_DLLPUBLIC ScCalcConfig
maOSVersion == r.maOSVersion &&
maPlatformVendor == r.maPlatformVendor &&
maDevice == r.maDevice &&
maDriverVersion == r.maDriverVersion;
maDriverVersionMin == r.maDriverVersionMin &&
maDriverVersionMax == r.maDriverVersionMax;
}
bool operator!=(const OpenCLImplMatcher& r) const
{
......@@ -88,7 +92,9 @@ struct SC_DLLPUBLIC ScCalcConfig
(maPlatformVendor == r.maPlatformVendor &&
(maDevice < r.maDevice ||
(maDevice == r.maDevice &&
(maDriverVersion < r.maDriverVersion)))))))));
(maDriverVersionMin < r.maDriverVersionMin ||
(maDriverVersionMin == r.maDriverVersionMin &&
maDriverVersionMax < r.maDriverVersionMax))))))))));
}
};
......
......@@ -44,8 +44,8 @@ void ScCalcConfig::setOpenCLConfigToDefault()
maOpenCLSubsetOpCodes.insert(ocSum);
maOpenCLSubsetOpCodes.insert(ocAverage);
maOpenCLSubsetOpCodes.insert(ocSumIfs);
maOpenCLBlackList.insert(OpenCLImplMatcher("Windows", "*", "Intel(R) Corporation", "*", "9.17.10.2884"));
maOpenCLBlackList.insert(OpenCLImplMatcher("SuperOS", "*", "Big Corp, Inc.", "Whizz\\Grafix", "4.2/beta;3"));
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"));
}
void ScCalcConfig::reset()
......@@ -89,7 +89,7 @@ std::ostream& operator<<(std::ostream& rStream, const ScCalcConfig::OpenCLImplMa
"OSVersion=" << rImpl.maOSVersion << ","
"PlatformVendor=" << rImpl.maPlatformVendor << ","
"Device=" << rImpl.maDevice << ","
"DriverVersion=" << rImpl.maDriverVersion <<
"DriverVersion=[" << rImpl.maDriverVersionMin << "," << rImpl.maDriverVersionMax << "]"
"}";
return rStream;
......
......@@ -292,7 +292,8 @@ css::uno::Sequence<OUString> SetOfOpenCLImplMatcherToStringSequence(std::set<ScC
(*i).maOSVersion.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
(*i).maPlatformVendor.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
(*i).maDevice.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
(*i).maDriverVersion.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B");
(*i).maDriverVersionMin.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
(*i).maDriverVersionMax.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B");
}
return result;
......@@ -335,7 +336,8 @@ std::set<ScCalcConfig::OpenCLImplMatcher> StringSequenceToSetOfOpenCLImplMatcher
m.maOSVersion = getToken(*i, index);
m.maPlatformVendor = getToken(*i, index);
m.maDevice = getToken(*i, index);
m.maDriverVersion = getToken(*i, index);
m.maDriverVersionMin = getToken(*i, index);
m.maDriverVersionMax = getToken(*i, index);
result.insert(m);
}
......
......@@ -149,7 +149,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
get(mpOSVersion, "osversion");
get(mpPlatformVendor, "platformvendor");
get(mpDevice, "opencldevice");
get(mpDriverVersion, "opencldriverversion");
get(mpDriverVersionMin, "opencldriverversionmin");
get(mpDriverVersionMax, "opencldriverversionmax");
get(mpListEditButton, "listbox-edit");
get(mpListNewButton, "listbox-new");
get(mpListDeleteButton, "listbox-delete");
......@@ -166,7 +167,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
mpOSVersion->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpPlatformVendor->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpDevice->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpDriverVersion->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpDriverVersionMin->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpDriverVersionMax->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpOpenCLWhiteAndBlackListBox->set_height_request(4* mpOpenCLWhiteAndBlackListBox->GetTextHeight());
mpOpenCLWhiteAndBlackListBox->SetStyle(mpOpenCLWhiteAndBlackListBox->GetStyle() | WB_CLIPCHILDREN | WB_FORCE_MAKEVISIBLE);
......@@ -314,7 +316,10 @@ OUString format(const ScCalcConfig::OpenCLImplMatcher& rImpl)
rImpl.maOSVersion + " " +
rImpl.maPlatformVendor + " " +
rImpl.maDevice + " " +
rImpl.maDriverVersion);
(rImpl.maDriverVersionMax != "" ?
OUString("[") + rImpl.maDriverVersionMin + "," + rImpl.maDriverVersionMax + "]" :
rImpl.maDriverVersionMin)
);
}
void fillListBox(ListBox* pListBox, const ScCalcConfig::OpenCLImplMatcherSet& rSet)
......@@ -794,9 +799,13 @@ void ScCalcOptionsDialog::EditFieldValueChanged(Control *pCtrl)
{
newImpl.maDevice = sVal;
}
else if (pEdit == mpDriverVersion)
else if (pEdit == mpDriverVersionMin)
{
newImpl.maDriverVersion = sVal;
newImpl.maDriverVersionMin = sVal;
}
else if (pEdit == mpDriverVersionMax)
{
newImpl.maDriverVersionMax = sVal;
}
else
assert(false && "pEdit does not match any of the Edit fields");
......@@ -905,7 +914,8 @@ IMPL_LINK(ScCalcOptionsDialog, OpenCLWhiteAndBlackListSelHdl, Control*, )
mpOSVersion->SetText(impl.maOSVersion);
mpPlatformVendor->SetText(impl.maPlatformVendor);
mpDevice->SetText(impl.maDevice);
mpDriverVersion->SetText(impl.maDriverVersion);
mpDriverVersionMin->SetText(impl.maDriverVersionMin);
mpDriverVersionMax->SetText(impl.maDriverVersionMax);
return 0;
}
......
......@@ -80,7 +80,8 @@ private:
Edit* mpOSVersion;
Edit* mpPlatformVendor;
Edit* mpDevice;
Edit* mpDriverVersion;
Edit* mpDriverVersionMin;
Edit* mpDriverVersionMax;
PushButton* mpListEditButton;
PushButton* mpListNewButton;
PushButton* mpListDeleteButton;
......
......@@ -214,8 +214,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_OS</property>
<property name="use_underline">True</property>
<property name="label" translatable="yes">OS</property>
<property name="mnemonic_widget">os:border</property>
</object>
<packing>
......@@ -238,8 +237,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">OS _Version</property>
<property name="use_underline">True</property>
<property name="label" translatable="yes">OS Version</property>
<property name="mnemonic_widget">osversion:border</property>
</object>
<packing>
......@@ -263,7 +261,6 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">OpenCL Platform Vendor</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">openclvendor:border</property>
</object>
<packing>
......@@ -287,7 +284,6 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">OpenCL Device</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">opencldevice:border</property>
</object>
<packing>
......@@ -306,13 +302,12 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="opencldriverversionlabel">
<object class="GtkLabel" id="opencldriverversionminlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">OpenCL Driver Version</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">opencldriverversion:border</property>
<property name="label" translatable="yes">OpenCL Driver Version Lower Bound</property>
<property name="mnemonic_widget">opencldriverversionmin:border</property>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -320,7 +315,7 @@
</packing>
</child>
<child>
<object class="GtkEntry" id="opencldriverversion:border">
<object class="GtkEntry" id="opencldriverversionmin:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
......@@ -329,6 +324,29 @@
<property name="top_attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="opencldriverversionmaxlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">OpenCL Driver Version Upper Bound</property>
<property name="mnemonic_widget">opencldriverversionmax:border</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">10</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="opencldriverversionmax:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">11</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment