Skip to content

Instantly share code, notes, and snippets.

@asus4
Created February 26, 2020 17:06
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 asus4/d9ff1224bd766d3941b5aec34c364396 to your computer and use it in GitHub Desktop.
Save asus4/d9ff1224bd766d3941b5aec34c364396 to your computer and use it in GitHub Desktop.
void Start()
{
// Option
var options = new Interpreter.Options()
{
// Multithread
threads = 2,
// Metal option
gpuDelegate = new MetalDelegate(new MetalDelegate.Options()
{
allowPrecisionLoss = false,
waitType = MetalDelegate.WaitType.Passive,
})
};
// The constractor with option
interpreter = new Interpreter(File.ReadAllBytes(path), options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment