/* * @@name: teams.1c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success */ #include #include float dotprod(float B[], float C[], int N) { float sum0 = 0.0; float sum1 = 0.0; #pragma omp target map(to: B[:N], C[:N]) #pragma omp teams num_teams(2) { int i; if (omp_get_num_teams() != 2) abort(); if (omp_get_team_num() == 0) { #pragma omp parallel for reduction(+:sum0) for (i=0; i