__cilkrts_get_total_workers

int __cilkrts_get_total_workers (void);

The runtime system may allocate more workers than are active at a given time. The function __cilkrts_get_total_workers returns the total number of worker ID slots, including those that are not actively in use. In other words, it returns one more than the maximum numeric ID that might be assigned to a worker. Typically, this number is a small increment over the number of actual workers assigned to run Intel® Cilk™ Plus tasks. You can create an array of size __cilkrts_get_total_workers(), with each element indexed by a worker ID. As with __cilkrts_get_nworkers, this function freezes the worker count so that it can not be changed using__cilkrts_set_param. If called in serialized code, __cilkrts_get_total_workers will return 1.


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.