Skip to content
fn

add_storages

→Storage
int add_storages(const int & a, const int & b, int numel, Dtype dt, Device device)

Element-wise addition: returns a + b.

Parameters

a, bconst Storage&
Input buffers.
numelstd::size_t
Number of elements.
dtDtype
Element dtype.
deviceDevice
Target device.

Returns

Storage

New storage holding the element-wise sum.