size_t omp_capture_affinity(
char *buffer,
size_t size,
const char *format
);
Summary The omp_capture_affinity routine prints the OpenMP thread affinity information into a buffer using the format specification provided.
Binding The binding thread set for an omp_capture_affinity region is the encountering thread.
The omp_capture_affinity routine returns the number of characters in the entire thread affinity information string excluding the terminating null byte (’\0’) and if size is non-zero, writes the thread affinity information of the current thread in the format specified by the format argument into the character string buffer followed by a null byte. If the return value is larger or equal to size, the thread affinity information string is truncated, with the terminating null byte stored to buffer[size-1]. If size is zero, nothing is stored and buffer may be NULL. If the format is NULL or a zero-length string, the value of the affinity-format-var ICV is used.
The omp_capture_affinity routine returns the number of characters required to hold the entire thread affinity information string and prints the thread affinity information of the current thread into the character string buffer with the size of len(buffer) in the format specified by the format argument. If the format is a zero-length string, the value of the affinity-format-var ICV is used. If the return value is larger than len(buffer), the thread affinity information string is truncated. If the format is a zero-length string, the value of the affinity-format-var ICV is used.
If the format argument does not conform to the specified format then the result is implementation defined.