OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [for-18.c] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -fopenmp -fdump-tree-ompexp" } */
3
 
4
void
5
foo (int *a, int i)
6
{
7
  int j, k = 1, l = 30, m = 4;
8
#pragma omp parallel for num_threads (3 * i) schedule (dynamic, i * 4)
9
  for (j = 0; j <= l; j++)
10
    a[j] = 1;
11
#pragma omp parallel for num_threads (3 * i) schedule (dynamic, i * 4)
12
  for (j = k; j <= l; j += (m - 1))
13
    a[j] = 2;
14
#pragma omp parallel for num_threads (3 * i) schedule (dynamic, 4)
15
  for (j = 0; j <= l; j++)
16
    a[j] = 3;
17
#pragma omp parallel for num_threads (3 * i) schedule (dynamic, 4)
18
  for (j = k; j <= l; j += (m - 1))
19
    a[j] = 4;
20
}
21
 
22
void
23
bar (int *a, int i)
24
{
25
  int j, k = 1, l = 30, m = 4;
26
#pragma omp parallel for num_threads (3 * i) schedule (guided, i * 4)
27
  for (j = 0; j <= l; j++)
28
    a[j] = 1;
29
#pragma omp parallel for num_threads (3 * i) schedule (guided, i * 4)
30
  for (j = k; j <= l; j += (m - 1))
31
    a[j] = 2;
32
#pragma omp parallel for num_threads (3 * i) schedule (guided, 4)
33
  for (j = 0; j <= l; j++)
34
    a[j] = 3;
35
#pragma omp parallel for num_threads (3 * i) schedule (guided, 4)
36
  for (j = k; j <= l; j += (m - 1))
37
    a[j] = 4;
38
}
39
 
40
/* { dg-final { scan-tree-dump-times "GOMP_parallel_loop_dynamic_start" 4 "ompexp" { xfail *-*-* } } } */
41
/* { dg-final { scan-tree-dump-times "GOMP_parallel_loop_guided_start" 4 "ompexp" { xfail *-*-* } } } */
42
/* { dg-final { cleanup-tree-dump "ompexp" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.