Skip to content

Commit d3ad53f

Browse files
committed
Rename Context.begin(onDevice:options:) to Context.begin(on:options:)
1 parent 2281943 commit d3ad53f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Sources/CUDADriver/Context.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public struct Context : CHandleCarrier {
3838
}
3939
}
4040

41-
public static func begin(onDevice device: Device, options: Options? = nil) -> Context {
41+
public static func begin(on device: Device, options: Options? = nil) -> Context {
4242
var ctxHandle: CUcontext?
4343
!!cuCtxCreate_v2(&ctxHandle, 0, device.handle)
4444
if let options = options {

Sources/CUDADriver/Device.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public struct Device : Equatable, CHandleCarrier {
5555
@discardableResult
5656
public func withContext<Result>
5757
(_ execute: (Context) throws -> Result) throws -> Result {
58-
var context = Context.begin(onDevice: self)
58+
var context = Context.begin(on: self)
5959
let result = try execute(context)
6060
try Context.synchronize()
6161
context.end()

Sources/CUDARuntime/Module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ open class Module : CUDADriver.Module {
3232
}) else {
3333
throw RuntimeError.noDevice
3434
}
35-
context = Context.begin(onDevice: driverDevice)
35+
context = Context.begin(on: driverDevice)
3636
try super.init(ptx: ptx)
3737
}
3838

0 commit comments

Comments
 (0)