Open victorjunaidy opened 2 years ago
Comment this line to skip the format check: https://github.com/alpaka-group/vikunja/blob/91028b1d408c773bcf6a72b2cc7830a590cc4d01/.gitlab-ci.yml#L36
Please rebase on the current master. I removed C++ 14. Therefore, it is less to test.
Sorry for the delay, finally all checks have passed
I see a conceptional problem in your implementation. If I understand it correctly, you pass a tuple of the begin pointers of each buffer (std::tuple<bufType1*, bufType2*, bufType3*>
) to the constructor of the zip operator, which is fine. But the operator*
returns the same type, which is not correct. Your operator*
needs to return a tuple of single values and not the tuple of pointers. The implementation needs to be something like this:
std::tuple<bufType1, bufType2, bufType3> operator*(){
return std::make_tuple(std::get<0>(m_iteratorTuple[m_index]), std::get<1>(m_iteratorTuple[m_index]), std::get<2>(m_iteratorTuple[index]));
}
std::tuple<bufType1, bufType2, bufType3> operator[](int i){
return std::make_tuple(std::get<0>(m_iteratorTuple[i]), std::get<1>(m_iteratorTuple[i]), std::get<2>(m_iteratorTuple[i]));
}
I think, the main problem is to make it generic for an arbitrary number of tuple members.
I would also suggest, to test it first with deviceTransform
. If you use deviceTransformReduce
you have to care about the types of the functions. The return type of the transformation functor is the argument type of the reduce functor:
auto transform = [](Data1 input) -> Data2 { return static_cast<Data2>(input);};
auto reduce = [](Data2 sum, Data2 input) -> Data2 { return sum + input;};
Also the reduce functor is restricted to a single type for the moment, see here: #52
Add:
Failed when building for accelerator testing