Skip to content

Instantly share code, notes, and snippets.

@chrisseaton
Created April 24, 2018 22:24
Show Gist options
  • Select an option

  • Save chrisseaton/c05dfba7b98d8140fbf5864cf69abda7 to your computer and use it in GitHub Desktop.

Select an option

Save chrisseaton/c05dfba7b98d8140fbf5864cf69abda7 to your computer and use it in GitHub Desktop.
...
import org.graalvm.nativeimage.IsolateThread;
import org.graalvm.nativeimage.c.function.CEntryPoint;
public class Distance {
...
@CEntryPoint(name = "distance")
public static double distance(IsolateThread thread,
double a_lat, double a_long,
double b_lat, double b_long) {
return DistanceUtils.getHaversineDistance(a_lat, a_long, b_lat, b_long);
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment