Skip to content

Instantly share code, notes, and snippets.

@richlander
Created January 29, 2019 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richlander/a8d2ccae8abee2ee69ebd9af52511611 to your computer and use it in GitHub Desktop.
Save richlander/a8d2ccae8abee2ee69ebd9af52511611 to your computer and use it in GitHub Desktop.
Taking a pointer to an unmanaged constructed type
Vector256<double> SoftwareFallback(double x)
{
var pResult = stackalloc double[4]
{
x,
x,
x,
x,
};
return *(Vector256<double>*)(pResult);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment