Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
Lid: alleen een variabele of statisch gegevenslid kan worden gebruikt in een component voor het delen van gegevens
Opmerkingen
Er is een ander symbool dan een variabele of statisch gegevenslid doorgegeven aan de reductiecomponent.
Example
In het volgende voorbeeld wordt C3028 gegenereerd:
// C3028.cpp
// compile with: /openmp /link vcomps.lib
int g_i;
class MyClass {
public:
MyClass();
MyClass(int x);
static int x_public;
int mbr;
private:
static int x_private;
};
int MyClass::x_public;
int MyClass::x_private;
namespace XyzNS {
struct xyz { int x; };
xyz xyz;
}
namespace NS {
int a1;
struct Bar {
static MyClass MyClass;
};
struct Baz : public Bar {
using NS::Bar::MyClass;
};
}
MyClass NS::Bar::MyClass;
typedef int MyInt;
template <class T, size_t n> class CTempl {
public:
static T public_array[n];
private:
static T private_array[n];
};
template<class T,size_t n> T CTempl<T,n>::public_array[n];
template<class T,size_t n> T CTempl<T,n>::private_array[n];
CTempl<int,5> tx;
struct Incomplete;
extern Incomplete inc;
MyClass::MyClass(int x) {
#pragma omp parallel reduction(+: x, g_i, x_public, x_private)
// OK
;
#pragma omp parallel reduction(+: x, g_i, MyClass::x_public, MyClass::x_private)
// OK
;
#pragma omp parallel reduction(+: mbr)
// C3028, member of a class.
;
}
int main() {
#pragma omp parallel reduction(+:main)
// C3028, main is a function.
;
#pragma omp parallel reduction(+: XyzNS)
// C3028, XyzNS is a namespace.
;
}