|
|
От: | barmale-y | |
| Дата: | 30.11.09 19:50 | ||
| Оценка: | |||
$ cat test-max.cc
#include <iostream>
int max(int a, int b){
return a>b?a:b;
}
main(){
int i;
int data[4];
#pragma omp parallel for shared(data) private(i) reduction(data:max)
for(int i=0; i<4; ++i){
data[i]=i*i;
}
}$ c++ -fopenmp test-max.cc -o test-max.eXe
test-max.cc: In function ‘int main()’:
test-max.cc:11: ошибка: expected `+', `*', `-', `&', `^', `|', `&&', or `||' before ‘data’