In order to access the interface, an application loads the interface library using a platform dependent system call.
Then the application locates the address of the function nni_get_interface, again using a
platform dependent system call. Once the application has located the central function
nni_get_interface, it
requests an instance of the interface by calling the function nni_get_interface and specifying
the desired interface version. The resulting structure contains the interface function
pointers.
After having finished using the interface functions, the application unloads the interface library using a platform dependent system call.
The sample program nnisample.c demonstrates the interface. Also the
platform dependent mechanism of loading the interface library and the access to the function
nni_get_interface is
illustrated by this sample program.