Skip to content
Snippets Groups Projects
Commit 4afeb622 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Did some tests arround const Kokkos::Views and Kokkos::View::non_const_value_type

parent 94a2eecb
No related branches found
No related tags found
No related merge requests found
delpinos@u-sterne.bruyeres.cea.fr.23888:1521446211
\ No newline at end of file
...@@ -15,16 +15,18 @@ inline double p(double rho, double e, double gamma) ...@@ -15,16 +15,18 @@ inline double p(double rho, double e, double gamma)
return (gamma-1)*rho*e; return (gamma-1)*rho*e;
} }
typedef const double my_double;
struct ReduceMin { struct ReduceMin {
private: private:
Kokkos::View<double*> x_; const Kokkos::View<my_double*> x_;
public: public:
typedef Kokkos::View<double*>::value_type value_type; typedef Kokkos::View<my_double*>::non_const_value_type value_type;
ReduceMin(const Kokkos::View<double*>& x) : x_ (x) {} ReduceMin(const Kokkos::View<my_double*>& x) : x_ (x) {}
typedef Kokkos::View<double*>::size_type size_type; typedef Kokkos::View<my_double*>::size_type size_type;
KOKKOS_INLINE_FUNCTION void KOKKOS_INLINE_FUNCTION void
operator() (const size_type i, value_type& update) const operator() (const size_type i, value_type& update) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment