Clang compiler error with named parallel_reduce, tags, and TeamPolicy. #335
Labels
Bug
Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Milestone
The following code compiles with gcc, intel, nvcc, but not clang (3.6 and 3.8):
struct Foo {
struct MyTag {
};
void compute() {
double totalEnergy = 0.0;
Kokkos::parallel_reduce("name", Kokkos::TeamPolicy(100, Kokkos::AUTO), *this, totalEnergy);
}
KOKKOS_INLINE_FUNCTION void operator() (const MyTag&, const Kokkos::TeamPolicy::member_type& team, double& val) const {
int index = team.league_rank();
val += index;
}
};
int main(int argc, char* argv[]) {
Kokkos::initialize(argc, argv);
Foo foo;
foo.compute();
Kokkos::finalize();
}
The text was updated successfully, but these errors were encountered: