Programming Search⌘K

std.simd

The entries of std.simd in the Zig reference. This page has 24 cards.

std.simd.deinterlace

pub fn deinterlace(comptime vec_count: usize, interlaced: anytype) [vec_count]@Vector(vectorLength(@TypeOf(interlaced)) / vec_count, std.meta.Child(@TypeOf(interlaced)))

The contents of `interlaced` is evenly split between vec_count vectors that are returned as an array.

Kind
function
Module
std.simd

Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.

std.simd.join

pub fn join(a: anytype, b: anytype) @Vector(vectorLength(@TypeOf(a)) + vectorLength(@TypeOf(b)), std.meta.Child(@TypeOf(a)))

Returns a vector containing all elements of the first vector at the lower indices followed by all elements of the second vector at the higher indices.

Kind
function
Module
std.simd

Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.

std.simd.mergeShift

pub fn mergeShift(a: anytype, b: anytype, comptime shift: VectorCount(@TypeOf(a, b))) @TypeOf(a, b)

Joins two vectors, shifts them leftwards (towards lower indices) and extracts the leftmost elements into a vector the length of a and b.

Kind
function
Module
std.simd

Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.

std.simd.prefixScan

pub fn prefixScan(comptime op: std.builtin.ReduceOp, comptime hop: isize, vec: anytype) @TypeOf(vec)

Returns a vector whose elements are the result of performing the specified operation on the corresponding element of the input vector and every hop'th element that came before it (or after, if hop is negative).

Kind
function
Module
std.simd

Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.

std.simd.prefixScanWithFunc

pub fn prefixScanWithFunc(comptime hop: isize, vec: anytype, comptime ErrorType: type, comptime func: fn (@TypeOf(vec), @TypeOf(vec)) if (ErrorType == void) @TypeOf(vec) else ErrorType!@TypeOf(vec), comptime identity: std.meta.Child(@TypeOf(vec))) if (ErrorType == void) @TypeOf(vec) else ErrorType!@TypeOf(vec)

Same as prefixScan, but with a user-provided, mathematically associative function.

Kind
function
Module
std.simd

Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.