Handbook
Glossary
vabsdiff ( a b -- w )
Vocabulary
math
.
vectors
Inputs
a
a
sequence
b
a
sequence
Outputs
w
a
sequence
Word description
Returns the absolute differences of matching integer SIMD lanes as an unsigned vector of the same lane width. Signed extrema therefore remain representable.
Definition
IN:
math.vectors
GENERIC:
vabsdiff
( a b -- w )
Methods
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
char-16
vabsdiff
( a b -- w )
a
char-16?
[
a
underlying>>
b
underlying>>
"absdiff"
char-16-rep
(simd-binary)
uchar-16
boa
]
[
a
bad-simd-vector
]
if
;
inline
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
int-4
vabsdiff
( a b -- w )
a
int-4?
[
a
underlying>>
b
underlying>>
"absdiff"
int-4-rep
(simd-binary)
uint-4
boa
]
[
a
bad-simd-vector
]
if
;
inline
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
longlong-2
vabsdiff
( a b -- w )
a
longlong-2?
[
a
underlying>>
b
underlying>>
"absdiff"
longlong-2-rep
(simd-binary)
ulonglong-2
boa
]
[
a
bad-simd-vector
]
if
;
inline
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
short-8
vabsdiff
( a b -- w )
a
short-8?
[
a
underlying>>
b
underlying>>
"absdiff"
short-8-rep
(simd-binary)
ushort-8
boa
]
[
a
bad-simd-vector
]
if
;
inline
USING:
kernel
math.vectors
math.vectors.simd
;
M:
simd-128
vabsdiff
drop
bad-simd-vector
;
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
uchar-16
vabsdiff
( a b -- w )
a
uchar-16?
[
a
underlying>>
b
underlying>>
"absdiff"
uchar-16-rep
(simd-binary)
uchar-16
boa
]
[
a
bad-simd-vector
]
if
;
inline
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
uint-4
vabsdiff
( a b -- w )
a
uint-4?
[
a
underlying>>
b
underlying>>
"absdiff"
uint-4-rep
(simd-binary)
uint-4
boa
]
[
a
bad-simd-vector
]
if
;
inline
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
ulonglong-2
vabsdiff
( a b -- w )
a
ulonglong-2?
[
a
underlying>>
b
underlying>>
"absdiff"
ulonglong-2-rep
(simd-binary)
ulonglong-2
boa
]
[
a
bad-simd-vector
]
if
;
inline
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
ushort-8
vabsdiff
( a b -- w )
a
ushort-8?
[
a
underlying>>
b
underlying>>
"absdiff"
ushort-8-rep
(simd-binary)
ushort-8
boa
]
[
a
bad-simd-vector
]
if
;
inline