Handbook
Glossary
half-binary ( a b op -- result )
Vocabulary
math
.
vectors
.
simd
.
extensions
Inputs
a
an
object
b
an
object
op
an
object
Outputs
result
an
object
Definition
USING:
system
;
IN:
math.vectors.simd.extensions
HOOK:
half-binary
cpu
( a b op -- result )
Methods
USING:
combinators
cpu.arm.64.features
generic
kernel
math.vectors.simd
math.vectors.simd.extensions
math.vectors.simd.extensions.arm.64.private
system
;
M::
arm.64
half-binary
( a b op -- result )
"fp16"
arm64-feature?
a
half-8?
and
b
half-8?
and
[
a b op
{
{
"+"
[
hadd
]
}
{
"-"
[
hsub
]
}
{
"*"
[
hmul
]
}
{
"/"
[
hdiv
]
}
{
"min"
[
hmin
]
}
{
"max"
[
hmax
]
}
{
"="
[
heq
]
}
{
"<"
[
hlt
]
}
{
"<="
[
hle
]
}
{
">"
[
hgt
]
}
{
">="
[
hge
]
}
{
"unordered"
[
hunordered
]
}
}
case
]
[
a b op
M\
arm.64
half-binary
(call-next-method)
]
if
;
USING:
combinators
kernel
math
math.vectors.simd
math.vectors.simd.extensions
math.vectors.simd.intrinsics.private
sequences
;
M::
object
half-binary
( a b op -- result )
a b op
{
{
"+"
[
[
+
]
2map
]
}
{
"-"
[
[
-
]
2map
]
}
{
"*"
[
[
*
]
2map
]
}
{
"/"
[
[
/f
]
2map
]
}
{
"min"
[
[
min-vector-lane
]
2map
]
}
{
"max"
[
[
max-vector-lane
]
2map
]
}
{
"="
[
[
=
-1 0
?
]
ushort-8
new
2map-as
half-8-cast
]
}
{
"<"
[
[
<
-1 0
?
]
ushort-8
new
2map-as
half-8-cast
]
}
{
"<="
[
[
<=
-1 0
?
]
ushort-8
new
2map-as
half-8-cast
]
}
{
">"
[
[
>
-1 0
?
]
ushort-8
new
2map-as
half-8-cast
]
}
{
">="
[
[
>=
-1 0
?
]
ushort-8
new
2map-as
half-8-cast
]
}
{
"unordered"
[
[
unordered?
-1 0
?
]
ushort-8
new
2map-as
half-8-cast
]
}
}
case
;