change function attribute from ALPAKA_FN_ACC to ALPAKA_FN_HOST_ACC
map host side math functions to alpaka stl math functions
add precompiler define to handle device code path compilation e.g. with CUDA or HIP.
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.
ALPAKA_FN_ACC
toALPAKA_FN_HOST_ACC
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.