Handbook
Glossary
vdot ( u v -- x )
Factor handbook
»
The language
»
Numbers
»
Vector operations
»
Vector arithmetic
Prev:
vs* ( u v -- w )
Next:
norm-sq ( v -- x )
Vocabulary
math
.
vectors
Inputs
u
a
sequence
of
real
s
v
a
sequence
of
real
s
Outputs
x
a
real
Word description
Computes the dot product of two vectors.
See also
2reduce
Definition
IN:
math.vectors
GENERIC:
vdot
( u v -- x )
Methods
USING:
generic
math
math.vectors
sequences.cords
;
M:
cord
vdot
[
vdot
]
[
+
]
[
M\
cord
vdot
(call-next-method)
]
cord-2both
;
inline
USING:
kernel
math
math.vectors
sequences
;
M:
object
vdot
[
*
]
[
+
]
2map-reduce
;
inline
USING:
generic
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
math.vectors.simd.private
;
M:
simd-128
vdot
dup
simd-rep
[
(simd-vdot)
]
[
M\
simd-128
vdot
(call-next-method)
]
vv->x-op
;
inline