struct U8x16
pub struct U8x16 {
pub v [16]u8
}Purpose
Structure encapsulating v.
Public fields
v[16]u8- value
#simdPortable 16-byte aligned 128-bit SIMD vector value types and hardware-accelerated bulk kernels (ARM64 NEON / x86-64 SSE2/SSSE3, with scalar fallbacks on other targets).
struct U8x16pub struct U8x16 {
pub v [16]u8
}Structure encapsulating v.
v [16]u8u8x16_zeropub fn u8x16_zero() U8x16U8x16 zero.
No arguments are required.
U8x16 — a value of this type
u8x16_splatpub fn u8x16_splat(val u8) U8x16U8x16 splat.
val u8U8x16 — a value of this type
u8x16_loadpub fn u8x16_load(src &[]u8, off int) U8x16U8x16 load. Throws on failure; handle the error or propagate it to the caller.
src &[]u8off intU8x16 — a value of this type
u8x16_storepub fn u8x16_store(dst $&[]u8, off int, a U8x16) intU8x16 store. Throws on failure; handle the error or propagate it to the caller.
dst $&[]u8off inta U8x16int — a value of this type
(U8x16) storepub fn (a U8x16) store(dst $&[]u8, off int) intExecute store on U8x16. Throws on failure; handle the error or propagate it to the caller.
a U8x16U8x16 instance used by this call (value receiver).dst $&[]u8off intint — a value of this type
(U8x16) addpub fn (a U8x16) add(b U8x16) U8x16Operation on U8x16: add.
a U8x16U8x16 instance used by this call (value receiver).b U8x16U8x16 — a value of this type
(U8x16) subpub fn (a U8x16) sub(b U8x16) U8x16Operation on U8x16: subtract.
a U8x16U8x16 instance used by this call (value receiver).b U8x16U8x16 — a value of this type
(U8x16) add_satpub fn (a U8x16) add_sat(b U8x16) U8x16Operation on U8x16: add sat.
a U8x16U8x16 instance used by this call (value receiver).b U8x16U8x16 — a value of this type
(U8x16) sub_satpub fn (a U8x16) sub_sat(b U8x16) U8x16Operation on U8x16: sub sat.
a U8x16U8x16 instance used by this call (value receiver).b U8x16U8x16 — a value of this type
(U8x16) minpub fn (a U8x16) min(b U8x16) U8x16Operation on U8x16: return the smaller of two numeric values.
a U8x16U8x16 instance used by this call (value receiver).b U8x16U8x16 — a value of this type
(U8x16) maxpub fn (a U8x16) max(b U8x16) U8x16Operation on U8x16: return the larger of two numeric values.
a U8x16U8x16 instance used by this call (value receiver).b U8x16U8x16 — a value of this type
(U8x16) abs_diffpub fn (a U8x16) abs_diff(b U8x16) U8x16Operation on U8x16: abs diff.
a U8x16U8x16 instance used by this call (value receiver).b U8x16U8x16 — a value of this type
(U8x16) sadpub fn (a U8x16) sad(b U8x16) intExecute sad on U8x16.
a U8x16U8x16 instance used by this call (value receiver).b U8x16int — a value of this type
(U8x16) hsumpub fn (a U8x16) hsum() intExecute hsum on U8x16.
a U8x16U8x16 instance used by this call (value receiver).int — a value of this type
(U8x16) shufflepub fn (a U8x16) shuffle(idx U8x16) U8x16Operation on U8x16: shuffle.
a U8x16U8x16 instance used by this call (value receiver).idx U8x16U8x16 — a value of this type
(U8x16) clamppub fn (a U8x16) clamp(lo u8, hi u8) U8x16Execute clamp on U8x16.
a U8x16U8x16 instance used by this call (value receiver).lo u8hi u8U8x16 — a value of this type
struct I16x8pub struct I16x8 {
pub v [8]i16
}Structure encapsulating v.
v [8]i16i16x8_zeropub fn i16x8_zero() I16x8I16x8 zero.
No arguments are required.
I16x8 — a value of this type
i16x8_splatpub fn i16x8_splat(val i16) I16x8I16x8 splat.
val i16I16x8 — a value of this type
i16x8_loadpub fn i16x8_load(src &[]i16, off int) I16x8I16x8 load. Throws on failure; handle the error or propagate it to the caller.
src &[]i16off intI16x8 — a value of this type
i16x8_storepub fn i16x8_store(dst $&[]i16, off int, a I16x8) intI16x8 store. Throws on failure; handle the error or propagate it to the caller.
dst $&[]i16off inta I16x8int — a value of this type
(I16x8) storepub fn (a I16x8) store(dst $&[]i16, off int) intExecute store on I16x8. Throws on failure; handle the error or propagate it to the caller.
a I16x8I16x8 instance used by this call (value receiver).dst $&[]i16off intint — a value of this type
(I16x8) addpub fn (a I16x8) add(b I16x8) I16x8Operation on I16x8: add.
a I16x8I16x8 instance used by this call (value receiver).b I16x8I16x8 — a value of this type
(I16x8) subpub fn (a I16x8) sub(b I16x8) I16x8Operation on I16x8: subtract.
a I16x8I16x8 instance used by this call (value receiver).b I16x8I16x8 — a value of this type
(I16x8) mulpub fn (a I16x8) mul(b I16x8) I16x8Operation on I16x8: multiply.
a I16x8I16x8 instance used by this call (value receiver).b I16x8I16x8 — a value of this type
(I16x8) add_satpub fn (a I16x8) add_sat(b I16x8) I16x8Operation on I16x8: add sat.
a I16x8I16x8 instance used by this call (value receiver).b I16x8I16x8 — a value of this type
(I16x8) sub_satpub fn (a I16x8) sub_sat(b I16x8) I16x8Operation on I16x8: sub sat.
a I16x8I16x8 instance used by this call (value receiver).b I16x8I16x8 — a value of this type
(I16x8) minpub fn (a I16x8) min(b I16x8) I16x8Operation on I16x8: return the smaller of two numeric values.
a I16x8I16x8 instance used by this call (value receiver).b I16x8I16x8 — a value of this type
(I16x8) maxpub fn (a I16x8) max(b I16x8) I16x8Operation on I16x8: return the larger of two numeric values.
a I16x8I16x8 instance used by this call (value receiver).b I16x8I16x8 — a value of this type
(I16x8) clamppub fn (a I16x8) clamp(lo i16, hi i16) I16x8Execute clamp on I16x8.
a I16x8I16x8 instance used by this call (value receiver).lo i16hi i16I16x8 — a value of this type
(I16x8) narrow_sat_u8pub fn (a I16x8) narrow_sat_u8(b I16x8) U8x16Operation on I16x8: narrow sat u8.
a I16x8I16x8 instance used by this call (value receiver).b I16x8U8x16 — a value of this type
(I16x8) hsumpub fn (a I16x8) hsum() intExecute hsum on I16x8.
a I16x8I16x8 instance used by this call (value receiver).int — a value of this type
struct U16x8pub struct U16x8 {
pub v [8]u16
}Structure encapsulating v.
v [8]u16u16x8_zeropub fn u16x8_zero() U16x8U16x8 zero.
No arguments are required.
U16x8 — a value of this type
u16x8_splatpub fn u16x8_splat(val u16) U16x8U16x8 splat.
val u16U16x8 — a value of this type
u16x8_loadpub fn u16x8_load(src &[]u16, off int) U16x8U16x8 load. Throws on failure; handle the error or propagate it to the caller.
src &[]u16off intU16x8 — a value of this type
u16x8_storepub fn u16x8_store(dst $&[]u16, off int, a U16x8) intU16x8 store. Throws on failure; handle the error or propagate it to the caller.
dst $&[]u16off inta U16x8int — a value of this type
(U16x8) storepub fn (a U16x8) store(dst $&[]u16, off int) intExecute store on U16x8. Throws on failure; handle the error or propagate it to the caller.
a U16x8U16x8 instance used by this call (value receiver).dst $&[]u16off intint — a value of this type
(U16x8) addpub fn (a U16x8) add(b U16x8) U16x8Operation on U16x8: add.
a U16x8U16x8 instance used by this call (value receiver).b U16x8U16x8 — a value of this type
(U16x8) subpub fn (a U16x8) sub(b U16x8) U16x8Operation on U16x8: subtract.
a U16x8U16x8 instance used by this call (value receiver).b U16x8U16x8 — a value of this type
(U16x8) mulpub fn (a U16x8) mul(b U16x8) U16x8Operation on U16x8: multiply.
a U16x8U16x8 instance used by this call (value receiver).b U16x8U16x8 — a value of this type
(U16x8) minpub fn (a U16x8) min(b U16x8) U16x8Operation on U16x8: return the smaller of two numeric values.
a U16x8U16x8 instance used by this call (value receiver).b U16x8U16x8 — a value of this type
(U16x8) maxpub fn (a U16x8) max(b U16x8) U16x8Operation on U16x8: return the larger of two numeric values.
a U16x8U16x8 instance used by this call (value receiver).b U16x8U16x8 — a value of this type
(U16x8) hsumpub fn (a U16x8) hsum() intExecute hsum on U16x8.
a U16x8U16x8 instance used by this call (value receiver).int — a value of this type
struct I32x4pub struct I32x4 {
pub v [4]i32
}Structure encapsulating v.
v [4]i32i32x4_zeropub fn i32x4_zero() I32x4I32x4 zero.
No arguments are required.
I32x4 — a value of this type
i32x4_splatpub fn i32x4_splat(val i32) I32x4I32x4 splat.
val i32I32x4 — a value of this type
i32x4_loadpub fn i32x4_load(src &[]i32, off int) I32x4I32x4 load. Throws on failure; handle the error or propagate it to the caller.
src &[]i32off intI32x4 — a value of this type
i32x4_storepub fn i32x4_store(dst $&[]i32, off int, a I32x4) intI32x4 store. Throws on failure; handle the error or propagate it to the caller.
dst $&[]i32off inta I32x4int — a value of this type
(I32x4) storepub fn (a I32x4) store(dst $&[]i32, off int) intExecute store on I32x4. Throws on failure; handle the error or propagate it to the caller.
a I32x4I32x4 instance used by this call (value receiver).dst $&[]i32off intint — a value of this type
(I32x4) addpub fn (a I32x4) add(b I32x4) I32x4Operation on I32x4: add.
a I32x4I32x4 instance used by this call (value receiver).b I32x4I32x4 — a value of this type
(I32x4) subpub fn (a I32x4) sub(b I32x4) I32x4Operation on I32x4: subtract.
a I32x4I32x4 instance used by this call (value receiver).b I32x4I32x4 — a value of this type
(I32x4) mulpub fn (a I32x4) mul(b I32x4) I32x4Operation on I32x4: multiply.
a I32x4I32x4 instance used by this call (value receiver).b I32x4I32x4 — a value of this type
(I32x4) minpub fn (a I32x4) min(b I32x4) I32x4Operation on I32x4: return the smaller of two numeric values.
a I32x4I32x4 instance used by this call (value receiver).b I32x4I32x4 — a value of this type
(I32x4) maxpub fn (a I32x4) max(b I32x4) I32x4Operation on I32x4: return the larger of two numeric values.
a I32x4I32x4 instance used by this call (value receiver).b I32x4I32x4 — a value of this type
(I32x4) hsumpub fn (a I32x4) hsum() intExecute hsum on I32x4.
a I32x4I32x4 instance used by this call (value receiver).int — a value of this type
struct F32x4pub struct F32x4 {
pub v [4]f32
}Structure encapsulating v.
v [4]f32f32x4_zeropub fn f32x4_zero() F32x4F32x4 zero.
No arguments are required.
F32x4 — a value of this type
f32x4_splatpub fn f32x4_splat(val f32) F32x4F32x4 splat.
val f32F32x4 — a value of this type
f32x4_loadpub fn f32x4_load(src &[]f32, off int) F32x4F32x4 load. Throws on failure; handle the error or propagate it to the caller.
src &[]f32off intF32x4 — a value of this type
f32x4_storepub fn f32x4_store(dst $&[]f32, off int, a F32x4) intF32x4 store. Throws on failure; handle the error or propagate it to the caller.
dst $&[]f32off inta F32x4int — a value of this type
(F32x4) storepub fn (a F32x4) store(dst $&[]f32, off int) intExecute store on F32x4. Throws on failure; handle the error or propagate it to the caller.
a F32x4F32x4 instance used by this call (value receiver).dst $&[]f32off intint — a value of this type
(F32x4) addpub fn (a F32x4) add(b F32x4) F32x4Operation on F32x4: add.
a F32x4F32x4 instance used by this call (value receiver).b F32x4F32x4 — a value of this type
(F32x4) subpub fn (a F32x4) sub(b F32x4) F32x4Operation on F32x4: subtract.
a F32x4F32x4 instance used by this call (value receiver).b F32x4F32x4 — a value of this type
(F32x4) mulpub fn (a F32x4) mul(b F32x4) F32x4Operation on F32x4: multiply.
a F32x4F32x4 instance used by this call (value receiver).b F32x4F32x4 — a value of this type
(F32x4) divpub fn (a F32x4) div(b F32x4) F32x4Operation on F32x4: divide.
a F32x4F32x4 instance used by this call (value receiver).b F32x4F32x4 — a value of this type
(F32x4) fmapub fn (a F32x4) fma(b F32x4, c F32x4) F32x4Operation on F32x4: compute fused multiply-add (x * y + z).
a F32x4F32x4 instance used by this call (value receiver).b F32x4c F32x4F32x4 — a value of this type
(F32x4) dotpub fn (a F32x4) dot(b F32x4) f32Execute dot on F32x4.
a F32x4F32x4 instance used by this call (value receiver).b F32x4f32 — a value of this type
(F32x4) minpub fn (a F32x4) min(b F32x4) F32x4Operation on F32x4: return the smaller of two numeric values.
a F32x4F32x4 instance used by this call (value receiver).b F32x4F32x4 — a value of this type
(F32x4) maxpub fn (a F32x4) max(b F32x4) F32x4Operation on F32x4: return the larger of two numeric values.
a F32x4F32x4 instance used by this call (value receiver).b F32x4F32x4 — a value of this type
(F32x4) clamppub fn (a F32x4) clamp(lo f32, hi f32) F32x4Execute clamp on F32x4.
a F32x4F32x4 instance used by this call (value receiver).lo f32hi f32F32x4 — a value of this type
(F32x4) hsumpub fn (a F32x4) hsum() f32Execute hsum on F32x4.
a F32x4F32x4 instance used by this call (value receiver).f32 — a value of this type
struct F64x2pub struct F64x2 {
pub v [2]f64
}Structure encapsulating v.
v [2]f64f64x2_zeropub fn f64x2_zero() F64x2F64x2 zero.
No arguments are required.
F64x2 — a value of this type
f64x2_splatpub fn f64x2_splat(val f64) F64x2F64x2 splat.
val f64F64x2 — a value of this type
f64x2_loadpub fn f64x2_load(src &[]f64, off int) F64x2F64x2 load. Throws on failure; handle the error or propagate it to the caller.
src &[]f64off intF64x2 — a value of this type
f64x2_storepub fn f64x2_store(dst $&[]f64, off int, a F64x2) intF64x2 store. Throws on failure; handle the error or propagate it to the caller.
dst $&[]f64off inta F64x2int — a value of this type
(F64x2) storepub fn (a F64x2) store(dst $&[]f64, off int) intExecute store on F64x2. Throws on failure; handle the error or propagate it to the caller.
a F64x2F64x2 instance used by this call (value receiver).dst $&[]f64off intint — a value of this type
(F64x2) addpub fn (a F64x2) add(b F64x2) F64x2Operation on F64x2: add.
a F64x2F64x2 instance used by this call (value receiver).b F64x2F64x2 — a value of this type
(F64x2) subpub fn (a F64x2) sub(b F64x2) F64x2Operation on F64x2: subtract.
a F64x2F64x2 instance used by this call (value receiver).b F64x2F64x2 — a value of this type
(F64x2) mulpub fn (a F64x2) mul(b F64x2) F64x2Operation on F64x2: multiply.
a F64x2F64x2 instance used by this call (value receiver).b F64x2F64x2 — a value of this type
(F64x2) divpub fn (a F64x2) div(b F64x2) F64x2Operation on F64x2: divide.
a F64x2F64x2 instance used by this call (value receiver).b F64x2F64x2 — a value of this type
(F64x2) fmapub fn (a F64x2) fma(b F64x2, c F64x2) F64x2Operation on F64x2: compute fused multiply-add (x * y + z).
a F64x2F64x2 instance used by this call (value receiver).b F64x2c F64x2F64x2 — a value of this type
(F64x2) hsumpub fn (a F64x2) hsum() f64Execute hsum on F64x2.
a F64x2F64x2 instance used by this call (value receiver).f64 — a value of this type
sad_u8pub fn sad_u8(a &[]u8, b &[]u8, n int) intSad u8. Throws on failure; handle the error or propagate it to the caller.
a &[]u8b &[]u8n intint — a value of this type
ssd_u8pub fn ssd_u8(a &[]u8, b &[]u8, n int) intSsd u8. Throws on failure; handle the error or propagate it to the caller.
a &[]u8b &[]u8n intint — a value of this type
mad_u8pub fn mad_u8(a &[]u8, b &[]u8, n int) f64Mad u8. Throws on failure; handle the error or propagate it to the caller.
a &[]u8b &[]u8n intf64 — a value of this type
psnr_u8pub fn psnr_u8(a &[]u8, b &[]u8, n int) f64Psnr u8. Throws on failure; handle the error or propagate it to the caller.
a &[]u8b &[]u8n intf64 — a value of this type
dot_f32pub fn dot_f32(a &[]f32, b &[]f32, n int) f32Dot f32. Throws on failure; handle the error or propagate it to the caller.
a &[]f32b &[]f32n intf32 — a value of this type
sum_sq_f32pub fn sum_sq_f32(a &[]f32, n int) f32Digest sq f32. Throws on failure; handle the error or propagate it to the caller.
a &[]f32n intf32 — a value of this type
rms_f32pub fn rms_f32(a &[]f32, n int) f64Rms f32. Throws on failure; handle the error or propagate it to the caller.
a &[]f32n intf64 — a value of this type
rgb24_to_rgba32pub fn rgb24_to_rgba32(src &[]u8, dst $&[]u8, n_pixels int) intRgb24 to rgba32. Throws on failure; handle the error or propagate it to the caller.
src &[]u8dst $&[]u8n_pixels intint — a value of this type
rgba32_to_rgb24pub fn rgba32_to_rgb24(src &[]u8, dst $&[]u8, n_pixels int) intRgba32 to rgb24. Throws on failure; handle the error or propagate it to the caller.
src &[]u8dst $&[]u8n_pixels intint — a value of this type
u8_to_f32_normpub fn u8_to_f32_norm(src &[]u8, dst $&[]f32, n int, scale f32, bias f32) intU8 to f32 norm. Throws on failure; handle the error or propagate it to the caller.
src &[]u8dst $&[]f32n intscale f32bias f32int — a value of this type
lut_u8pub fn lut_u8(src &[]u8, dst $&[]u8, lut &[]u8, n int) intLut u8. Throws on failure; handle the error or propagate it to the caller.
src &[]u8dst $&[]u8lut &[]u8n intint — a value of this type
yuv420p_to_rgb24pub fn yuv420p_to_rgb24(y &[]u8, u &[]u8, v &[]u8, rgb $&[]u8, width int, height int, y_stride int, uv_stride int) intYuv420p to rgb24. Throws on failure; handle the error or propagate it to the caller.
y &[]u8u &[]u8v &[]u8rgb $&[]u8width intheight inty_stride intuv_stride intint — a value of this type
nv12_to_rgb24pub fn nv12_to_rgb24(y &[]u8, uv &[]u8, rgb $&[]u8, width int, height int, y_stride int, uv_stride int) intNv12 to rgb24. Throws on failure; handle the error or propagate it to the caller.
y &[]u8uv &[]u8rgb $&[]u8width intheight inty_stride intuv_stride intint — a value of this type