__cilkrts_get_nworkers

int __cilkrts_get_nworkers(void);

This function returns the number of worker threads assigned to handle Intel® Cilk™ Plus tasks and freezes this number so that it can not be changed by __cilkrts_set_param. If called in serialized code, it will return 1.

The worker IDs are not necessarily in a contiguous range, so the ID for a given worker may be larger than the return value of __cilkrts_get_nworkers.


Submit feedback on this help topic

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