Skip to content
fn

vge_mask_f32

void vge_mask_f32(const float * a, const float * b, float * out, int n)

Single-precision >= boolean mask (no vDSP equivalent).

Computes outi=(ai≥bi) ? 1:0\text{out}_i = (a_i \ge b_i) \,?\, 1 : 0 via a scalar loop; used by autograd for ReLU/Max gradient masks where the comparison result must be a float.

Parameters

a, bconst float*
Input buffers.
outfloat*
Output buffer (0.0 / 1.0 mask).
nstd::size_t
Element count.