[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: none
From: |
Geraint |
Subject: |
Re: none |
Date: |
08 Apr 2003 20:24:12 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Geraint <address@hidden> writes:
> Jill,
>
> just a shot in the dark...
>
> the worker threads don't return any value - this may be the source of the
> error messages. You could perhaps try returning a dummy value from the worker
> thread (maybe the taskid would be useful for debugging)
>
> if (taskid == MASTER) {
> stuff;
> return octave_value(m);
> } else if (taskid > MASTER) {
> stuff;
> return static_cast<double>(taskid);
> }
>
> Geraint.
>
>
p.s.
Alternatively, if you don't want the worker threads to return, you could
probably do something like:
void worker_stuff()
{
stuff;
}
DEFUN_DLD(...)
{
if (taskid > MASTER) {
worker_stuff();
} else if (taskid == MASTER) {
block_until_workers_finished();
}
return octave_value(m);
}
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------