add.cpp 594 Bytes
Newer Older
Paul's avatar
Paul committed
1
2
3
4
5
6
7
#include <migraph/gpu/device/add.hpp>
#include <migraph/gpu/device/nary.hpp>

namespace migraph {
namespace gpu {
namespace device {

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

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

Paul's avatar
Paul committed
18
19
20
} // namespace device
} // namespace gpu
} // namespace migraph