Skip to content

Instantly share code, notes, and snippets.

@IJzerbaard
Created February 23, 2019 19:21
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 IJzerbaard/3bf870ad4469524ad77ee3df00ad21c9 to your computer and use it in GitHub Desktop.
Save IJzerbaard/3bf870ad4469524ad77ee3df00ad21c9 to your computer and use it in GitHub Desktop.
using System;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
namespace C3Test
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(test(128));
}
static unsafe Vector256<byte> test(byte v)
{
Vector256<byte> x = Avx2.BroadcastScalarToVector256(&v);
return x;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment