One Logo Pool Ball
Accelerate · IOS API REFERENCE

BNNSGraph.CompileOptions

struct · iOS 18.0+ · SDK 27.1

struct CompileOptions

The compilation options that BNNS Graph uses to compile `.mlmodelc` to a `BNNSGraph.Context` object.

Members (8)

init · iOS 18.0+

init

TypeScript
static initUseSingleThreadGenerateDebugInfoOptimizationPreference(useSingleThread?: boolean, generateDebugInfo?: boolean, optimizationPreference?: BNNSGraph_CompileOptions_OptimizationPreference): BNNSGraph_CompileOptions
Swift declaration
init(useSingleThread: Bool = false, generateDebugInfo: Bool = false, optimizationPreference: BNNSGraph.CompileOptions.OptimizationPreference = .performance)

Allocates and returns a new `CompileOptions` object with specified values. - Parameter useSingleThread: Specifies whether the graph should execute on one thread. - Parameter generateDebugInfo: A Boolean value that specifies whether the generated graph includes debug info. - Parameter optimizationPreference: A constant that specifies the graph compilation optimization preferences. - SeeAlso: `BNNSGraphCompileOptionsMakeDefault`

get · iOS 18.0+

useSingleThread

TypeScript
get useSingleThread(): boolean
Swift declaration
var useSingleThread: Bool { get set }

The option for compiled graph to execute on only one thread. Default behavior is to execute on multiple threads. - SeeAlso: `BNNSGraphCompileOptionsSetTargetSingleThread` - SeeAlso: `BNNSGraphCompileOptionsGetTargetSingleThread`

set · iOS 18.0+

useSingleThread

TypeScript
set useSingleThread(value: boolean)
Swift declaration
var useSingleThread: Bool { get set }

The option for compiled graph to execute on only one thread. Default behavior is to execute on multiple threads. - SeeAlso: `BNNSGraphCompileOptionsSetTargetSingleThread` - SeeAlso: `BNNSGraphCompileOptionsGetTargetSingleThread`

get · iOS 18.0+

generateDebugInfo

TypeScript
get generateDebugInfo(): boolean
Swift declaration
var generateDebugInfo: Bool { get set }

A Boolean value that specifies whether the generated `BNNSGraph.Context` object includes debug info. Default behavior is *not* to include debug info. - SeeAlso: `BNNSGraphCompileOptionsSetGenerateDebugInfo` - SeeAlso: `BNNSGraphCompileOptionsGetGenerateDebugInfo`

set · iOS 18.0+

generateDebugInfo

TypeScript
set generateDebugInfo(value: boolean)
Swift declaration
var generateDebugInfo: Bool { get set }

A Boolean value that specifies whether the generated `BNNSGraph.Context` object includes debug info. Default behavior is *not* to include debug info. - SeeAlso: `BNNSGraphCompileOptionsSetGenerateDebugInfo` - SeeAlso: `BNNSGraphCompileOptionsGetGenerateDebugInfo`

get · iOS 18.0+

optimizationPreference

TypeScript
get optimizationPreference(): BNNSGraph_CompileOptions_OptimizationPreference
Swift declaration
var optimizationPreference: BNNSGraph.CompileOptions.OptimizationPreference { get set }

The option that specifies the optimization preference to compile with. Default is `.performance`. - SeeAlso: BNNSGraphOptimizationPreference

set · iOS 18.0+

optimizationPreference

TypeScript
set optimizationPreference(value: BNNSGraph_CompileOptions_OptimizationPreference)
Swift declaration
var optimizationPreference: BNNSGraph.CompileOptions.OptimizationPreference { get set }

The option that specifies the optimization preference to compile with. Default is `.performance`. - SeeAlso: BNNSGraphOptimizationPreference

init · iOS 18.0+

init

TypeScript
static init(): BNNSGraph_CompileOptions
Swift declaration
init()

Allocates and returns a new `CompileOptions` object with default values. - SeeAlso: `BNNSGraphCompileOptionsMakeDefault`

Skipped declarations

No declarations were skipped in this snapshot.

All Accelerate types →