tiny.simd.generate
Defined in algo.
Source
Source: lib/simd/src/algo.zig:367
zig
pub fn generate(comptime D: type, output: []D.Lane, generator: anytype) void { const U = @Int(.unsigned, @bitSizeOf(D.Lane)); const DU = D.rebind(U); var indices = construct.iota(DU, 0); var index: usize = 0; while (index + D.lane_count <= output.len) : (index += D.lane_count) { memory.store(D, generator.call(D, indices), output[index..]); indices +%= @as(DU.Vector, @splat(@intCast(D.lane_count))); } if (index != output.len) { memory.storeN(D, generator.call(D, indices), output[index..], output.len - index); }}Source: lib/simd/src/root.zig:471
zig
pub const generate = algo.generate;Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |