Skip to content

Commit 205ee8f

Browse files
committed
fae units: std::pow in nonNVCC
1 parent 576174d commit 205ee8f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/libcloudph++/common/detail/fake_units.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
#pragma once
9-
//#include <cmath> // std::pow
9+
#include <cmath> // std::pow
1010
#include <boost/config.hpp> // BOOST_GPU_ENABLED
1111

1212
// TODO: CUDA's _forceinline_?
@@ -48,7 +48,11 @@ namespace libcloudphxx
4848
const quantity<qntt_t, real_t> &b
4949
)
5050
{
51+
#if !defined(__NVCC__)
52+
return quantity<qntt_t, real_t>(std::pow(a.value, b.value)); // pow from the parent namespace, hopefuly this will be built-in CUDA pow
53+
#else
5154
return quantity<qntt_t, real_t>(::pow(a.value, b.value)); // pow from the parent namespace, hopefuly this will be built-in CUDA pow
55+
#endif
5256
}
5357

5458
// ...

0 commit comments

Comments
 (0)