Skip to content
fn

lt_mask_storage

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

Element-wise less-than mask: (a < b) ? 1 : 0.

Parameters

a, bconst Storage&
Inputs to compare.
numelstd::size_t
Number of elements.
dtDtype
Output dtype the mask is cast to.
deviceDevice
Target device.

Returns

Storage

New storage holding the gated mask.