Module Metal.CompileOptions

Options for compiling Metal Shading Language (MSL) source code. See MTLCompileOptions.

type t
val sexp_of_t : t -> Sexplib0.Sexp.t
val init : unit -> t

Creates a new, default set of compile options.

module LanguageVersion : sig ... end

Specifies the version of the Metal Shading Language to use. See MTLLanguageVersion.

module LibraryType : sig ... end

Specifies the type of library to produce. See MTLLibraryType.

module OptimizationLevel : sig ... end

Specifies the optimization level for the compiler. See MTLLibraryOptimizationLevel.

module MathMode : sig ... end

Specifies the math mode for floating-point optimizations. See MTLMathMode.

module MathFloatingPointFunctions : sig ... end

Specifies which math functions to use for single precision floating-point. See MTLMathFloatingPointFunctions.

val set_fast_math_enabled : t -> bool -> unit
val get_fast_math_enabled : t -> bool
val set_math_mode : t -> MathMode.t -> unit

Sets the floating-point arithmetic optimizations mode.

val get_math_mode : t -> MathMode.t
val set_math_floating_point_functions : t -> MathFloatingPointFunctions.t -> unit

Sets the default math functions for single precision floating-point.

val get_math_floating_point_functions : t -> MathFloatingPointFunctions.t
val set_enable_logging : t -> bool -> unit
val get_enable_logging : t -> bool
val set_max_total_threads_per_threadgroup : t -> int -> unit
val get_max_total_threads_per_threadgroup : t -> int
val set_language_version : t -> LanguageVersion.t -> unit
val get_language_version : t -> LanguageVersion.t
val set_library_type : t -> LibraryType.t -> unit
val get_library_type : t -> LibraryType.t
val set_install_name : t -> string -> unit

Sets the install name for dynamic libraries.

val get_install_name : t -> string
val set_optimization_level : t -> OptimizationLevel.t -> unit
val get_optimization_level : t -> OptimizationLevel.t