XU XUv0.16.0

#simd

import: #simd

counts: 37 functions, 55 methods, 6 types, 0 constants, 0 method sets

Portable 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 U8x16

XuAPI
pub struct U8x16 {
    pub v [16]u8
}

Purpose

Structure encapsulating v.

Public fields

v [16]u8
value

u8x16_zero

XuAPI
pub fn u8x16_zero() U8x16

Purpose

U8x16 zero.

Parameters

No arguments are required.

Returns

U8x16 — a value of this type

u8x16_splat

XuAPI
pub fn u8x16_splat(val u8) U8x16

Purpose

U8x16 splat.

Parameters

val u8
value (u8)

Returns

U8x16 — a value of this type

u8x16_load

XuAPI
pub fn u8x16_load(src &[]u8, off int) U8x16

Purpose

U8x16 load. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &[]u8
source (read-only borrow; caller keeps the original; type &[]u8)
off int
offset (int)

Returns

U8x16 — a value of this type

u8x16_store

XuAPI
pub fn u8x16_store(dst $&[]u8, off int, a U8x16) int

Purpose

U8x16 store. Throws on failure; handle the error or propagate it to the caller.

Parameters

dst $&[]u8
destination (exclusive borrow; may modify the original; type $&[]u8)
off int
offset (int)
a U8x16
value (U8x16)

Returns

int — a value of this type

(U8x16) store

XuAPI
pub fn (a U8x16) store(dst $&[]u8, off int) int

Purpose

Execute store on U8x16. Throws on failure; handle the error or propagate it to the caller.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).
dst $&[]u8
destination (exclusive borrow; may modify the original; type $&[]u8)
off int
offset (int)

Returns

int — a value of this type

(U8x16) add

XuAPI
pub fn (a U8x16) add(b U8x16) U8x16

Purpose

Operation on U8x16: add.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).
b U8x16
right operand (U8x16)

Returns

U8x16 — a value of this type

(U8x16) sub

XuAPI
pub fn (a U8x16) sub(b U8x16) U8x16

Purpose

Operation on U8x16: subtract.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).
b U8x16
right operand (U8x16)

Returns

U8x16 — a value of this type

(U8x16) add_sat

XuAPI
pub fn (a U8x16) add_sat(b U8x16) U8x16

Purpose

Operation on U8x16: add sat.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).
b U8x16
b (U8x16)

Returns

U8x16 — a value of this type

(U8x16) sub_sat

XuAPI
pub fn (a U8x16) sub_sat(b U8x16) U8x16

Purpose

Operation on U8x16: sub sat.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).
b U8x16
b (U8x16)

Returns

U8x16 — a value of this type

(U8x16) min

XuAPI
pub fn (a U8x16) min(b U8x16) U8x16

Purpose

Operation on U8x16: return the smaller of two numeric values.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).
b U8x16
right operand (U8x16)

Returns

U8x16 — a value of this type

(U8x16) max

XuAPI
pub fn (a U8x16) max(b U8x16) U8x16

Purpose

Operation on U8x16: return the larger of two numeric values.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).
b U8x16
right operand (U8x16)

Returns

U8x16 — a value of this type

(U8x16) abs_diff

XuAPI
pub fn (a U8x16) abs_diff(b U8x16) U8x16

Purpose

Operation on U8x16: abs diff.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).
b U8x16
b (U8x16)

Returns

U8x16 — a value of this type

(U8x16) sad

XuAPI
pub fn (a U8x16) sad(b U8x16) int

Purpose

Execute sad on U8x16.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).
b U8x16
b (U8x16)

Returns

int — a value of this type

(U8x16) hsum

XuAPI
pub fn (a U8x16) hsum() int

Purpose

Execute hsum on U8x16.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).

Returns

int — a value of this type

(U8x16) shuffle

XuAPI
pub fn (a U8x16) shuffle(idx U8x16) U8x16

Purpose

Operation on U8x16: shuffle.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).
idx U8x16
idx (U8x16)

Returns

U8x16 — a value of this type

(U8x16) clamp

XuAPI
pub fn (a U8x16) clamp(lo u8, hi u8) U8x16

Purpose

Execute clamp on U8x16.

Parameters

a U8x16
The U8x16 instance used by this call (value receiver).
lo u8
lo (u8)
hi u8
hi (u8)

Returns

U8x16 — a value of this type

struct I16x8

XuAPI
pub struct I16x8 {
    pub v [8]i16
}

Purpose

Structure encapsulating v.

Public fields

v [8]i16
value

i16x8_zero

XuAPI
pub fn i16x8_zero() I16x8

Purpose

I16x8 zero.

Parameters

No arguments are required.

Returns

I16x8 — a value of this type

i16x8_splat

XuAPI
pub fn i16x8_splat(val i16) I16x8

Purpose

I16x8 splat.

Parameters

val i16
value (i16)

Returns

I16x8 — a value of this type

i16x8_load

XuAPI
pub fn i16x8_load(src &[]i16, off int) I16x8

Purpose

I16x8 load. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &[]i16
source (read-only borrow; caller keeps the original; type &[]i16)
off int
offset (int)

Returns

I16x8 — a value of this type

i16x8_store

XuAPI
pub fn i16x8_store(dst $&[]i16, off int, a I16x8) int

Purpose

I16x8 store. Throws on failure; handle the error or propagate it to the caller.

Parameters

dst $&[]i16
destination (exclusive borrow; may modify the original; type $&[]i16)
off int
offset (int)
a I16x8
value (I16x8)

Returns

int — a value of this type

(I16x8) store

XuAPI
pub fn (a I16x8) store(dst $&[]i16, off int) int

Purpose

Execute store on I16x8. Throws on failure; handle the error or propagate it to the caller.

Parameters

a I16x8
The I16x8 instance used by this call (value receiver).
dst $&[]i16
destination (exclusive borrow; may modify the original; type $&[]i16)
off int
offset (int)

Returns

int — a value of this type

(I16x8) add

XuAPI
pub fn (a I16x8) add(b I16x8) I16x8

Purpose

Operation on I16x8: add.

Parameters

a I16x8
The I16x8 instance used by this call (value receiver).
b I16x8
right operand (I16x8)

Returns

I16x8 — a value of this type

(I16x8) sub

XuAPI
pub fn (a I16x8) sub(b I16x8) I16x8

Purpose

Operation on I16x8: subtract.

Parameters

a I16x8
The I16x8 instance used by this call (value receiver).
b I16x8
right operand (I16x8)

Returns

I16x8 — a value of this type

(I16x8) mul

XuAPI
pub fn (a I16x8) mul(b I16x8) I16x8

Purpose

Operation on I16x8: multiply.

Parameters

a I16x8
The I16x8 instance used by this call (value receiver).
b I16x8
right operand (I16x8)

Returns

I16x8 — a value of this type

(I16x8) add_sat

XuAPI
pub fn (a I16x8) add_sat(b I16x8) I16x8

Purpose

Operation on I16x8: add sat.

Parameters

a I16x8
The I16x8 instance used by this call (value receiver).
b I16x8
b (I16x8)

Returns

I16x8 — a value of this type

(I16x8) sub_sat

XuAPI
pub fn (a I16x8) sub_sat(b I16x8) I16x8

Purpose

Operation on I16x8: sub sat.

Parameters

a I16x8
The I16x8 instance used by this call (value receiver).
b I16x8
b (I16x8)

Returns

I16x8 — a value of this type

(I16x8) min

XuAPI
pub fn (a I16x8) min(b I16x8) I16x8

Purpose

Operation on I16x8: return the smaller of two numeric values.

Parameters

a I16x8
The I16x8 instance used by this call (value receiver).
b I16x8
right operand (I16x8)

Returns

I16x8 — a value of this type

(I16x8) max

XuAPI
pub fn (a I16x8) max(b I16x8) I16x8

Purpose

Operation on I16x8: return the larger of two numeric values.

Parameters

a I16x8
The I16x8 instance used by this call (value receiver).
b I16x8
right operand (I16x8)

Returns

I16x8 — a value of this type

(I16x8) clamp

XuAPI
pub fn (a I16x8) clamp(lo i16, hi i16) I16x8

Purpose

Execute clamp on I16x8.

Parameters

a I16x8
The I16x8 instance used by this call (value receiver).
lo i16
lo (i16)
hi i16
hi (i16)

Returns

I16x8 — a value of this type

(I16x8) narrow_sat_u8

XuAPI
pub fn (a I16x8) narrow_sat_u8(b I16x8) U8x16

Purpose

Operation on I16x8: narrow sat u8.

Parameters

a I16x8
The I16x8 instance used by this call (value receiver).
b I16x8
b (I16x8)

Returns

U8x16 — a value of this type

(I16x8) hsum

XuAPI
pub fn (a I16x8) hsum() int

Purpose

Execute hsum on I16x8.

Parameters

a I16x8
The I16x8 instance used by this call (value receiver).

Returns

int — a value of this type

struct U16x8

XuAPI
pub struct U16x8 {
    pub v [8]u16
}

Purpose

Structure encapsulating v.

Public fields

v [8]u16
value

u16x8_zero

XuAPI
pub fn u16x8_zero() U16x8

Purpose

U16x8 zero.

Parameters

No arguments are required.

Returns

U16x8 — a value of this type

u16x8_splat

XuAPI
pub fn u16x8_splat(val u16) U16x8

Purpose

U16x8 splat.

Parameters

val u16
value (u16)

Returns

U16x8 — a value of this type

u16x8_load

XuAPI
pub fn u16x8_load(src &[]u16, off int) U16x8

Purpose

U16x8 load. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &[]u16
source (read-only borrow; caller keeps the original; type &[]u16)
off int
offset (int)

Returns

U16x8 — a value of this type

u16x8_store

XuAPI
pub fn u16x8_store(dst $&[]u16, off int, a U16x8) int

Purpose

U16x8 store. Throws on failure; handle the error or propagate it to the caller.

Parameters

dst $&[]u16
destination (exclusive borrow; may modify the original; type $&[]u16)
off int
offset (int)
a U16x8
value (U16x8)

Returns

int — a value of this type

(U16x8) store

XuAPI
pub fn (a U16x8) store(dst $&[]u16, off int) int

Purpose

Execute store on U16x8. Throws on failure; handle the error or propagate it to the caller.

Parameters

a U16x8
The U16x8 instance used by this call (value receiver).
dst $&[]u16
destination (exclusive borrow; may modify the original; type $&[]u16)
off int
offset (int)

Returns

int — a value of this type

(U16x8) add

XuAPI
pub fn (a U16x8) add(b U16x8) U16x8

Purpose

Operation on U16x8: add.

Parameters

a U16x8
The U16x8 instance used by this call (value receiver).
b U16x8
right operand (U16x8)

Returns

U16x8 — a value of this type

(U16x8) sub

XuAPI
pub fn (a U16x8) sub(b U16x8) U16x8

Purpose

Operation on U16x8: subtract.

Parameters

a U16x8
The U16x8 instance used by this call (value receiver).
b U16x8
right operand (U16x8)

Returns

U16x8 — a value of this type

(U16x8) mul

XuAPI
pub fn (a U16x8) mul(b U16x8) U16x8

Purpose

Operation on U16x8: multiply.

Parameters

a U16x8
The U16x8 instance used by this call (value receiver).
b U16x8
right operand (U16x8)

Returns

U16x8 — a value of this type

(U16x8) min

XuAPI
pub fn (a U16x8) min(b U16x8) U16x8

Purpose

Operation on U16x8: return the smaller of two numeric values.

Parameters

a U16x8
The U16x8 instance used by this call (value receiver).
b U16x8
right operand (U16x8)

Returns

U16x8 — a value of this type

(U16x8) max

XuAPI
pub fn (a U16x8) max(b U16x8) U16x8

Purpose

Operation on U16x8: return the larger of two numeric values.

Parameters

a U16x8
The U16x8 instance used by this call (value receiver).
b U16x8
right operand (U16x8)

Returns

U16x8 — a value of this type

(U16x8) hsum

XuAPI
pub fn (a U16x8) hsum() int

Purpose

Execute hsum on U16x8.

Parameters

a U16x8
The U16x8 instance used by this call (value receiver).

Returns

int — a value of this type

struct I32x4

XuAPI
pub struct I32x4 {
    pub v [4]i32
}

Purpose

Structure encapsulating v.

Public fields

v [4]i32
value

i32x4_zero

XuAPI
pub fn i32x4_zero() I32x4

Purpose

I32x4 zero.

Parameters

No arguments are required.

Returns

I32x4 — a value of this type

i32x4_splat

XuAPI
pub fn i32x4_splat(val i32) I32x4

Purpose

I32x4 splat.

Parameters

val i32
value (i32)

Returns

I32x4 — a value of this type

i32x4_load

XuAPI
pub fn i32x4_load(src &[]i32, off int) I32x4

Purpose

I32x4 load. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &[]i32
source (read-only borrow; caller keeps the original; type &[]i32)
off int
offset (int)

Returns

I32x4 — a value of this type

i32x4_store

XuAPI
pub fn i32x4_store(dst $&[]i32, off int, a I32x4) int

Purpose

I32x4 store. Throws on failure; handle the error or propagate it to the caller.

Parameters

dst $&[]i32
destination (exclusive borrow; may modify the original; type $&[]i32)
off int
offset (int)
a I32x4
value (I32x4)

Returns

int — a value of this type

(I32x4) store

XuAPI
pub fn (a I32x4) store(dst $&[]i32, off int) int

Purpose

Execute store on I32x4. Throws on failure; handle the error or propagate it to the caller.

Parameters

a I32x4
The I32x4 instance used by this call (value receiver).
dst $&[]i32
destination (exclusive borrow; may modify the original; type $&[]i32)
off int
offset (int)

Returns

int — a value of this type

(I32x4) add

XuAPI
pub fn (a I32x4) add(b I32x4) I32x4

Purpose

Operation on I32x4: add.

Parameters

a I32x4
The I32x4 instance used by this call (value receiver).
b I32x4
right operand (I32x4)

Returns

I32x4 — a value of this type

(I32x4) sub

XuAPI
pub fn (a I32x4) sub(b I32x4) I32x4

Purpose

Operation on I32x4: subtract.

Parameters

a I32x4
The I32x4 instance used by this call (value receiver).
b I32x4
right operand (I32x4)

Returns

I32x4 — a value of this type

(I32x4) mul

XuAPI
pub fn (a I32x4) mul(b I32x4) I32x4

Purpose

Operation on I32x4: multiply.

Parameters

a I32x4
The I32x4 instance used by this call (value receiver).
b I32x4
right operand (I32x4)

Returns

I32x4 — a value of this type

(I32x4) min

XuAPI
pub fn (a I32x4) min(b I32x4) I32x4

Purpose

Operation on I32x4: return the smaller of two numeric values.

Parameters

a I32x4
The I32x4 instance used by this call (value receiver).
b I32x4
right operand (I32x4)

Returns

I32x4 — a value of this type

(I32x4) max

XuAPI
pub fn (a I32x4) max(b I32x4) I32x4

Purpose

Operation on I32x4: return the larger of two numeric values.

Parameters

a I32x4
The I32x4 instance used by this call (value receiver).
b I32x4
right operand (I32x4)

Returns

I32x4 — a value of this type

(I32x4) hsum

XuAPI
pub fn (a I32x4) hsum() int

Purpose

Execute hsum on I32x4.

Parameters

a I32x4
The I32x4 instance used by this call (value receiver).

Returns

int — a value of this type

struct F32x4

XuAPI
pub struct F32x4 {
    pub v [4]f32
}

Purpose

Structure encapsulating v.

Public fields

v [4]f32
value

f32x4_zero

XuAPI
pub fn f32x4_zero() F32x4

Purpose

F32x4 zero.

Parameters

No arguments are required.

Returns

F32x4 — a value of this type

f32x4_splat

XuAPI
pub fn f32x4_splat(val f32) F32x4

Purpose

F32x4 splat.

Parameters

val f32
value (f32)

Returns

F32x4 — a value of this type

f32x4_load

XuAPI
pub fn f32x4_load(src &[]f32, off int) F32x4

Purpose

F32x4 load. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &[]f32
source (read-only borrow; caller keeps the original; type &[]f32)
off int
offset (int)

Returns

F32x4 — a value of this type

f32x4_store

XuAPI
pub fn f32x4_store(dst $&[]f32, off int, a F32x4) int

Purpose

F32x4 store. Throws on failure; handle the error or propagate it to the caller.

Parameters

dst $&[]f32
destination (exclusive borrow; may modify the original; type $&[]f32)
off int
offset (int)
a F32x4
value (F32x4)

Returns

int — a value of this type

(F32x4) store

XuAPI
pub fn (a F32x4) store(dst $&[]f32, off int) int

Purpose

Execute store on F32x4. Throws on failure; handle the error or propagate it to the caller.

Parameters

a F32x4
The F32x4 instance used by this call (value receiver).
dst $&[]f32
destination (exclusive borrow; may modify the original; type $&[]f32)
off int
offset (int)

Returns

int — a value of this type

(F32x4) add

XuAPI
pub fn (a F32x4) add(b F32x4) F32x4

Purpose

Operation on F32x4: add.

Parameters

a F32x4
The F32x4 instance used by this call (value receiver).
b F32x4
right operand (F32x4)

Returns

F32x4 — a value of this type

(F32x4) sub

XuAPI
pub fn (a F32x4) sub(b F32x4) F32x4

Purpose

Operation on F32x4: subtract.

Parameters

a F32x4
The F32x4 instance used by this call (value receiver).
b F32x4
right operand (F32x4)

Returns

F32x4 — a value of this type

(F32x4) mul

XuAPI
pub fn (a F32x4) mul(b F32x4) F32x4

Purpose

Operation on F32x4: multiply.

Parameters

a F32x4
The F32x4 instance used by this call (value receiver).
b F32x4
right operand (F32x4)

Returns

F32x4 — a value of this type

(F32x4) div

XuAPI
pub fn (a F32x4) div(b F32x4) F32x4

Purpose

Operation on F32x4: divide.

Parameters

a F32x4
The F32x4 instance used by this call (value receiver).
b F32x4
right operand (F32x4)

Returns

F32x4 — a value of this type

(F32x4) fma

XuAPI
pub fn (a F32x4) fma(b F32x4, c F32x4) F32x4

Purpose

Operation on F32x4: compute fused multiply-add (x * y + z).

Parameters

a F32x4
The F32x4 instance used by this call (value receiver).
b F32x4
b (F32x4)
c F32x4
byte or character code (F32x4)

Returns

F32x4 — a value of this type

(F32x4) dot

XuAPI
pub fn (a F32x4) dot(b F32x4) f32

Purpose

Execute dot on F32x4.

Parameters

a F32x4
The F32x4 instance used by this call (value receiver).
b F32x4
b (F32x4)

Returns

f32 — a value of this type

(F32x4) min

XuAPI
pub fn (a F32x4) min(b F32x4) F32x4

Purpose

Operation on F32x4: return the smaller of two numeric values.

Parameters

a F32x4
The F32x4 instance used by this call (value receiver).
b F32x4
right operand (F32x4)

Returns

F32x4 — a value of this type

(F32x4) max

XuAPI
pub fn (a F32x4) max(b F32x4) F32x4

Purpose

Operation on F32x4: return the larger of two numeric values.

Parameters

a F32x4
The F32x4 instance used by this call (value receiver).
b F32x4
right operand (F32x4)

Returns

F32x4 — a value of this type

(F32x4) clamp

XuAPI
pub fn (a F32x4) clamp(lo f32, hi f32) F32x4

Purpose

Execute clamp on F32x4.

Parameters

a F32x4
The F32x4 instance used by this call (value receiver).
lo f32
lo (f32)
hi f32
hi (f32)

Returns

F32x4 — a value of this type

(F32x4) hsum

XuAPI
pub fn (a F32x4) hsum() f32

Purpose

Execute hsum on F32x4.

Parameters

a F32x4
The F32x4 instance used by this call (value receiver).

Returns

f32 — a value of this type

struct F64x2

XuAPI
pub struct F64x2 {
    pub v [2]f64
}

Purpose

Structure encapsulating v.

Public fields

v [2]f64
value

f64x2_zero

XuAPI
pub fn f64x2_zero() F64x2

Purpose

F64x2 zero.

Parameters

No arguments are required.

Returns

F64x2 — a value of this type

f64x2_splat

XuAPI
pub fn f64x2_splat(val f64) F64x2

Purpose

F64x2 splat.

Parameters

val f64
value (f64)

Returns

F64x2 — a value of this type

f64x2_load

XuAPI
pub fn f64x2_load(src &[]f64, off int) F64x2

Purpose

F64x2 load. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &[]f64
source (read-only borrow; caller keeps the original; type &[]f64)
off int
offset (int)

Returns

F64x2 — a value of this type

f64x2_store

XuAPI
pub fn f64x2_store(dst $&[]f64, off int, a F64x2) int

Purpose

F64x2 store. Throws on failure; handle the error or propagate it to the caller.

Parameters

dst $&[]f64
destination (exclusive borrow; may modify the original; type $&[]f64)
off int
offset (int)
a F64x2
value (F64x2)

Returns

int — a value of this type

(F64x2) store

XuAPI
pub fn (a F64x2) store(dst $&[]f64, off int) int

Purpose

Execute store on F64x2. Throws on failure; handle the error or propagate it to the caller.

Parameters

a F64x2
The F64x2 instance used by this call (value receiver).
dst $&[]f64
destination (exclusive borrow; may modify the original; type $&[]f64)
off int
offset (int)

Returns

int — a value of this type

(F64x2) add

XuAPI
pub fn (a F64x2) add(b F64x2) F64x2

Purpose

Operation on F64x2: add.

Parameters

a F64x2
The F64x2 instance used by this call (value receiver).
b F64x2
right operand (F64x2)

Returns

F64x2 — a value of this type

(F64x2) sub

XuAPI
pub fn (a F64x2) sub(b F64x2) F64x2

Purpose

Operation on F64x2: subtract.

Parameters

a F64x2
The F64x2 instance used by this call (value receiver).
b F64x2
right operand (F64x2)

Returns

F64x2 — a value of this type

(F64x2) mul

XuAPI
pub fn (a F64x2) mul(b F64x2) F64x2

Purpose

Operation on F64x2: multiply.

Parameters

a F64x2
The F64x2 instance used by this call (value receiver).
b F64x2
right operand (F64x2)

Returns

F64x2 — a value of this type

(F64x2) div

XuAPI
pub fn (a F64x2) div(b F64x2) F64x2

Purpose

Operation on F64x2: divide.

Parameters

a F64x2
The F64x2 instance used by this call (value receiver).
b F64x2
right operand (F64x2)

Returns

F64x2 — a value of this type

(F64x2) fma

XuAPI
pub fn (a F64x2) fma(b F64x2, c F64x2) F64x2

Purpose

Operation on F64x2: compute fused multiply-add (x * y + z).

Parameters

a F64x2
The F64x2 instance used by this call (value receiver).
b F64x2
b (F64x2)
c F64x2
byte or character code (F64x2)

Returns

F64x2 — a value of this type

(F64x2) hsum

XuAPI
pub fn (a F64x2) hsum() f64

Purpose

Execute hsum on F64x2.

Parameters

a F64x2
The F64x2 instance used by this call (value receiver).

Returns

f64 — a value of this type

sad_u8

XuAPI
pub fn sad_u8(a &[]u8, b &[]u8, n int) int

Purpose

Sad u8. Throws on failure; handle the error or propagate it to the caller.

Parameters

a &[]u8
slice to operate on (read-only borrow; caller keeps the original; type &[]u8)
b &[]u8
slice to operate on (read-only borrow; caller keeps the original; type &[]u8)
n int
count, length, or limit (int)

Returns

int — a value of this type

ssd_u8

XuAPI
pub fn ssd_u8(a &[]u8, b &[]u8, n int) int

Purpose

Ssd u8. Throws on failure; handle the error or propagate it to the caller.

Parameters

a &[]u8
slice to operate on (read-only borrow; caller keeps the original; type &[]u8)
b &[]u8
slice to operate on (read-only borrow; caller keeps the original; type &[]u8)
n int
count, length, or limit (int)

Returns

int — a value of this type

mad_u8

XuAPI
pub fn mad_u8(a &[]u8, b &[]u8, n int) f64

Purpose

Mad u8. Throws on failure; handle the error or propagate it to the caller.

Parameters

a &[]u8
slice to operate on (read-only borrow; caller keeps the original; type &[]u8)
b &[]u8
slice to operate on (read-only borrow; caller keeps the original; type &[]u8)
n int
count, length, or limit (int)

Returns

f64 — a value of this type

psnr_u8

XuAPI
pub fn psnr_u8(a &[]u8, b &[]u8, n int) f64

Purpose

Psnr u8. Throws on failure; handle the error or propagate it to the caller.

Parameters

a &[]u8
slice to operate on (read-only borrow; caller keeps the original; type &[]u8)
b &[]u8
slice to operate on (read-only borrow; caller keeps the original; type &[]u8)
n int
count, length, or limit (int)

Returns

f64 — a value of this type

dot_f32

XuAPI
pub fn dot_f32(a &[]f32, b &[]f32, n int) f32

Purpose

Dot f32. Throws on failure; handle the error or propagate it to the caller.

Parameters

a &[]f32
slice to operate on (read-only borrow; caller keeps the original; type &[]f32)
b &[]f32
slice to operate on (read-only borrow; caller keeps the original; type &[]f32)
n int
count, length, or limit (int)

Returns

f32 — a value of this type

sum_sq_f32

XuAPI
pub fn sum_sq_f32(a &[]f32, n int) f32

Purpose

Digest sq f32. Throws on failure; handle the error or propagate it to the caller.

Parameters

a &[]f32
slice to operate on (read-only borrow; caller keeps the original; type &[]f32)
n int
count, length, or limit (int)

Returns

f32 — a value of this type

rms_f32

XuAPI
pub fn rms_f32(a &[]f32, n int) f64

Purpose

Rms f32. Throws on failure; handle the error or propagate it to the caller.

Parameters

a &[]f32
slice to operate on (read-only borrow; caller keeps the original; type &[]f32)
n int
count, length, or limit (int)

Returns

f64 — a value of this type

rgb24_to_rgba32

XuAPI
pub fn rgb24_to_rgba32(src &[]u8, dst $&[]u8, n_pixels int) int

Purpose

Rgb24 to rgba32. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &[]u8
source (read-only borrow; caller keeps the original; type &[]u8)
dst $&[]u8
destination (exclusive borrow; may modify the original; type $&[]u8)
n_pixels int
n_pixels (int)

Returns

int — a value of this type

rgba32_to_rgb24

XuAPI
pub fn rgba32_to_rgb24(src &[]u8, dst $&[]u8, n_pixels int) int

Purpose

Rgba32 to rgb24. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &[]u8
source (read-only borrow; caller keeps the original; type &[]u8)
dst $&[]u8
destination (exclusive borrow; may modify the original; type $&[]u8)
n_pixels int
n_pixels (int)

Returns

int — a value of this type

u8_to_f32_norm

XuAPI
pub fn u8_to_f32_norm(src &[]u8, dst $&[]f32, n int, scale f32, bias f32) int

Purpose

U8 to f32 norm. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &[]u8
source (read-only borrow; caller keeps the original; type &[]u8)
dst $&[]f32
destination (exclusive borrow; may modify the original; type $&[]f32)
n int
count, length, or limit (int)
scale f32
scale (f32)
bias f32
bias (f32)

Returns

int — a value of this type

lut_u8

XuAPI
pub fn lut_u8(src &[]u8, dst $&[]u8, lut &[]u8, n int) int

Purpose

Lut u8. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &[]u8
source (read-only borrow; caller keeps the original; type &[]u8)
dst $&[]u8
destination (exclusive borrow; may modify the original; type $&[]u8)
lut &[]u8
lut (read-only borrow; caller keeps the original; type &[]u8)
n int
count, length, or limit (int)

Returns

int — a value of this type

yuv420p_to_rgb24

XuAPI
pub fn yuv420p_to_rgb24(y &[]u8, u &[]u8, v &[]u8, rgb $&[]u8, width int, height int, y_stride int, uv_stride int) int

Purpose

Yuv420p to rgb24. Throws on failure; handle the error or propagate it to the caller.

Parameters

y &[]u8
value (read-only borrow; caller keeps the original; type &[]u8)
u &[]u8
u (read-only borrow; caller keeps the original; type &[]u8)
v &[]u8
value (read-only borrow; caller keeps the original; type &[]u8)
rgb $&[]u8
rgb (exclusive borrow; may modify the original; type $&[]u8)
width int
width (int)
height int
height (int)
y_stride int
y_stride (int)
uv_stride int
uv_stride (int)

Returns

int — a value of this type

nv12_to_rgb24

XuAPI
pub fn nv12_to_rgb24(y &[]u8, uv &[]u8, rgb $&[]u8, width int, height int, y_stride int, uv_stride int) int

Purpose

Nv12 to rgb24. Throws on failure; handle the error or propagate it to the caller.

Parameters

y &[]u8
value (read-only borrow; caller keeps the original; type &[]u8)
uv &[]u8
uv (read-only borrow; caller keeps the original; type &[]u8)
rgb $&[]u8
rgb (exclusive borrow; may modify the original; type $&[]u8)
width int
width (int)
height int
height (int)
y_stride int
y_stride (int)
uv_stride int
uv_stride (int)

Returns

int — a value of this type