►
From YouTube: .NET Design Reviews: Intel Hardware Intrinsics
Description
We’ll do another pass on Intel’s proposal for HW intrinsics.
https://github.com/dotnet/corefx/issues/32721
B
B
You
have
to
tell
you
I,
think
yeah.
Just
three
topics
we
need
is
yourself
today:
yeah
the
first
one
is
written
to
you
that
yeah
we
needed
to
D
stated
that
needs
to
the
class
named
after
64-bits
online
entry
things
right
now.
We
call
it
X
64
yeah,
and
then
you
can
see
some
interesting
in
a
car's
name:
the
x86
tall,
sse2,
dou
X
and
dou
X
64.
That
means
ok.
B
C
B
D
C
E
C
C
C
E
E
C
A
C
A
Well,
let's
say
that's
it:
what
I'm
concerned
about
like
these
kind
of
established
patterns
here
right
so
like
an
egg
meal
I
think
even
if
this
particular
aspect
does
inherit
egg
eventually
be,
may
find
that
we
want
to
be
able
to
do
that
right.
And
so,
if
we
have
a
pattern,
if
we
say
X,
64
specialized
instructions
are
nested
time,
then
you
want
to
pop
into
it
in
other
places
as
well
as
we.
C
E
G
C
A
A
C
F
C
G
A
A
C
B
A
C
So
when
I
went
to
do
that
for
the
Constructors,
specifically
I
decided
to
put
these
into
a
static
class.
That
is
non-generic.
So
this
is
a
similar
pattern
to
what
we
did
with
system
collections,
immutable
yep,
just
to
avoid
the
confusion
of
well.
What
happens
if
you
say
vectors,
sixty
forty
for
a
fight
and
then
you
call
the
constructor
that
takes
four
ins
right.
C
C
C
C
When
you're
dealing
with
only
the
first
element
of
the
vector
of
the
scaler
there's,
an
open
question
with
a
corresponding
API
proposal,
which
says
for
create
scalars,
are
a
number
of
performance
situations
where
you
want
to
leave
the
upper
bits
uninitialized
and
what
should
we
call
the
method
that
does
that?
My
original
proposal,
which
is
a
3
2
8
3
4,
suggests
that
we
call
these
unsafe,
great
scaler
yon
commented
in
and
said
he
did
not
like
the
term
unsafe,
because
it's
a
bit
overloaded
and
there
was
a
bunch
of
back-and-forth
there.
C
I
think
Morgan,
Brown
and
Levi
discussed
a
bunch
a
little
bit
about
this,
and
it's
still
potentially
unsafe
from
the
perspective
of
the
upper
bits,
could
have
any
value
and
attempting
to
access
that
could
expose
data
from
a
previous
method
call
that
was
still
in
the
register.
So
it
could
expose
data
you
wouldn't
want
exposed.
Otherwise,
but
basically
these
suggestions
were
crate.
Scalar,
unsafe,
crate,
scalar,
knowing
it
and
I
think
a
couple
of
things
were
passed
on,
but
we
need
determine
so.
A
C
We
would
have
both
yeah,
you
may
want
both
yeah,
you
would
want.
You
would
want
crate,
crate
scalar
so
that
you
can
say
I
explicitly
want
the
permit
zero,
and
you
would
also
want
crate
scaler
unsafe,
which
says:
leave
the
upper
bits
uninitialized
for
performance
reasons.
A
My
parents
would
say
honestly
because
I
mean
I
get
where
we
go
in
with
the
uninitialized,
but
like
I,
don't
think
that's
don't
even
want,
because
we
have
two
conflicting
technologies
and
I
think
I
like
unsafe,
because
it's
basically
means
read
the
docs
right,
and
so
you
can
make
whatever
caveat
you
want
to
express
you
just
take.
Well
the
kid
the
caveat
is
actually
in
the
dogs.
It's
just
that
this
is.
The
API
is
only
good
what
they
really
know.
What
they're
doing
yeah.
E
E
A
May
experience
absolutely
unintended
behavior
like
I
mean
if
you
don't
flow
execution
context
on
court.
That's
not
unsafe
right
like
because
there's
no
Kazakh
or
it's
just
like
well
bad
things
might
happen,
and
you
may
not
want
that
right
or
oh
yeah.
You
can't
contra
in
the
memory
and
you
may
be
right,
I
mean
they're.
All
I
I
mean
this
one
I
would
say
it's
honestly
actually
in
the
unsafe
territory
and
the
traditional
sense
I
think
you
have
uninitialized
layers
of
the
stack
like
I
mean
absolutely
bad.
A
A
A
Talked
about
this
at
the
C
sharp
to
him
and
like
they,
they
don't
seem
to
be
very
care
to
do
that.
I
think
they
they
have
some
concerns
around
like
you
know
what
you
know,
what
doesn't
it
mean
for
the
language
and
whether
that
makes
sense
or
not
I
mean
quite
frankly,
it
doesn't
have
to
be
this
way
or
we
couldn't
like
it.
You
know
also
have
just
an
analyzer,
they
won't
ever
flag
those
and
then
maybe
you
suppress
them
with
being
in
an
unsafe
context.
A
A
A
A
To
methods
such
as
that
also
the
fact
that
it
doesn't
really
mean-
even
if
you
say,
I'll,
initialize,
:,
true
or
uninitialized
:
false
right
I
mean
neither
of
them
really
convey
the
idea
of
like
oh.
This
is
something
you
only
really
want
to
review,
because
that's
that
might
be
unsafe,
but
if
you
just
call
a
method
called
create
an
to
create
scalar
unsafe,
it's
a
bit
more
attention-seeking
right.
C
For
the
crate
methods,
the
other
change
that
I
made
as
part
of
the
PR,
the
existing
set
vector
methods
that
we
have
take
the
parameters
in
reverse
order,
so
starting
with
e
15,
for
example,
and
then
going
down
to
e
0.
This
matches
the
native
intrinsics
for
x86
I
change
that
to
be
normal
ordering,
because
that
I
think
that
makes
more
sense
for
a
shared
help.
Intrinsic.
That
also
applies
to
other
platforms.
E
C
C
C
For
the
concept
of
extend,
which
is
taking
a
vector
64
in
turning
into
a
vector
128,
there
was
some
discussion
on
whether
we
should
expose
it
as
a
create
method.
Here,
so
I've
got
the
create
lower
upper
and
the
crate
scalar
or
exposing
it
as
an
instance,
method
called
like
extend
to
128
or
something.
C
B
E
C
C
E
A
A
A
C
A
So
we
can
either
say:
go
figure
out
the
design
of
this
one.
Let
go
one
way
or
the
other,
but
we
can
make
call
here
like
do
we
do
we
feel
like
we
can't
make
a
call
here.
They
want
to
go
back
to
the
drawing
board
and
think
about
this.
A
bit
more
I
think.
C
So
so
for
for
creating
a
vector
128
from
264
bit
vectors
or
for
creating
a
2
v,
vector
256
from
2
vector
128,
we
should
have
a
create
that
takes
lower
and
upper
and
then
for
the
case,
where
we're
0
extending
we
should
have
a
a
2
or
either
an
extend
2
or
a
2,
vector
128
method
on
vector,
64,
I.
Think.
D
G
C
A
A
C
A
That's
a
good
plan.
We
should
probably
call
it
to
them.
We
should
probably
call
it
as
because
Kim
was
always
this
expensive
operation
kind
of
thing
and
answers.
Always
this
interpret
the
already
existing
bits.
Image
in
you
would
expect
those
to
be
cheap
operation.
I.
Don't
expect
this
to
be
super
expensive.
B
E
C
E
C
B
But
there
is
a
problem
that
if
we
use
unsafe
and
the
cogent
is
rely
on
the
optimization
of
JIT
compiler,
especially
the
inlining,
but
we
have
defeated.
That's
all
the
heroin
trees
and
have
no
cogent
difference
between
here,
zero
or
higher
up
here.
So
that
will
get
some
job,
always
okay,
your
program
from
zero,
zero
that
the
unsafe
as
well
generates
a
function
call
and
some
redundant.
G
E
So
say
that
you're
calling
index
hub,
for
instance-
and
we
know
that
the
incoming
T
is
int
char
byte.
As
might
something
like
that
right.
What
we
do
is
under
the
covers.
We
turn
it
all
into
bytes.
We
turn
it
all
into
a
bachelor
by
hand,
and
then
we
do
our
our
search
operation
and
then
we
need
to
take
that
vector
a
bite
and
then
convert
it
back
to
the
original
vector
of
T.
E
C
E
C
A
A
A
And
their
kids
I
think
having
a
generic
conversion
seems
fine,
I
think
the
last
time.
Let
me
talked
about
this.
The
question
was
just:
do
we
want
to
allow
people
to
write
generic
code
and
I
think
the
answer
was
generally
no,
but
but
you
just
an
artist,
not
right.
Engineering
Co,
ideal
code
is
to
just
say:
I
started
with
a
vector
of
char
and
I
want
to
go
to
a
vector
of
wine.
I'm
gonna
go
back
to
a
vector
of
char,
but
I.
E
A
A
B
B
A
G
A
A
When
you
guys
have
here
all
right,
like
it's
really
like
really
well
in
excess
air
power
properties
they
only
about
if
it's
a
no
one
operation
right,
you
don't
want
to
have
an
Owen
or
other
crazy
stuff,
but
like
expensive
is
you
know
the
outer
beholder,
but
I
mean
computing,
a
memory
address
and
writing
into
it.
I
mean
that
should
be
in
the
realm
of
what
we
consider
cheap
right.
Okay,
something.
E
That
we
may
want
to
do
as
documentation
here
is
like
looking
at
house
name
32,
for
instance,
because
this
is
a
reinterpret
cast
rather
than
an
actual
conversion
like
if
you
have
a
vector
128
of
floats,
and
you
call
as
into
32
like
we
should
document
this
isn't
going
around
like
it's
actually
going
to
give
you.
The
mains
gets
that
worker
float.
C
C
Think,
having
a
once,
we
had
the
jet
support
for
optimizing
constructors
that
take
all
constant
values.
Then
having
a
public
static,
read-only
vector,
you
know,
256
true
equals
static
cast
from
you
know,
create
you
int
128
or
whatever
it's
going
to
be
super
cheap.
The
JIT
will
optimize
at
all
and
it
won't
be
a
concern.
I,
don't
think
we
should
be
exposing
values
we
think
might
be
common
other
than
zero
and
less
people
explicitly.
After
all,
that's.
A
A
E
A
E
A
B
B
But
there
are
some
overlap
there
that
skin
exposure
that
can
have
different
somatic
in
different
environments,
so
we
exploded
them
to
three
types
yeah
and
we
named
this
values
to
as
close
as
possible
to
the
the
past
pacified.
Without
luck
here
is
a
example
just
now
yeah,
so
I
think
for
the
flat
insider
yeah.
We
already
found
butter
for
the
intrinsic
in
name
yeah.
There
are
some
feedback
yeah,
for
example,
the
the
state
+1
slider.
We
directly
use
some
flux
name
in
the
intrinsic
name.
B
However,
here
the
flux,
for
example,
the
state
flag,
Oh
blog
as
flock
that
in
normal
instructions,
for
example,
to
say,
means
--carrie
and
all
means
overflowed,
but
in
this
enchanting
and
it
is
instruction,
it
means
total
different
things.
So
we
decided
to
include
a
somatic
referring
to
that
right.
Yeah
functioning,
for
example,
that
yeah
here
we
yeah
for
example.
Here
we
rename
the
state
flock
to
compare
pass
match,
has
an
edge
yeah
and
the
knots
a
flood
name,
the
to
compare
no
match
yeah.
B
C
B
A
A
I
think
like
at
some
point
the
questions
like
how
else
we
want
to
go
to
be
right,
like
I
mean
if
it's
already
like
like
a
thing,
I
agree
with
for
creators
here
is
that
I
mean
I
like
API
calls
where
you
can
read
the
code,
make
sense
of
it,
but
at
the
same
time
the
question
is:
does
it
add
value
right
like
if
I
still
cannot
reason
about
it?
But
now
I
have
to
write
like
a
hundred
ex
of
what
I'm?
A
E
A
I
mean
hopefully,
our
own
dog
people
when
we
document
the
heart
for
intrinsics
will
do
a
good
enough
job
that
I
may
just
get
away
with
hitting
f1
like.
If
that's
not
enough,
then
that's
sad
but
then
again
like
if
yeah.
If
you
have
to
read
the
introduction-
and
the
other
question
is
like
do
I
have
enough
like.
Are
these
the
right
keywords
that
have
be
very
likely
to
find
something
in
your
dog's?
The
answer
is:
no,
then
we're
actually
doing
a
disservice
by
making
it
like.
E
C
C
A
I'm
not
advocating
for
I'm
not
going
to
school
I
am
on
the
28th
right.
I
would
say
at
some
point
like
it's
okay
to
say,
though,
that
is
different
naming
conventions
too
long,
as
it's
somewhat
mechanical
translation
to
the
other,
but
like
once,
you
start
running
out
of
english
word
to
describe
operation
like
it
I
think
it's
like
wow.
It's.
E
A
E
C
A
A
E
A
You
know
I
mean
I,
mean
I,
think
our
feedback
was
the
game.
He
looked
at
the
API
for
like
ten
seconds
and
they
said.
Oh,
this
looks
complicated.
It
can
be
simplified,
that's
right,
but
then,
if
the
entries
are
this
more
complicated
them?
Yes,
it's
like
going
the
wrong
direction
right,
but
yeah.
We
have
some
ideas
like
this.
That's
like
yeah
I'm,.
G
Not
a
hundred
percent
sure
I'm
on
board
I
guess
with
this
plan
like
it,
it
just
feels
like
it's
such
an
implementation,
detail
of
the
processor.
Then
it
uses
the
carry
flag
in
the
zero
flag
and
the
sign
flag
right
and
then
to
keep
propagating
that
implementation
detail
all
the
way
up.
Just
it
doesn't
seem
I
guess
that's.
It
doesn't.
A
I
mean
I
would
say,
I'm
not
sure,
I'm
a
hundred
percent
disagreeing
of
you.
At
the
same
time,
though
I'm
not
sure
I
agree
hundred
percent,
because
if
you
think
of
hardw
intrinsics
I
mean
they're
not
in
the
abstraction
over
the
processor
right,
they're,
literally
giving
you
the
instruction
like
access
to
the
instructions,
but
still
preserving
the
fact
that
you
pass
pages,
you
don't
have
to
write
the
register
locator
in
your
head
right
so
that
that's
fundamentally,
what
is
api's
are
doing
right.
Yeah.
G
Trying
to
give
you
like
20
minutes,
we
just
spent
on
the
other
section,
was
like
explicitly
going
away
from
how
the
C
API
a
lot
right.
If
I'm
looking
for
rosette
scaler,
it's
like
well,
no
I
got
a
go,
call
create
on
the
thing
right,
which
is
a
completely
different
verb
and
think
I
have
to
make
that
mental
mapping
anyways
and
a
bunch
of
these.
Those.
A
Are
so
like
those
ones,
I
would
say
are
different
because
they
just
help
us
but
they're,
not
actually
in
Twinings
but
they're,
not
giving
you
anything
from
the
processor.
It's
just
or
whatever
data
hole
that
you
have
I
mean.
That's
the
API
servers
there
right.
So
that's
why
I
think
of
them
more
thing.
I'm,
just
listening.
G
G
C
G
H
H
G
Another
person
coming
in
trying
to
read
it
also
write
the
next
person
who
wants
to
come
in
and
read
it
and
figure
out
what
does
carry
flag
mean
so
yeah,
maybe
I
missed
the
part
about
two
for
two
or
the
for
one
test
stuff
like
if
that's
really
what
it's
doing
then
calling
it
to
carry
plague
or
the
see
flag
or
whatever
totally
makes
sense,
but
in
this
case
with
the
strings,
it's
like.
We
are
using
this
flag
to
mean
this
completely
other
thing:
yeah.
That's.
A
Mean
maybe
begin
you
said
before
the
names
a
bit
better
like,
if
you
mean,
if
your
suggestions
for
how
to
rename
them,
if
they
think
the
bigger
problem
here
is
not
so
much.
The
naming
themselves
is
just
the
fact
that
it's
very
verbose
and
it
does
not
make
it
easier
to
understand.
Maybe
it's
just
a
function
of
what
getting
better
names
here.
Most.