#include <omp.h>
#include <string.h>
#include <assert.h>
#include "libgomp_g.h"
Include dependency graph for ordered-1.c:
Go to the source code of this file.
Defines | |
#define | N 1000 |
#define | TMPL_1(sched) |
Functions | |
static void | clean_data (void) |
static void | test_data (void) |
static void | set_data (long i, int val) |
static void | test (void) |
int | main () |
Variables | |
static int | S |
static int | E |
static int | INCR |
static int | CHUNK |
static int | NTHR |
static int | data [N] |
#define N 1000 |
Definition at line 14 of file ordered-1.c.
#define TMPL_1 | ( | sched | ) |
Value:
static void f_##sched##_1 (void *dummy) \ { \ int iam = omp_get_thread_num (); \ long s0, e0, i; \ if (GOMP_loop_ordered_##sched##_start (S, E, INCR, CHUNK, &s0, &e0)) \ do \ { \ for (i = s0; i < e0; i += INCR) \ set_data (i, iam); \ } \ while (GOMP_loop_ordered_##sched##_next (&s0, &e0)); \ GOMP_loop_end (); \ } \ static void t_##sched##_1 (void) \ { \ clean_data (); \ GOMP_parallel_start (f_##sched##_1, NULL, NTHR); \ f_##sched##_1 (NULL); \ GOMP_parallel_end (); \ test_data (); \ }
Definition at line 49 of file ordered-1.c.
static void clean_data | ( | void | ) | [static] |
Definition at line 18 of file ordered-1.c.
References data, and memset().
Here is the call graph for this function:
int main | ( | void | ) |
Definition at line 83 of file ordered-1.c.
References CHUNK, E, INCR, N, NTHR, omp_set_dynamic(), and test.
Here is the call graph for this function:
static void set_data | ( | long | i, | |
int | val | |||
) | [static] |
static void test | ( | void | ) | [static] |
Definition at line 76 of file ordered-1.c.
static void test_data | ( | void | ) | [static] |
int CHUNK [static] |
Definition at line 15 of file ordered-1.c.
int data[N] [static] |
Definition at line 16 of file ordered-1.c.
int E [static] |
Definition at line 15 of file ordered-1.c.
int INCR [static] |
Definition at line 15 of file ordered-1.c.
int NTHR [static] |
Definition at line 15 of file ordered-1.c.
int S [static] |
Definition at line 15 of file ordered-1.c.