Metal.Library
Represents a compiled Metal library containing one or more functions. See MTLLibrary.
val sexp_of_t : t -> Sexplib0.Sexp.t
val set_label : t -> string -> unit
val get_label : t -> string
val on_device : Device.t -> source:string -> CompileOptions.t -> t
Creates a library by compiling Metal Shading Language source code. See newLibraryWithSource:options:error:.
Creates a library from pre-compiled data (e.g., a .metallib file loaded into memory). Defensively, the returned value holds on to the data pointer. See newLibraryWithData:error:.
val new_function_with_name : t -> string -> Function.t
Retrieves a specific function from the library by name. See newFunctionWithName:.
val get_function_names : t -> string array
val get_library_type : t -> CompileOptions.LibraryType.t
Gets the type of the library (Executable or Dynamic).
val get_install_name : t -> string option
Gets the install name if it's a dynamic library.