HOME
| OPENMP API Specification: Version 5.1 November 2020

3.3.11  omp_capture_affinity

Summary The omp_capture_affinity routine prints the OpenMP thread affinity information into a buffer using the format specification provided.

Format

SVG-Viewer needed.

 

 
size_t omp_capture_affinity( 
  char *buffer, 
  size_t size, 
  const char *format 
);  

SVG-Viewer needed.

SVG-Viewer needed.

 

 
integer function omp_capture_affinity(buffer,format) 
character(len=*),intent(out) :: buffer 
character(len=*),intent(in) :: format  

SVG-Viewer needed.

Binding The binding thread set for an omp_capture_affinity region is the encountering thread.

Effect

SVG-Viewer needed.

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.

SVG-Viewer needed.

SVG-Viewer needed.

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.

SVG-Viewer needed.

If the format argument does not conform to the specified format then the result is implementation defined.

Cross References