Handbook
Glossary
vmul-wide ( a b -- lo hi )
Vocabulary
math
.
vectors
Inputs
a
a
sequence
b
a
sequence
Outputs
lo
a
sequence
hi
a
sequence
Word description
Multiplies matching 8-, 16-, or 32-bit integer SIMD vectors exactly into lanes of twice the width and the same signedness. Returns the lower input lanes first, then the upper input lanes.
Definition
IN:
math.vectors
GENERIC:
vmul-wide
( a b -- lo hi )
Methods
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
char-16
vmul-wide
( a b -- lo hi )
a
char-16?
[
a
underlying>>
b
underlying>>
char-16-rep
(simd-mul-wide-head)
short-8
boa
a
underlying>>
b
underlying>>
char-16-rep
(simd-mul-wide-tail)
short-8
boa
]
[
a
bad-simd-vector
]
if
;
inline
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
int-4
vmul-wide
( a b -- lo hi )
a
int-4?
[
a
underlying>>
b
underlying>>
int-4-rep
(simd-mul-wide-head)
longlong-2
boa
a
underlying>>
b
underlying>>
int-4-rep
(simd-mul-wide-tail)
longlong-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
vmul-wide
( a b -- lo hi )
a
short-8?
[
a
underlying>>
b
underlying>>
short-8-rep
(simd-mul-wide-head)
int-4
boa
a
underlying>>
b
underlying>>
short-8-rep
(simd-mul-wide-tail)
int-4
boa
]
[
a
bad-simd-vector
]
if
;
inline
USING:
kernel
math.vectors
math.vectors.simd
;
M:
simd-128
vmul-wide
drop
bad-simd-vector
;
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
uchar-16
vmul-wide
( a b -- lo hi )
a
uchar-16?
[
a
underlying>>
b
underlying>>
uchar-16-rep
(simd-mul-wide-head)
ushort-8
boa
a
underlying>>
b
underlying>>
uchar-16-rep
(simd-mul-wide-tail)
ushort-8
boa
]
[
a
bad-simd-vector
]
if
;
inline
USING:
accessors
cpu.architecture
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
;
M::
uint-4
vmul-wide
( a b -- lo hi )
a
uint-4?
[
a
underlying>>
b
underlying>>
uint-4-rep
(simd-mul-wide-head)
ulonglong-2
boa
a
underlying>>
b
underlying>>
uint-4-rep
(simd-mul-wide-tail)
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
vmul-wide
( a b -- lo hi )
a
ushort-8?
[
a
underlying>>
b
underlying>>
ushort-8-rep
(simd-mul-wide-head)
uint-4
boa
a
underlying>>
b
underlying>>
ushort-8-rep
(simd-mul-wide-tail)
uint-4
boa
]
[
a
bad-simd-vector
]
if
;
inline