Skip to content
fn

subtract_storages

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

Element-wise subtraction: 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 difference.