Skip to content

Update Load8 with GatherVector256 instruction for .NET Core 3 - #1200

Merged
adamsitnik merged 2 commits into
dotnet:masterfrom
helloguo:gather256
Oct 10, 2018
Merged

adamsitnik merged 2 commits into
dotnet:masterfrom
helloguo:gather256

Conversation

@helloguo

@helloguo helloguo commented Oct 9, 2018

Copy link
Copy Markdown

Update Load8 with GatherVector256 instruction for .NET Core 3. Fix #1195

Before the change:
before

After the change:
after

cc\ @adamsitnik @eerhardt

if (Avx2.IsSupported)
{
Vector256<int> idx256 = Avx.LoadVector256(idx);
return Avx2.GatherVector256(src, idx256, 4);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) I think it makes for more readable code if you name the parameter:

return Avx2.GatherVector256(src, idx256, scale: 4);

@eerhardt eerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @helloguo !

@adamsitnik adamsitnik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@adamsitnik
adamsitnik merged commit c4f3f10 into dotnet:master Oct 10, 2018
@adamsitnik

Copy link
Copy Markdown
Member

@helloguo thank was quick! big thanks for doing this!

do you have any ideas for improving the perf of AddScaleSU for pre-AVX2 hardware?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants