Skip to content

Commit

Permalink
InnerProductSpaceTraits::dot to compute the product
Browse files Browse the repository at this point in the history
  • Loading branch information
vqd8a committed Apr 25, 2018
1 parent 836726a commit 1c68159
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/blas/impl/KokkosBlas1_team_dot_spec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,17 @@ struct team_dot_tpl_spec_avail {
// Unification and Specialization layer
template<class TeamType, class XV, class YV, bool tpl_spec_avail = team_dot_tpl_spec_avail<XV,YV>::value>
struct TeamDot {
typedef typename Kokkos::Details::InnerProductSpaceTraits<typename XV::non_const_value_type>::dot_type dot_type;
typedef Kokkos::Details::InnerProductSpaceTraits<typename XV::non_const_value_type> IPT;
typedef typename IPT::dot_type dot_type;

static KOKKOS_INLINE_FUNCTION dot_type team_dot (const TeamType& team, const XV& X, const YV& Y);
};

template<class TeamType, class XV, class YV>
struct TeamDot<TeamType, XV, YV, false> {
typedef typename Kokkos::Details::InnerProductSpaceTraits<typename XV::non_const_value_type>::dot_type dot_type;
typedef Kokkos::Details::InnerProductSpaceTraits<typename XV::non_const_value_type> IPT;
typedef typename IPT::dot_type dot_type;

static KOKKOS_INLINE_FUNCTION dot_type team_dot (const TeamType& team, const XV& X, const YV& Y) {
dot_type result;
int N = X.extent(0);
Expand Down

0 comments on commit 1c68159

Please sign in to comment.