Open HenningScheufler opened 1 month ago
With this approach we can replace the macro in FieldOperations.H to make them more readable:
template<typename T>
void fill2(NeoFOAM::Field<T>& field, T value)
{
auto spanField = field.field();
auto lambda = KOKKOS_LAMBDA(const int i) { spanField[i] = value; };
return std::visit(
[&](const auto& e)
{
parallelForImpl(
e,
0,
field.size(),
lambda
);
},
field.exec()
);
};
@greole @bevanwsjones
Should merged after PR:
This PR addes parallelFor and parallelReduce to simplify the implementation of new operation/algorithms
and parallelReduce :