Handbook
Glossary
(vbmatmul2x4+) ( 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:
(vbmatmul2x4+)
cpu
( a b accumulator -- result )
Methods
USING:
cpu.arm.64.features
generic
kernel
math.vectors.simd.extensions
math.vectors.simd.extensions.arm.64.private
system
;
M:
arm.64
(vbmatmul2x4+)
\
bmatmul
arm64-kernel-supported?
[
bmatmul
]
[
M\
arm.64
(vbmatmul2x4+)
(call-next-method)
]
if
;
USING:
kernel
math
math.floats.small.bfloat
math.vectors.simd
math.vectors.simd.extensions
sequences
;
M::
object
(vbmatmul2x4+)
( a b accumulator -- result )
4
<iota>
[|
lane |
lane 2
/i
4
*
:>
row lane 2
mod
4
*
:>
column lane accumulator
nth
row a
nth
row 1
+
a
nth
column b
nth
column 1
+
b
nth
bfloat-dot-add
row 2
+
a
nth
row 3
+
a
nth
column 2
+
b
nth
column 3
+
b
nth
bfloat-dot-add
]
float-4
new
map-as
;