1212#include " Defines.hpp"
1313
1414#include < cassert>
15+ #include < cmath>
1516#include < limits>
1617#include < random>
1718
@@ -26,12 +27,12 @@ namespace alpaka
2627 template <typename TData>
2728 struct RngHelper
2829 {
29- static constexpr auto getMax ()
30+ static auto getMax ()
3031 {
3132 return std::numeric_limits<TData>::max ();
3233 }
3334
34- static constexpr auto getLowest ()
35+ static auto getLowest ()
3536 {
3637 return std::numeric_limits<TData>::lowest ();
3738 }
@@ -48,16 +49,16 @@ namespace alpaka
4849 template <typename TData>
4950 struct RngHelper <Complex<TData>>
5051 {
51- static constexpr auto getMax ()
52+ static auto getMax ()
5253 {
53- auto const max = std::numeric_limits<TData>::max ();
54- return Complex<TData>{max, max};
54+ // / auto const max = TData{0.01} * std::sqrt(std::numeric_limits<TData>::max());
55+ // / return Complex<TData>{max, TData{-0.7} * max};
56+ return Complex<TData>{2.0 , 2.0 };
5557 }
5658
57- static constexpr auto getLowest ()
59+ static auto getLowest ()
5860 {
59- auto const lowest = std::numeric_limits<TData>::lowest ();
60- return Complex<TData>{lowest, lowest};
61+ return -getMax ();
6162 }
6263
6364 using Distribution = std::uniform_real_distribution<TData>;
@@ -98,13 +99,13 @@ namespace alpaka
9899 static_assert (TArgs::capacity > 6 , " Set of args must provide > 6 entries." );
99100 using RngHelper = RngHelper<TData>;
100101 auto rngHelper = RngHelper{};
101- constexpr auto max = rngHelper.getMax ();
102- constexpr auto low = rngHelper.getLowest ();
102+ auto const max = rngHelper.getMax ();
103+ auto const low = rngHelper.getLowest ();
103104 std::default_random_engine eng{static_cast <std::default_random_engine::result_type>(seed)};
104105
105106 // These pseudo-random numbers are implementation/platform specific!
106107 using Distribution = typename RngHelper::Distribution;
107- Distribution dist (0 , 1000 );
108+ Distribution dist (0 , /* 1000*/ 10.0 );
108109 Distribution distOne (-1 , 1 );
109110 for (size_t k = 0 ; k < TFunctor::arity_nr; ++k)
110111 {
0 commit comments