Class PersistentKernelInstance
- Namespace
- Orleans.GpuBridge.Runtime.Persistent
- Assembly
- Orleans.GpuBridge.Runtime.dll
Represents a running persistent kernel instance
public sealed class PersistentKernelInstance : IDisposable
- Inheritance
-
PersistentKernelInstance
- Implements
- Inherited Members
Constructors
PersistentKernelInstance(string, KernelId, IGpuKernel<byte[], byte[]>, PersistentKernelOptions, ILogger)
Initializes a new instance of the PersistentKernelInstance class.
public PersistentKernelInstance(string instanceId, KernelId kernelId, IGpuKernel<byte[], byte[]> kernel, PersistentKernelOptions options, ILogger logger)
Parameters
instanceIdstringThe unique instance identifier.
kernelIdKernelIdThe kernel identifier.
kernelIGpuKernel<byte[], byte[]>The GPU kernel to execute.
optionsPersistentKernelOptionsThe execution options.
loggerILoggerThe logger for diagnostic output.
Properties
InstanceId
Gets the unique identifier for this kernel instance.
public string InstanceId { get; }
Property Value
KernelId
Gets the kernel identifier.
public KernelId KernelId { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetStatus()
Gets the current status of the kernel instance.
public KernelInstanceStatus GetStatus()
Returns
- KernelInstanceStatus
The kernel instance status.
RestartAsync(CancellationToken)
Restarts the kernel instance by stopping and starting it.
public Task RestartAsync(CancellationToken ct = default)
Parameters
ctCancellationTokenCancellation token.
Returns
- Task
A task representing the asynchronous operation.
StartAsync(CancellationToken)
Starts the kernel instance.
public Task StartAsync(CancellationToken ct = default)
Parameters
ctCancellationTokenCancellation token.
Returns
- Task
A task representing the asynchronous operation.
StopAsync(CancellationToken)
Stops the kernel instance.
public Task StopAsync(CancellationToken ct = default)
Parameters
ctCancellationTokenCancellation token.
Returns
- Task
A task representing the asynchronous operation.