/* * @@name: teams.2c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success */ #define min(x, y) (((x) < (y)) ? (x) : (y)) float dotprod(float B[], float C[], int N, int block_size, int num_teams, int block_threads) { float sum = 0.0; int i, i0; #pragma omp target map(to: B[0:N], C[0:N]) map(tofrom: sum) #pragma omp teams num_teams(num_teams) thread_limit(block_threads) \ reduction(+:sum) #pragma omp distribute for (i0=0; i0