/*
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <boost/timer.hpp>
const int num_steps=1000;
int main()
{
boost::timer t;
int sum = 0, i = 0;
float * Data = new float[num_steps];
for(i =0 ; i < num_steps; i++)
{
Data[i] = i;
}
float max = 0;
#pragma omp parallel for
for(i = 0 ; i < num_steps; i++)
{
#pragma omp critical (MAXVALUE)
{
if(max < Data[i])
max = Data[i];
}
}
printf(" max = %f \n", max);
double t2_insert = t.elapsed();
printf("time: %.8lf \n", t2_insert);
return EXIT_SUCCESS;
}
*/
'OpenMP,PPL' 카테고리의 다른 글
| OP_TEST_REDUCTION.cpp (0) | 2014.08.27 |
|---|---|
| FOR_reduction.cpp (0) | 2014.08.27 |
| FOR_default.cpp (0) | 2014.08.27 |