Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/test/mapping/reduction_implicit_map.cpp
// RUN: %libomptarget-compilexx-run-and-check-generic | // RUN: %libomptarget-compilexx-run-and-check-generic | ||||
// amdgcn does not have printf definition | // amdgcn does not have printf definition | ||||
// UNSUPPORTED: amdgcn-amd-amdhsa | // UNSUPPORTED: amdgcn-amd-amdhsa | ||||
// UNSUPPORTED: amdgcn-amd-amdhsa-newRTL | |||||
#include <stdio.h> | #include <stdio.h> | ||||
void sum(int* input, int size, int* output) | void sum(int* input, int size, int* output) | ||||
{ | { | ||||
#pragma omp target teams distribute parallel for reduction(+:output[0]) \ | #pragma omp target teams distribute parallel for reduction(+:output[0]) \ | ||||
map(to:input[0:size]) | map(to:input[0:size]) | ||||
for (int i = 0; i < size; i++) | for (int i = 0; i < size; i++) | ||||
Show All 16 Lines |