Skip to content

Commit f30b97a

Browse files
committed
improving CUDA-11 support in ArgumentTraits and FunctionArguments
1 parent 1e46376 commit f30b97a

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

examples/phys/dalitz_plot.inl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,6 @@ public:
187187

188188
}
189189

190-
__hydra_dual__
191-
inline void Update() final
192-
{
193-
fLineShape.SetParameter(0, _par[2]);
194-
fLineShape.SetParameter(1, _par[3]);
195-
}
196-
197-
198190

199191
__hydra_dual__
200192
inline hydra::complex<double>

examples/random/basic_distributions.inl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,11 @@ auto data = hydra::device::vector< double>(10, .0);
266266
auto gauss = hydra::Gaussian<xvar>(mean, sigma);
267267

268268
for(auto x: data)
269+
std::cout << ">>>>>>>>>"<<hydra::detail::is_valid_type_pack<hydra_thrust::tuple<xvar> , decltype(x) >::value << std::endl;
269270
//x.dummy;
270-
std::cout << gauss(x) << std::endl;
271+
//std::cout << gauss(x) << std::endl;
272+
273+
271274

272275
//LogNormal distribution
273276
auto lognormal = hydra::LogNormal<xvar>(mean, sigma);

hydra/detail/ArgumentTraits.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <hydra/detail/Config.h>
3333
#include<hydra/detail/utility/StaticAssert.h>
3434
#include <hydra/detail/utility/Generic.h>
35+
#include <hydra/detail/TypeTraits.h>
3536
#include <hydra/detail/external/hydra_thrust/tuple.h>
3637
#include <hydra/detail/external/hydra_thrust/iterator/detail/tuple_of_iterator_references.h>
3738
#include <hydra/detail/external/hydra_thrust/detail/type_traits.h>
@@ -53,12 +54,7 @@ struct is_valid_type_pack;
5354

5455
template<typename ...RefT, typename ...T>
5556
struct is_valid_type_pack<hydra_thrust::tuple<RefT...>, T... >:
56-
hydra_thrust::detail::is_convertible<hydra_thrust::tuple<T...>, hydra_thrust::tuple<RefT...> > {};
57-
58-
template<typename ...RefT, typename ...T>
59-
struct is_valid_type_pack<hydra_thrust::tuple<RefT...>, hydra_thrust::device_reference<T>...>:
60-
hydra_thrust::detail::is_convertible<hydra_thrust::tuple<T...>, hydra_thrust::tuple<RefT...> > {};
61-
57+
std::is_convertible< std::tuple<typename detail::remove_device_reference<T>::type...>, std::tuple<RefT...> > {};
6258

6359
template<typename ArgType>
6460
struct is_tuple_type: std::false_type {};

hydra/detail/FunctionArgument.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ struct FunctionArgument
101101
operator value_type&() { return value; }
102102

103103
__hydra_host__ __hydra_device__
104-
constexpr value_type operator()(void) const { return value; }
104+
value_type operator()(void) const { return value; }
105105

106106
__hydra_host__ __hydra_device__
107-
constexpr value_type Value(void) const { return value; }
107+
value_type Value(void) const { return value; }
108108

109109
//=============================================================
110110
//Compound assignment operators

0 commit comments

Comments
 (0)