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

Add a 'Test' button to test the machine's OpenCL implementation

Does not yet do anything, but will essentially run a "unit test" of the OpenCL
functionality required by the default subset of opcodes.

Change-Id: I230f6232c90562ea56057347fb0dc088f98c215d
üst a177c4c7
......@@ -153,6 +153,7 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
get(mpDriverVersionMax, "opencldriverversionmax");
get(mpListNewButton, "listbox-new");
get(mpListDeleteButton, "listbox-delete");
get(mpTestButton, "test");
get(mpOpenclInfoList, "opencl_list");
get(mpBtnAutomaticSelectionTrue, "automatic_select_true");
get(mpBtnAutomaticSelectionFalse, "automatic_select_false");
......@@ -228,6 +229,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
mpListNewButton->SetClickHdl(LINK(this, ScCalcOptionsDialog, ListNewClickHdl));
mpListDeleteButton->SetClickHdl(LINK(this, ScCalcOptionsDialog, ListDeleteClickHdl));
mpTestButton->SetClickHdl(LINK(this, ScCalcOptionsDialog, TestClickHdl));
aLink = LINK(this, ScCalcOptionsDialog, BtnToggleHdl);
mpBtnTrue->SetToggleHdl(aLink); // Set handler only to the 'True' button.
......@@ -951,4 +954,12 @@ IMPL_LINK( ScCalcOptionsDialog, ListDeleteClickHdl, PushButton*, )
return 0;
}
IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, )
{
// Automatically test the current implementation of OpenCL. If it
// seems good, whitelist it. If it seems bad, blacklist it.
return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -43,6 +43,7 @@ public:
DECL_LINK( OpenCLWhiteAndBlackListSelHdl, Control* );
DECL_LINK( ListNewClickHdl, PushButton* );
DECL_LINK( ListDeleteClickHdl, PushButton* );
DECL_LINK( TestClickHdl, PushButton* );
const ScCalcConfig& GetConfig() const { return maConfig;}
......@@ -86,6 +87,7 @@ private:
Edit* mpDriverVersionMax;
PushButton* mpListNewButton;
PushButton* mpListDeleteButton;
PushButton* mpTestButton;
FixedText* mpFtAnnotation;
FixedText* mpFtFrequency;
......
......@@ -386,6 +386,19 @@
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="test">
<property name="label" translatable="yes">_Test</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">2</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