Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
"arg": Das Argument der "directive"-Direktive von OpenMP ist leer
Ein Argument ist für eine Direktive von OpenMP erforderlich.
Beispiel
Im folgenden Beispiel wird C3021 generiert:
// C3021.cpp
// compile with: /openmp
#include <stdio.h>
#include "omp.h"
int g = 0;
int main()
{
int x, y, i;
#pragma omp parallel for schedule(static,) // C3021
for (i = 0; i < 10; ++i) ;
#pragma omp parallel for schedule() // C3021
for (i = 0; i < 10; ++i)
printf_s("Hello world, thread %d, iteration %d\n",
omp_get_thread_num(), i);
#pragma omp parallel reduction() // C3021
;
#pragma omp parallel reduction(+ :) // C3021
;
//
// The following shows correct syntax examples.
//
#pragma omp parallel reduction(+ : x, y)
;
#pragma omp parallel reduction(* : x, y)
;
#pragma omp parallel reduction(- : x, y)
;
#pragma omp parallel reduction(& : x, y)
;
#pragma omp parallel reduction(^ : x, y)
;
#pragma omp parallel reduction(| : x, y)
;
#pragma omp parallel reduction(&& : x, y)
;
#pragma omp parallel reduction(|| : x, y)
;
}