tiny.simd.PhastPlacement
Defined in tiny.simd.
API (4)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/simd/src/phast/family.zig:18
zig
pub const Placement = struct { num_slice_offsets: u32 = 0, slice_mask: u32 = 0, pub fn init(num_slots: usize, slice_length: usize) PhastError!Placement { if (slice_length == 0 or !std.math.isPowerOfTwo(slice_length)) { return error.InvalidData; } if (num_slots < slice_length or num_slots > std.math.maxInt(u32)) { return error.CapacityExceeded; } if (slice_length > std.math.maxInt(u32)) return error.CapacityExceeded; const num_slice_offsets = num_slots - slice_length + 1; return .{ .num_slice_offsets = @intCast(num_slice_offsets), .slice_mask = @intCast(slice_length - 1), }; } pub fn sliceLength(self: Placement) usize { return @as(usize, self.slice_mask) + 1; }};Source: lib/simd/src/root.zig:577
zig
pub const PhastPlacement = phast.PhastPlacement;Also reachable as
Audit
| Definitions | 3 |
|---|---|
| Public names | 6 |
| Members | 2 |
| Version | 26.7.0 |
| Revision | daab053ee433 |