Skip to content

Commit

Permalink
chore: enhance comment for extract_lane functions to include "idx" ar…
Browse files Browse the repository at this point in the history
…gument needs to be compile time constant (#2890)
  • Loading branch information
KazChe authored Dec 12, 2024
1 parent 285afb1 commit 40850fe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ under the licensing terms detailed in LICENSE:
* Matt Johnson-Pint <[email protected]>
* Fabián Heredia Montiel <[email protected]>
* Jonas Minnberg <[email protected]>
* Kam Chehresa <[email protected]>

Portions of this software are derived from third-party works licensed under
the following terms:
Expand Down
32 changes: 16 additions & 16 deletions std/assembly/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,9 +791,9 @@ declare function v128(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i:
declare namespace v128 {
/** Creates a vector with identical lanes. */
export function splat<T>(x: T): v128;
/** Extracts one lane as a scalar. */
/** Extracts one lane as a scalar. idx argument needs to be compile time constant. */
export function extract_lane<T>(x: v128, idx: u8): T;
/** Replaces one lane. */
/** Replaces one lane. idx argument needs to be compile time constant.*/
export function replace_lane<T>(x: v128, idx: u8, value: T): v128;
/** Selects lanes from either vector according to the specified lane indexes. */
export function shuffle<T>(a: v128, b: v128, ...lanes: u8[]): v128;
Expand Down Expand Up @@ -1051,11 +1051,11 @@ declare function i8x16(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i
declare namespace i8x16 {
/** Creates a vector with sixteen identical 8-bit integer lanes. */
export function splat(x: i8): v128;
/** Extracts one 8-bit integer lane as a signed scalar. */
/** Extracts one 8-bit integer lane as a signed scalar. idx argument needs to be compile time constant. */
export function extract_lane_s(x: v128, idx: u8): i8;
/** Extracts one 8-bit integer lane as an unsigned scalar. */
/** Extracts one 8-bit integer lane as an unsigned scalar. idx argument needs to be compile time constant. */
export function extract_lane_u(x: v128, idx: u8): u8;
/** Replaces one 8-bit integer lane. */
/** Replaces one 8-bit integer lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: i8): v128;
/** Adds each 8-bit integer lane. */
export function add(a: v128, b: v128): v128;
Expand Down Expand Up @@ -1146,11 +1146,11 @@ declare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h
declare namespace i16x8 {
/** Creates a vector with eight identical 16-bit integer lanes. */
export function splat(x: i16): v128;
/** Extracts one 16-bit integer lane as a signed scalar. */
/** Extracts one 16-bit integer lane as a signed scalar. idx argument needs to be compile time constant. */
export function extract_lane_s(x: v128, idx: u8): i16;
/** Extracts one 16-bit integer lane as an unsigned scalar. */
/** Extracts one 16-bit integer lane as an unsigned scalar. idx argument needs to be compile time constant. */
export function extract_lane_u(x: v128, idx: u8): u16;
/** Replaces one 16-bit integer lane. */
/** Replaces one 16-bit integer lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: i16): v128;
/** Adds each 16-bit integer lane. */
export function add(a: v128, b: v128): v128;
Expand Down Expand Up @@ -1267,9 +1267,9 @@ declare function i32x4(a: i32, b: i32, c: i32, d: i32): v128;
declare namespace i32x4 {
/** Creates a vector with four identical 32-bit integer lanes. */
export function splat(x: i32): v128;
/** Extracts one 32-bit integer lane as a scalar. */
/** Extracts one 32-bit integer lane as a scalar. idx argument needs to be compile time constant. */
export function extract_lane(x: v128, idx: u8): i32;
/** Replaces one 32-bit integer lane. */
/** Replaces one 32-bit integer lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: i32): v128;
/** Adds each 32-bit integer lane. */
export function add(a: v128, b: v128): v128;
Expand Down Expand Up @@ -1416,9 +1416,9 @@ declare function i64x2(a: i64, b: i64): v128;
declare namespace i64x2 {
/** Creates a vector with two identical 64-bit integer lanes. */
export function splat(x: i64): v128;
/** Extracts one 64-bit integer lane as a scalar. */
/** Extracts one 64-bit integer lane as a scalar. `idx` argument need to be compile time constant */
export function extract_lane(x: v128, idx: u8): i64;
/** Replaces one 64-bit integer lane. */
/** Replaces one 64-bit integer lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: i64): v128;
/** Adds each 64-bit integer lane. */
export function add(a: v128, b: v128): v128;
Expand Down Expand Up @@ -1485,9 +1485,9 @@ declare function f32x4(a: f32, b: f32, c: f32, d: f32): v128;
declare namespace f32x4 {
/** Creates a vector with four identical 32-bit float lanes. */
export function splat(x: f32): v128;
/** Extracts one 32-bit float lane as a scalar. */
/** Extracts one 32-bit float lane as a scalar. idx argument needs to be compile time constant. */
export function extract_lane(x: v128, idx: u8): f32;
/** Replaces one 32-bit float lane. */
/** Replaces one 32-bit float lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: f32): v128;
/** Adds each 32-bit float lane. */
export function add(a: v128, b: v128): v128;
Expand Down Expand Up @@ -1575,9 +1575,9 @@ declare function f64x2(a: f64, b: f64): v128;
declare namespace f64x2 {
/** Creates a vector with two identical 64-bit float lanes. */
export function splat(x: f64): v128;
/** Extracts one 64-bit float lane as a scalar. */
/** Extracts one 64-bit float lane as a scalar. idx argument needs to be compile time constant. */
export function extract_lane(x: v128, idx: u8): f64;
/** Replaces one 64-bit float lane. */
/** Replaces one 64-bit float lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: f64): v128;
/** Adds each 64-bit float lane. */
export function add(a: v128, b: v128): v128;
Expand Down

0 comments on commit 40850fe

Please sign in to comment.