Intel® C++ Compiler 16.0 User and Reference Guide
int __cilkrts_get_nworkers(void);
This function returns the number of worker threads assigned to handle Intel® Cilk™ Plus tasks. If called in serialized code, it will return 1.
The range of valid worker IDs is 0 to __cilkrts_get_nworkers()-1.