summaryrefslogtreecommitdiffstats
path: root/sc/inc/clkernelthread.hxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-11-13 10:50:12 +0200
committerMichael Meeks <michael.meeks@collabora.com>2013-11-20 18:23:04 +0000
commitc0307ec2bafa0751e7d8ea1f4d6caac58c5cc5dc (patch)
tree9409294335033e5faf8999684b162301e6d8fd7b /sc/inc/clkernelthread.hxx
parentUse the more generic CompiledFormula type (diff)
downloadcore-c0307ec2bafa0751e7d8ea1f4d6caac58c5cc5dc.tar.gz
core-c0307ec2bafa0751e7d8ea1f4d6caac58c5cc5dc.zip
WIP commit of threaded OpenCL compilation work
Change-Id: I210d0ded9cb38569b0831355522d8309cee05f56
Diffstat (limited to 'sc/inc/clkernelthread.hxx')
-rw-r--r--sc/inc/clkernelthread.hxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/sc/inc/clkernelthread.hxx b/sc/inc/clkernelthread.hxx
index c780c2852b9a..89ae860318f0 100644
--- a/sc/inc/clkernelthread.hxx
+++ b/sc/inc/clkernelthread.hxx
@@ -7,11 +7,21 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <queue>
+
#include <osl/conditn.hxx>
#include <salhelper/thread.hxx>
+#include "formulacell.hxx"
+
namespace sc {
+struct CLBuildKernelWorkItem
+{
+ enum { COMPILE, FINISH } meWhatToDo;
+ ScFormulaCellGroupRef mxGroup;
+};
+
class CLBuildKernelThread : public salhelper::Thread
{
public:
@@ -20,11 +30,15 @@ public:
void finish();
+ void push(CLBuildKernelWorkItem item);
+
protected:
virtual void execute();
private:
- osl::Condition maConsumeCondition;
+ osl::Mutex maMutex;
+ osl::Condition maCondition;
+ std::queue<CLBuildKernelWorkItem> maQueue;
void produce();
void consume();
};