URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 38 |
Rev 154 |
#include <omp.h>
|
#include <omp.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
int i = -1, j = -1;
|
int i = -1, j = -1;
|
|
|
omp_set_nested (1);
|
omp_set_nested (1);
|
omp_set_dynamic (0);
|
omp_set_dynamic (0);
|
#pragma omp parallel num_threads (4)
|
#pragma omp parallel num_threads (4)
|
{
|
{
|
#pragma omp single
|
#pragma omp single
|
{
|
{
|
i = omp_get_thread_num () + omp_get_num_threads () * 256;
|
i = omp_get_thread_num () + omp_get_num_threads () * 256;
|
#pragma omp parallel num_threads (2)
|
#pragma omp parallel num_threads (2)
|
{
|
{
|
#pragma omp single
|
#pragma omp single
|
{
|
{
|
j = omp_get_thread_num () + omp_get_num_threads () * 256;
|
j = omp_get_thread_num () + omp_get_num_threads () * 256;
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
if (i < 4 * 256 || i >= 4 * 256 + 4)
|
if (i < 4 * 256 || i >= 4 * 256 + 4)
|
abort ();
|
abort ();
|
if (j < 2 * 256 || j >= 2 * 256 + 2)
|
if (j < 2 * 256 || j >= 2 * 256 + 2)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.