Commit 80b06ca7 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

swap function call arugments to make it looks more natural for binary operators

parent 920ed950
......@@ -8,7 +8,7 @@ namespace device {
void div(hipStream_t stream, const argument& result, const argument& arg1, const argument& arg2)
{
nary(stream, result, arg1, arg2)([](auto x, auto y) { return y / x; });
nary(stream, result, arg1, arg2)([](auto x, auto y) { return x / y; });
}
} // namespace device
......
......@@ -8,7 +8,7 @@ namespace device {
void sub(hipStream_t stream, const argument& result, const argument& arg1, const argument& arg2)
{
nary(stream, result, arg1, arg2)([](auto x, auto y) { return y - x; });
nary(stream, result, arg1, arg2)([](auto x, auto y) { return x - y; });
}
} // namespace device
......
......@@ -88,7 +88,7 @@ struct binary_device : oper<Derived>
argument compute(context& ctx, const shape&, const std::vector<argument>& args) const
{
F(ctx.get_stream().get(), args[2], args[1], args[0]);
F(ctx.get_stream().get(), args[2], args[0], args[1]);
return args[2];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment