नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'var' : variable in 'reduction' clause/directive cannot have reference type
Remarks
You can only pass value parameters to certain clauses, such as the reduction clause.
Example
The following example generates C3030:
// C3030.cpp
// compile with: /openmp /link vcomps.lib
#include "omp.h"
void test(int &r) {
#pragma omp parallel reduction(+ : r) // C3030
;
}
void test2(int r) {
#pragma omp parallel reduction(+ : r) // OK
;
}
int main(int argc, char** argv) {
int& r = *((int*)argv);
int s = *((int*)argv);
#pragma omp parallel reduction(+ : r) // C3030
;
#pragma omp parallel reduction(+ : s) // OK
;
}