Skip to content
fn

vrelu_f64

void vrelu_f64(const double * in, double * out, int n)

Double-precision ReLU clamp. Branchless, for the same reason as the single-precision form: vDSP_vthresD does not propagate NaN.

References

IEEE: NaN < 0 is false, so NaN passes through.

Parameters

inconst double*
Input buffer.
outdouble*
Output buffer.
nstd::size_t
Element count.