Home

m128d

m128d is a 128‑bit vector data type used in x86 SIMD programming, primarily with the SSE2 instruction set. It is designed to hold two double-precision floating-point values, enabling parallel operations on two doubles in a single instruction.

In practice, the 128 bits are interpreted as two 64‑bit lanes, each storing one double. The type

Common operations on m128d include arithmetic, comparisons, and data movement. Typical intrinsics cover addition, subtraction, multiplication,

Availability and requirements: m128d relies on SSE2 support, which is available on most modern x86 CPUs. Compiler

is
commonly
exposed
in
C/C++
headers
as
__m128d
(the
canonical
SSE2
intrinsic
type),
though
some
documentation
or
bindings
may
refer
to
it
as
m128d.
Access
to
this
type
and
its
operations
is
typically
provided
via
intrinsics
defined
in
headers
such
as
emmintrin.h
or
immintrin.h,
depending
on
the
compiler.
and
division
of
corresponding
lanes,
for
example
_mm_add_pd,
_mm_sub_pd,
_mm_mul_pd,
and
_mm_div_pd.
Memory
access
intrinsics
allow
loading
and
storing
two
doubles
from
memory,
such
as
_mm_load_pd
and
_mm_store_pd,
or
broadcasting
a
scalar
to
both
lanes
with
_mm_set1_pd.
Alignment
plays
a
role:
aligned
loads/stores
require
16-byte
alignment,
while
unaligned
variants
like
_mm_loadu_pd
enable
safe
use
with
unaligned
memory.
support
requires
enabling
SSE2
features
(for
example,
-msse2
in
GCC/Clang
or
/arch:SSE2
in
MSVC).
The
actual
name
and
headers
may
vary
by
compiler,
but
the
underlying
concept
remains
a
128-bit
vector
containing
two
doubles
for
parallel
numeric
computation.