Skip to content

Commit 96b8817

Browse files
committed
add template to sinus class as suggested by @psychocoderHPC
1 parent 1a7c4ca commit 96b8817

File tree

1 file changed

+5
-3
lines changed
  • src/libPMacc/include/math/vector/math_functor

1 file changed

+5
-3
lines changed

src/libPMacc/include/math/vector/math_functor/sinf.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,19 @@ namespace math
3333
namespace math_functor
3434
{
3535

36-
struct Sinf
36+
template<typename T_Type>
37+
struct Sin
3738
{
38-
typedef float result_type;
39+
typedef T_Type result_type;
3940

4041
DINLINE result_type operator()(const result_type& value) const
4142
{
4243
return algorithms::math::sin(value);
4344
}
4445
};
4546

46-
lambda::Expression<lambda::exprTypes::terminal, mpl::vector<Sinf> > _sinf;
47+
lambda::Expression<lambda::exprTypes::terminal, mpl::vector<Sin<float>> > _sinf;
48+
lambda::Expression<lambda::exprTypes::terminal, mpl::vector<Sin<double>> > _sind;
4749

4850
} // math_functor
4951
} // math

0 commit comments

Comments
 (0)