kupl_get_kernel_concurrency
Obtain the actual concurrency.
Interface Definition
int kupl_get_kernel_concurrency();
Return Value
Return the actual concurrency.
Return 1 if not within a parallel region.
Examples
1 2 3 4 5 6 7 8 9 10 | #include <stdio.h> #include "kupl.h" int main() { kupl_set_kernel_concurrency(2); int num = kupl_get_kernel_concurrency(); printf("kupl kernel concurrency = %d\n", num); return 0; } |
The execution result is as follows:
kupl kernel concurrency = 1
The preceding example prints the value of the current concurrency; the kupl_get_kernel_concurrency function retrieves the actual current concurrency.
Parent topic: Memory Management Functions