LLVM OpenMP 19.0.0git
Macros | Functions | Variables
affinity_values.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.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 DEBUG   0
 
#define BUFFER_SIZE   1024
 

Functions

static int debug_printf (const char *format,...)
 
static void display_affinity_environment ()
 
void list_to_ids (const char *affinity, int *ids, int ids_size)
 
void check_thread_affinity ()
 
int main (int argc, char **argv)
 

Variables

char buf [BUFFER_SIZE]
 

Macro Definition Documentation

◆ BUFFER_SIZE

#define BUFFER_SIZE   1024

Definition at line 32 of file affinity_values.c.

◆ check

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

Definition at line 19 of file affinity_values.c.

◆ DEBUG

#define DEBUG   0

Definition at line 26 of file affinity_values.c.

◆ STR

#define STR (   x)    XSTR(x)

Definition at line 15 of file affinity_values.c.

◆ streqls

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

Definition at line 17 of file affinity_values.c.

◆ XSTR

#define XSTR (   x)    #x

Definition at line 14 of file affinity_values.c.

Function Documentation

◆ check_thread_affinity()

void check_thread_affinity ( )

◆ debug_printf()

static int debug_printf ( const char format,
  ... 
)
static

Definition at line 37 of file affinity_values.c.

References args.

Referenced by check_thread_affinity().

◆ display_affinity_environment()

static void display_affinity_environment ( )
static

Definition at line 48 of file affinity_values.c.

Referenced by main().

◆ list_to_ids()

void list_to_ids ( const char affinity,
int ids,
int  ids_size 
)

Definition at line 60 of file affinity_values.c.

References b, begin, and end.

Referenced by check_thread_affinity().

◆ main()

int main ( int  argc,
char **  argv 
)

Variable Documentation

◆ buf