labProbe
Determine if data is available for the current worker in an spmd
to receive
Syntax
Description
tf = labProbe
tests if data is available for the current worker in
an spmd
block or communicating job to receive using labReceive
.
Tip
When you offload computations using parfor
and
parfeval
, each computation is run by only one worker at a time.
These workers are independent and do not communicate with each other. If you use
labProbe
on these workers, the function has no effect.
If data is available, labProbe
returns logical 1
(true
); otherwise, it returns logical 0
(false
).
To use labProbe
, numlabs
must be greater than
1
.
tf = labProbe(
tests if data is
available for the current worker to receive from the worker with
source
)labindex
equal to source
.
tf = labProbe('any')
tests if the sent data is available for the
current worker to receive from any worker.
tf = labProbe('any',
tests if data sent
with the tag tag
)tag
is available for the current worker to receive from
any worker.