diff --git a/doc/langref.html.in b/doc/langref.html.in index 3e335c8d6..62d523e08 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -1850,8 +1850,8 @@ test "null terminated array" { {#header_open|Vectors#}

A vector is a group of {#link|Integers#}, {#link|Floats#}, or {#link|Pointers#} which are operated on - in parallel using a single instruction ({#link|SIMD#}). Vector types are created with the builtin - function {#link|@Vector#}. + in parallel using a single instruction ({#link|SIMD#}). Vector types are created with the builtin function {#link|@Type#}, + or using the shorthand as {#syntax#}std.meta.Vector{#endsyntax#}.

TODO talk about C ABI interop @@ -7934,7 +7934,7 @@ test "@setRuntimeSafety" { {#header_close#} {#header_open|@shuffle#} -

{#syntax#}@shuffle(comptime E: type, a: @Vector(a_len, E), b: @Vector(b_len, E), comptime mask: @Vector(mask_len, i32)) @Vector(mask_len, E){#endsyntax#}
+
{#syntax#}@shuffle(comptime E: type, a: std.meta.Vector(a_len, E), b: std.meta.Vector(b_len, E), comptime mask: std.meta.Vector(mask_len, i32)) std.meta.Vector(mask_len, E){#endsyntax#}

Constructs a new {#link|vector|Vectors#} by selecting elements from {#syntax#}a{#endsyntax#} and {#syntax#}b{#endsyntax#} based on {#syntax#}mask{#endsyntax#}. @@ -7990,7 +7990,7 @@ test "@setRuntimeSafety" { {#header_close#} {#header_open|@splat#} -

{#syntax#}@splat(comptime len: u32, scalar: var) @Vector(len, @TypeOf(scalar)){#endsyntax#}
+
{#syntax#}@splat(comptime len: u32, scalar: var) std.meta.Vector(len, @TypeOf(scalar)){#endsyntax#}

Produces a vector of length {#syntax#}len{#endsyntax#} where each element is the value {#syntax#}scalar{#endsyntax#}: @@ -8002,7 +8002,7 @@ const assert = std.debug.assert; test "vector @splat" { const scalar: u32 = 5; const result = @splat(4, scalar); - comptime assert(@TypeOf(result) == @Vector(4, u32)); + comptime assert(@TypeOf(result) == std.meta.Vector(4, u32)); assert(std.mem.eql(u32, &@as([4]u32, result), &[_]u32{ 5, 5, 5, 5 })); } {#code_end#} @@ -8360,17 +8360,6 @@ fn foo(comptime T: type, ptr: *T) T { {#syntax#}@unionInit{#endsyntax#} forwards its {#link|result location|Result Location Semantics#} to {#syntax#}init_expr{#endsyntax#}.

{#header_close#} - - {#header_open|@Vector#} -
{#syntax#}@Vector(comptime len: u32, comptime ElemType: type) type{#endsyntax#}
-

- This function returns a vector type for {#link|SIMD#}. -

-

- {#syntax#}ElemType{#endsyntax#} must be an {#link|integer|Integers#}, a {#link|float|Floats#}, or a - {#link|pointer|Pointers#}. -

- {#header_close#} {#header_close#} {#header_open|Build Mode#}