testsuite/libgomp.c/ordered-2.c File Reference

#include <omp.h>
#include <string.h>
#include <assert.h>
#include "libgomp_g.h"

Include dependency graph for ordered-2.c:

Go to the source code of this file.

Defines

#define N   100
#define TMPL_1(sched)

Functions

static void clean_data (void)
static void set_data (long i)
static void test (void)
int main ()

Variables

static int next
static int CHUNK
static int NTHR


Define Documentation

#define N   100

Definition at line 11 of file ordered-2.c.

#define TMPL_1 ( sched   ) 

Value:

static void f_##sched##_1 (void *dummy)                 \
{                                   \
  long s0, e0, i;                           \
  if (GOMP_loop_ordered_##sched##_start (0, N, 1, CHUNK, &s0, &e0)) \
    do                                  \
      {                                 \
    for (i = s0; i < e0; ++i)                   \
      {                             \
        GOMP_ordered_start ();                  \
        set_data (i);                       \
        GOMP_ordered_end ();                    \
      }                             \
      }                                 \
    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 ();                         \
}

Definition at line 27 of file ordered-2.c.


Function Documentation

static void clean_data ( void   )  [static]

Definition at line 15 of file ordered-2.c.

References next.

int main ( void   ) 

Definition at line 63 of file ordered-2.c.

References CHUNK, NTHR, omp_set_dynamic(), and test.

Here is the call graph for this function:

static void set_data ( long  i  )  [static]

Definition at line 20 of file ordered-2.c.

References n, and next.

static void test ( void   )  [static]

Definition at line 56 of file ordered-2.c.


Variable Documentation

int CHUNK [static]

Definition at line 13 of file ordered-2.c.

int next [static]

Definition at line 12 of file ordered-2.c.

Referenced by alloc_work_share(), clean_data(), gomp_ordered_last(), and set_data().

int NTHR [static]

Definition at line 13 of file ordered-2.c.


Generated on Fri Apr 5 05:41:14 2013 for Libgomp by  doxygen 1.4.7