"sgl-kernel/csrc/vscode:/vscode.git/clone" did not exist on "d0510f08feaa155c4d99f01667e1b5673652478c"
add.cpp 706 Bytes
Newer Older
Paul's avatar
Paul committed
1
2
#include <migraphx/gpu/device/add.hpp>
#include <migraphx/gpu/device/nary.hpp>
Paul's avatar
Paul committed
3

Paul's avatar
Paul committed
4
namespace migraphx {
Paul's avatar
Paul committed
5
inline namespace MIGRAPHX_INLINE_NS {
Paul's avatar
Paul committed
6
7
8
namespace gpu {
namespace device {

Paul's avatar
Paul committed
9
void add(hipStream_t stream, const argument& result, const argument& arg1, const argument& arg2)
Paul's avatar
Paul committed
10
{
Paul's avatar
Paul committed
11
    nary(stream, result, arg1, arg2)([](auto x, auto y) { return x + y; });
Paul's avatar
Paul committed
12
13
}

Paul's avatar
Paul committed
14
15
16
17
18
void add(hipStream_t stream,
         const argument& result,
         const argument& arg1,
         const argument& arg2,
         const argument& arg3)
Paul's avatar
Paul committed
19
{
Paul's avatar
Paul committed
20
    nary(stream, result, arg1, arg2, arg3)([](auto x, auto y, auto z) { return x + y + z; });
Paul's avatar
Paul committed
21
22
}

Paul's avatar
Paul committed
23
24
} // namespace device
} // namespace gpu
Paul's avatar
Paul committed
25
} // namespace MIGRAPHX_INLINE_NS
Paul's avatar
Paul committed
26
} // namespace migraphx