Skip to content

SIMD for Silk.NET.Math #3 #684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 14, 2021

Conversation

WhiteBlackGoose
Copy link
Contributor

@WhiteBlackGoose WhiteBlackGoose commented Nov 10, 2021

Summary of the PR

Working on #666

Tasks

  • IsFinite
  • IsInfinity
  • IsNaN
  • IsNegative
  • IsNegativeInfinity
  • IsNormal
  • IsPositiveInfinity
  • Sign

Tests

  • IsFinite
  • IsInfinity
  • IsNaN
  • IsNegative
  • IsNegativeInfinity
  • IsNormal
  • IsPositiveInfinity
  • Sign

Benchmarks

State of number

  • IsFinite
  • IsInfinity
  • IsNaN
  • IsNegative
  • IsNegativeInfinity
  • IsNormal
  • IsPositiveInfinity
  • Sign

Other

  • Bitwise arithmetics
  • Abs

Comment on lines -363 to +365
if (typeof(T) == typeof(int))
if (typeof(T) == typeof(sbyte))
{
return (int) (object) f < 0;
return (sbyte) (object) f < 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A bug from scalar

Copy link
Contributor Author

@WhiteBlackGoose WhiteBlackGoose left a comment

Choose a reason for hiding this comment

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

There turns out a few bugs in scalar 🦆

@@ -476,7 +487,13 @@ static bool Float(T f)
{
if (typeof(T) == typeof(float))
{
return IsNormal((float) (object) f);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A bug from scalar

@@ -487,7 +504,13 @@ static bool Double(T f)
{
if (typeof(T) == typeof(double))
{
return IsNormal((double) (object) f);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

and another bug from scalar

@WhiteBlackGoose WhiteBlackGoose marked this pull request as ready for review November 10, 2021 16:22
@HurricanKai HurricanKai self-requested a review November 10, 2021 16:29
@WhiteBlackGoose
Copy link
Contributor Author

Benchmark reports

Silk.NET.Maths.Benchmark.SimdBenchmarks-asm.md
Silk.NET.Maths.Benchmark.SimdBenchmarks-report-github.md

Some methods are not inlined. Investigating...

@HurricanKai HurricanKai merged commit 4d1070a into dotnet:feature/math-simd Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants