Closed yiansu closed 1 year ago
Yes, a program can get the number of Cilk workers by calling __cilkrts_get_nworkers()
, which is declared in cilk/cilk_api.h
.
Does that resolve your issue?
Yes I'm able to extract the number of workers using that function. Thanks for the help!
I'm writing a manually optimized program using opencilk and need to know the number of threads used by the runtime.
I know how to set the number of worker threads used by opencilk through the environment variable
CILK_NWORKERS=..
. However, does opencilk provide any facility/built-in function to get this number inside the program?