Dieser Inhalt wurde automatisch aus dem Englischen übersetzt, und kann Fehler enthalten. Erfahre mehr über dieses Experiment.

View in English Always switch to English

any_true: Wasm SIMD bitweise Anweisung

Die any_true SIMD Bitweise Anweisung prüft, ob ein v128 Eingabewert irgendwelche ungleich null Bits enthält.

Probieren Sie es aus

(module
  (import "console" "log" (func $log (param i32)))
  (func $main
    v128.const f32x4 0 0 0 1.2
    v128.any_true

    call $log ;; log the result
  )
  (start $main)
)
WebAssembly.instantiateStreaming(fetch("{%wasm-url%}"), { console });

Syntax

v128.any_true
v128.any_true

Die v128.any_true Anweisung.

Typ

[input] -> [output]
input

Die Interpretation des v128 Eingabewerts. Dies kann ein ganzzahliger Typ sein (zum Beispiel i16x8) oder ein Gleitkomma-Typ (zum Beispiel f32x4).

output

Der Ausgabewert. Dies ist ein i32 Typ, der 1 ist, wenn der v128 Eingabewert irgendwelche ungleich null Bits enthält, oder 0, wenn alle Bits 0 sind.

Binärcodierung

Anweisung Binärformat Beispiel Text => binär
v128.any_true 0xfd 83:u32 v128.any_true => 0xfd 0x53

Spezifikationen

Diese Funktion scheint in keiner Spezifikation definiert zu sein.

Browser-Kompatibilität

Siehe auch