MATLAB PARALLEL COMPUTING TOOLBOX - S Uživatelská příručka Strana 496

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 656
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 495
11 Functions — Alphabetical List
11-152
labindex
Index of this worker
Syntax
id = labindex
Description
id = labindex returns the index of the worker currently executing the function.
labindex is assigned to each worker when a job begins execution, and applies only for
the duration of that job. The value of labindex spans from 1 to n, where n is the number
of workers running the current job, defined by numlabs.
More About
Tips
In an spmd block, because you have access to all workers individually and control what
gets executed on them, each worker has a unique labindex.
However, inside a parfor-loop, labindex always returns a value of 1.
See Also
labSendReceive | numlabs
Zobrazit stránku 495
1 2 ... 491 492 493 494 495 496 497 498 499 500 501 ... 655 656

Komentáře k této Příručce

Žádné komentáře