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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.c/] [appendix-a/] [a.36.1.c] - Blame information for rev 735

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 735 jeremybenn
/* { dg-do run } */
2
 
3
#include <omp.h>
4
#include <stdlib.h>
5
void
6
do_by_16 (float *x, int iam, int ipoints)
7
{
8
}
9
 
10
void
11
a36 (float *x, int npoints)
12
{
13
  int iam, ipoints;
14
  omp_set_dynamic (0);
15
  omp_set_num_threads (16);
16
#pragma omp parallel shared(x, npoints) private(iam, ipoints)
17
  {
18
    if (omp_get_num_threads () != 16)
19
      abort ();
20
    iam = omp_get_thread_num ();
21
    ipoints = npoints / 16;
22
    do_by_16 (x, iam, ipoints);
23
  }
24
}
25
 
26
int main()
27
{
28
  float a[10];
29
  a36 (a, 10);
30
  return 0;
31
}

powered by: WebSVN 2.1.0

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