Skip to content

Commit

Permalink
Merge pull request #7752 from Tech-XCorp/amesos2FixBaskerTypeMap
Browse files Browse the repository at this point in the history
Amesos2: Stokhos: Fix Basker TypeMap to not use static for dtype
  • Loading branch information
ndellingwood authored Aug 19, 2020
2 parents e5c33a3 + 31fdce2 commit befb2c1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
12 changes: 6 additions & 6 deletions packages/amesos2/src/Amesos2_Basker_TypeMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ template <class, class> class Basker;
template <>
struct TypeMap<Basker,float>
{
static double dtype;
typedef double dtype;
typedef double type;
};

template <>
struct TypeMap<Basker,double>
{
static double dtype;
typedef double dtype;
typedef double type;
};

Expand All @@ -93,28 +93,28 @@ struct TypeMap<Basker,double>
template <>
struct TypeMap<Basker,std::complex<float> >
{
static std::complex<double> dtype;
typedef std::complex<double> dtype;
typedef Kokkos::complex<double> type;
};

template <>
struct TypeMap<Basker,std::complex<double> >
{
static std::complex<double> dtype;
typedef std::complex<double> dtype;
typedef Kokkos::complex<double> type;
};

template <>
struct TypeMap<Basker,Kokkos::complex<float> >
{
static std::complex<double> dtype;
typedef std::complex<double> dtype;
typedef Kokkos::complex<double> type;
};

template <>
struct TypeMap<Basker,Kokkos::complex<double> >
{
static std::complex<double> dtype;
typedef std::complex<double> dtype;
typedef Kokkos::complex<double> type;
};

Expand Down
5 changes: 1 addition & 4 deletions packages/amesos2/src/Amesos2_Basker_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ class Basker : public SolverCore<Amesos2::Basker, Matrix, Vector>

typedef typename type_map::type basker_type;

// TODO: Would like to change dtype to be a regular type, not static.
// Seems nothing was using dtype before anyways but Stokhos would break so
// will address that as a separate PR.
typedef decltype(type_map::dtype) basker_dtype;
typedef typename type_map::dtype basker_dtype;

typedef FunctionMap<Amesos2::Basker,basker_type> function_map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace Amesos2 {
// Enable MP::Vector as a valid Scalar type for Basker
template <class ST>
struct TypeMap< Basker,Sacado::MP::Vector<ST> > {
static Sacado::MP::Vector<ST> dtype;
typedef Sacado::MP::Vector<ST> dtype;
typedef Sacado::MP::Vector<ST> type;
typedef typename Kokkos::Details::ArithTraits< Sacado::MP::Vector<ST> >::mag_type magnitude_type;
};
Expand Down

0 comments on commit befb2c1

Please sign in to comment.