LLVM OpenMP 20.0.0git
Macros | Functions
fields_values.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include <unistd.h>
#include <sys/types.h>

Go to the source code of this file.

Macros

#define XSTR(x)   #x
 
#define STR(x)   XSTR(x)
 
#define streqls(s1, s2)   (!strcmp(s1, s2))
 
#define check(condition)
 
#define my_gethostname(buf, sz)   gethostname(buf, sz)
 
#define BUFFER_SIZE   256
 

Functions

int get_integer ()
 
charget_string ()
 
void check_integer (const char *formats[2], int(*func)())
 
void check_nesting_level ()
 
void check_thread_num ()
 
void check_num_threads ()
 
int ancestor_helper ()
 
void check_ancestor_tnum ()
 
int my_get_pid ()
 
void check_process_id ()
 
void check_host ()
 
void check_undefined ()
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ BUFFER_SIZE

#define BUFFER_SIZE   256

Definition at line 35 of file fields_values.c.

◆ check

#define check (   condition)
Value:
if (!(condition)) { \
fprintf(stderr, "error: %s: %d: " STR(condition) "\n", __FILE__, \
__LINE__); \
exit(1); \
}
#define STR(x)
Definition: fields_values.c:9
int condition

Definition at line 13 of file fields_values.c.

◆ my_gethostname

#define my_gethostname (   buf,
  sz 
)    gethostname(buf, sz)

Definition at line 32 of file fields_values.c.

◆ STR

#define STR (   x)    XSTR(x)

Definition at line 9 of file fields_values.c.

◆ streqls

#define streqls (   s1,
  s2 
)    (!strcmp(s1, s2))

Definition at line 11 of file fields_values.c.

◆ XSTR

#define XSTR (   x)    #x

Definition at line 8 of file fields_values.c.

Function Documentation

◆ ancestor_helper()

int ancestor_helper ( )

Definition at line 89 of file fields_values.c.

References omp_get_ancestor_thread_num.

Referenced by check_ancestor_tnum().

◆ check_ancestor_tnum()

void check_ancestor_tnum ( )

Definition at line 92 of file fields_values.c.

References ancestor_helper(), and check_integer().

Referenced by main().

◆ check_host()

void check_host ( )

Definition at line 114 of file fields_values.c.

References check, get_string(), i, my_gethostname, omp_set_affinity_format, and streqls.

Referenced by main().

◆ check_integer()

void check_integer ( const char formats[2],
int(*)()  func 
)

◆ check_nesting_level()

void check_nesting_level ( )

Definition at line 71 of file fields_values.c.

References check_integer().

Referenced by main().

◆ check_num_threads()

void check_num_threads ( )

Definition at line 83 of file fields_values.c.

References check_integer(), and omp_get_num_threads().

Referenced by main().

◆ check_process_id()

void check_process_id ( )

Definition at line 99 of file fields_values.c.

References check_integer(), and my_get_pid().

Referenced by main().

◆ check_thread_num()

void check_thread_num ( )

Definition at line 77 of file fields_values.c.

References check_integer().

◆ check_undefined()

void check_undefined ( )

Definition at line 131 of file fields_values.c.

References check, get_string(), i, omp_set_affinity_format, and streqls.

Referenced by main().

◆ get_integer()

int get_integer ( )

Definition at line 37 of file fields_values.c.

References buf, BUFFER_SIZE, check, and omp_capture_affinity.

Referenced by check_integer().

◆ get_string()

char * get_string ( )

◆ main()

int main ( int  argc,
char **  argv 
)

◆ my_get_pid()

int my_get_pid ( )

Definition at line 98 of file fields_values.c.

Referenced by check_process_id().