Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_Ifpack2_MP_Vector.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef STOKHOS_IFPACK2_MP_VECTOR_HPP
11 #define STOKHOS_IFPACK2_MP_VECTOR_HPP
12 
13 // This header file should be included whenever compiling any Ifpack2
14 // code with Stokhos scalar types
15 
16 // MP includes and specializations
18 
19 // Specialization of LocalReciprocalThreshold functor in
20 // Ifpack2_Details_Chebyshev_def.hpp
21 namespace Ifpack2 {
22 namespace Details {
23 
24 template<class XV, class SizeType>
25 struct LocalReciprocalThreshold;
26 
27 template<class S, class ... P, class SizeType>
29  Kokkos::View< Sacado::MP::Vector<S>*,P...>, SizeType > {
30  typedef Kokkos::View<Sacado::MP::Vector<S>*,P...> XV;
31 
32  static void
33  compute (const XV& X,
34  const typename XV::non_const_value_type& minVal)
35  {
36  if (!Sacado::is_constant(minVal)) {
38  "LocalReciprocalThreshold not implemented for non-constant minVal");
39  }
40 
41  typedef typename Kokkos::FlatArrayType<XV>::type Flat_XV;
42  Flat_XV flat_X = X;
44  minVal.coeff(0) );
45  }
46 };
47 
48 }
49 }
50 
51 #endif // STOKHOS_IFPACK2_MP_VECTOR_HPP
KOKKOS_INLINE_FUNCTION void raise_error(const char *msg)
KOKKOS_INLINE_FUNCTION bool is_constant(const T &x)