tiny.simd.isNegative
Defined in compare.
Source
Source: lib/simd/src/compare.zig:51
zig
pub fn isNegative(comptime D: type, value: D.Vector) D.Mask { const info = @typeInfo(D.Lane); if (info != .float and (info != .int or info.int.signedness != .signed)) { @compileError("isNegative requires signed integer or floating-point lanes"); } const U = @Int(.unsigned, @bitSizeOf(D.Lane)); const UV = @Vector(D.lane_count, U); const bits: UV = @bitCast(value); const sign: UV = @splat(@as(U, 1) << (@bitSizeOf(D.Lane) - 1)); return bits & sign != @as(UV, @splat(0));}Source: lib/simd/src/root.zig:694
zig
pub const isNegative = compare.isNegative;Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |