Package org.microproxy.simd
Interface Simd.Ops
- Enclosing class:
Simd
public static interface Simd.Ops
The operations, in scalar and SIMD flavours.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a short description, such asscalarorvector 256-bit.intindexOf(byte[] a, int from, int to, byte value) The index of the firstvalueina[from, to), or -1.voidxorMask(byte[] a, int off, int len, int mask) XORsa[off, off + len)with the 4-bytemaskrepeated, starting with its most significant byte: WebSocket (un)masking.
-
Method Details
-
indexOf
int indexOf(byte[] a, int from, int to, byte value) The index of the firstvalueina[from, to), or -1.- Parameters:
a- the byte array to searchfrom- the first array index, inclusiveto- the last array index, exclusivevalue- the byte value to find- Returns:
- the first matching index, or -1 if no byte matches
-
xorMask
void xorMask(byte[] a, int off, int len, int mask) XORsa[off, off + len)with the 4-bytemaskrepeated, starting with its most significant byte: WebSocket (un)masking.- Parameters:
a- the byte array to modifyoff- the first byte offset to modifylen- the number of bytes to modifymask- the four-byte mask, applied most significant byte first
-
description
String description()Returns a short description, such asscalarorvector 256-bit.- Returns:
- a short description, such as
scalarorvector 256-bit
-