Created
January 29, 2019 17:05
-
-
Save richlander/47a3e854c3114fd3012b8508b4935b47 to your computer and use it in GitHub Desktop.
Using Unsafe API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vector256<double> SoftwareFallback(double x) | |
{ | |
var pResult = stackalloc double[4] | |
{ | |
x, | |
x, | |
x, | |
x, | |
}; | |
return Unsafe.AsRef<Vector256<double>>(pResult); | |
} | |
// https://github.com/dotnet/coreclr/blob/57fd77e6f8f7f2c37cc5c3b36df3ea4f302e143b/src/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256.cs#L110 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment