Handbook
Glossary
(vdot4+) ( a b accumulator -- result )
Vocabulary
math
.
vectors
.
simd
.
extensions
Inputs
a
an
object
b
an
object
accumulator
an
object
Outputs
result
an
object
Definition
USING:
system
;
IN:
math.vectors.simd.extensions
HOOK:
(vdot4+)
cpu
( a b accumulator -- result )
Methods
USING:
cpu.arm.64.features
generic
kernel
math.vectors.simd
math.vectors.simd.extensions
math.vectors.simd.extensions.arm.64.private
system
;
M::
arm.64
(vdot4+)
( a b c -- result )
a
uchar-16?
b
uchar-16?
and
[
\
udot4
arm64-kernel-supported?
[
a b c
udot4
]
[
a b c
M\
arm.64
(vdot4+)
(call-next-method)
]
if
]
[
a
char-16?
b
char-16?
and
[
\
sdot4
arm64-kernel-supported?
[
a b c
sdot4
]
[
a b c
M\
arm.64
(vdot4+)
(call-next-method)
]
if
]
[
\
usdot4
arm64-kernel-supported?
[
a
uchar-16?
[
a b c
]
[
b a c
]
if
usdot4
]
[
a b c
M\
arm.64
(vdot4+)
(call-next-method)
]
if
]
if
]
if
;
USING:
kernel
math
math.vectors.simd.extensions
sequences
;
M::
object
(vdot4+)
( a b accumulator -- result )
4
<iota>
[|
lane |
lane accumulator
nth
4
<iota>
swap
[|
value j |
lane 4
*
j
+
:>
index index a
nth
index b
nth
*
value
+
]
reduce
]
accumulator
map-as
;