Skip to content

Commit

Permalink
Support mixed precision in axpby, axpbypcz operations in vexcl
Browse files Browse the repository at this point in the history
  • Loading branch information
ddemidov committed Aug 30, 2018
1 parent 5522c99 commit 2025fad
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions amgcl/backend/vexcl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,12 @@ struct inner_product_impl<
}
};

template < typename A, typename B, typename V >
template < typename A, typename B, typename V1, typename V2 >
struct axpby_impl<
A, vex::vector<V>,
B, vex::vector<V>
A, vex::vector<V1>,
B, vex::vector<V2>
> {
static void apply(A a, const vex::vector<V> &x, B b, vex::vector<V> &y)
static void apply(A a, const vex::vector<V1> &x, B b, vex::vector<V2> &y)
{
if (b)
y = a * x + b * y;
Expand All @@ -403,17 +403,17 @@ struct axpby_impl<
}
};

template < typename A, typename B, typename C, typename V >
template < typename A, typename B, typename C, typename V1, typename V2, typename V3 >
struct axpbypcz_impl<
A, vex::vector<V>,
B, vex::vector<V>,
C, vex::vector<V>
A, vex::vector<V1>,
B, vex::vector<V2>,
C, vex::vector<V3>
>
{
static void apply(
A a, const vex::vector<V> &x,
B b, const vex::vector<V> &y,
C c, vex::vector<V> &z
A a, const vex::vector<V1> &x,
B b, const vex::vector<V2> &y,
C c, vex::vector<V3> &z
)
{
if (c)
Expand Down

0 comments on commit 2025fad

Please sign in to comment.