Skip to content

Version 4.1

Latest
Compare
Choose a tag to compare
@HyperSphereStudio HyperSphereStudio released this 06 Jan 02:36
8211f03
//Native Pointer of Specialized Methods. (FASTEST) This is unsafe so you should periodically check for exceptions
    var f = Julia.Eval(@"add(a, b) = a + b");   //Gets the julia function pointer add
    
    public delegate int Add(int a, int b); /*Declared somewhere*/
    
    Add add = f.GetDelegate<Add>();             //Compile f to a sharp function pointer Add
    var aAdd = f.GetDelegate<int, int, int>();  //Compile f to a sharp anonymous function pointer. Does not require a declared delegate
    
    int answer = add(3, 4);
    int answer2 = aAdd(4, 5);
   Julia.CheckExceptions();

Array Improvement
GC Fix