diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-04-28 16:25:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-28 16:25:40 -0400 |
| commit | 5929e5ca0ebde636dd69d52d648df8cff59e6d96 (patch) | |
| tree | 1ac7f32bf08840ac72bb5cf6a5eb2d694c2e192e /doc | |
| parent | 03dd1fca94526f78400c662b6b1e712c05aee849 (diff) | |
| parent | 0673a8d5763bf0fec007d8ed05128310a9e66719 (diff) | |
| download | zig-5929e5ca0ebde636dd69d52d648df8cff59e6d96.tar.gz zig-5929e5ca0ebde636dd69d52d648df8cff59e6d96.zip | |
Merge pull request #5196 from tadeokondrak/@vector-to-@type-vector
`@Vector` -> `@Type(.Vector)`
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/langref.html.in | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in index fa649ebf25..6026912893 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -1850,8 +1850,8 @@ test "null terminated array" { {#header_open|Vectors#} <p> 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#}. </p> <p> TODO talk about C ABI interop @@ -7910,7 +7910,7 @@ test "@setRuntimeSafety" { {#header_close#} {#header_open|@shuffle#} - <pre>{#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#}</pre> + <pre>{#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#}</pre> <p> Constructs a new {#link|vector|Vectors#} by selecting elements from {#syntax#}a{#endsyntax#} and {#syntax#}b{#endsyntax#} based on {#syntax#}mask{#endsyntax#}. @@ -7966,7 +7966,7 @@ test "@setRuntimeSafety" { {#header_close#} {#header_open|@splat#} - <pre>{#syntax#}@splat(comptime len: u32, scalar: var) @Vector(len, @TypeOf(scalar)){#endsyntax#}</pre> + <pre>{#syntax#}@splat(comptime len: u32, scalar: var) std.meta.Vector(len, @TypeOf(scalar)){#endsyntax#}</pre> <p> Produces a vector of length {#syntax#}len{#endsyntax#} where each element is the value {#syntax#}scalar{#endsyntax#}: @@ -7978,7 +7978,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#} @@ -8336,17 +8336,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#}. </p> {#header_close#} - - {#header_open|@Vector#} - <pre>{#syntax#}@Vector(comptime len: u32, comptime ElemType: type) type{#endsyntax#}</pre> - <p> - This function returns a vector type for {#link|SIMD#}. - </p> - <p> - {#syntax#}ElemType{#endsyntax#} must be an {#link|integer|Integers#}, a {#link|float|Floats#}, or a - {#link|pointer|Pointers#}. - </p> - {#header_close#} {#header_close#} {#header_open|Opaque Types#} |
