alpaka-group / cupla

C++ User interface for the Platform independent Library Alpaka :arrows_clockwise:
Other
37 stars 18 forks source link

refactor math functions #168

Closed psychocoderHPC closed 4 years ago

psychocoderHPC commented 4 years ago

The previous implementation of math function was not working correctly in PIConGPU due to the function attributes. The older implementation also not allowed to write a functor which can be used on device and host. This is now fixed, if you call a cupla math function within the host compile path of the compiler it will always map function calls to the alpaka stl math implementations. Internally we discussed to implement this into PMacc cupla users should also be able to implement a functor which can be used on device and the host.

psychocoderHPC commented 4 years ago

PR is updated