11#define streqls(s1, s2) (!strcmp(s1, s2))
13#define check(condition) \
15 fprintf(stderr, "error: %s: %d: " STR(condition) "\n", __FILE__, \
27#define gettid GetCurrentThreadId
28#define my_gethostname(buf, sz) GetComputerNameA(buf, &(sz))
32#define my_gethostname(buf, sz) gethostname(buf, sz)
35#define BUFFER_SIZE 256
42 n = sscanf(
buf,
"%d", &retval);
57 for (
i = 0;
i < 2; ++
i) {
59 #pragma omp parallel num_threads(8)
62 #pragma omp parallel num_threads(3)
73 const char* formats[2] = {
"%{nesting_level}",
"%L"};
79 const char* formats[2] = {
"%{thread_num}",
"%n"};
85 const char* formats[2] = {
"%{num_threads}",
"%N"};
94 const char* formats[2] = {
"%{ancestor_tnum}",
"%a"};
101 const char* formats[2] = {
"%{process_id}",
"%P"};
116 int buffer_size = 256;
117 const char* formats[2] = {
"%{host}",
"%H"};
120 for (
i = 0;
i < 2; ++
i) {
122 #pragma omp parallel num_threads(8)
133 const char* formats[2] = {
"%{foobar}",
"%X"};
134 for (
i = 0;
i < 2; ++
i) {
136 #pragma omp parallel num_threads(8)
145int main(
int argc,
char** argv) {
void check_integer(const char *formats[2], int(*func)())
void check_nesting_level()
void check_ancestor_tnum()
#define my_gethostname(buf, sz)
#define omp_get_ancestor_thread_num
#define omp_set_affinity_format
#define omp_capture_affinity
int omp_get_num_threads()