Class GpuPipeline
Fluent pipeline builder for GPU processing
public sealed class GpuPipeline
- Inheritance
-
GpuPipeline
- Inherited Members
Constructors
GpuPipeline(IGpuBridge, ILogger<GpuPipeline>)
Initializes a new instance of the GpuPipeline class.
public GpuPipeline(IGpuBridge bridge, ILogger<GpuPipeline> logger)
Parameters
bridgeIGpuBridgeThe GPU bridge instance.
loggerILogger<GpuPipeline>The logger instance.
Methods
AddKernel<TIn, TOut>(KernelId, Func<TIn, bool>?)
Adds a kernel stage to the pipeline
public GpuPipeline AddKernel<TIn, TOut>(KernelId kernelId, Func<TIn, bool>? filter = null) where TIn : notnull where TOut : notnull
Parameters
Returns
Type Parameters
TInTOut
Batch<T>(int, TimeSpan?)
Adds a batch stage to the pipeline
public GpuPipeline Batch<T>(int batchSize, TimeSpan? timeout = null) where T : notnull
Parameters
Returns
Type Parameters
T
Build<TInput, TOutput>()
Builds and returns an executable pipeline
public IPipeline<TInput, TOutput> Build<TInput, TOutput>() where TInput : notnull where TOutput : notnull
Returns
- IPipeline<TInput, TOutput>
Type Parameters
TInputTOutput
Filter<T>(Func<T, bool>)
Adds a filter stage to the pipeline
public GpuPipeline Filter<T>(Func<T, bool> predicate) where T : notnull
Parameters
Returns
Type Parameters
T
For<TIn, TOut>(IGrainFactory, string)
Creates a typed GPU pipeline for a specific kernel
public static GpuPipelineBuilder<TIn, TOut> For<TIn, TOut>(IGrainFactory grainFactory, string kernelId) where TIn : notnull where TOut : notnull
Parameters
grainFactoryIGrainFactorykernelIdstring
Returns
- GpuPipelineBuilder<TIn, TOut>
Type Parameters
TInTOut
Parallel<TIn, TOut>(Func<TIn, Task<TOut>>, int)
Adds a parallel stage to the pipeline
public GpuPipeline Parallel<TIn, TOut>(Func<TIn, Task<TOut>> processor, int maxConcurrency = 0) where TIn : notnull where TOut : notnull
Parameters
Returns
Type Parameters
TInTOut
Tap<T>(Action<T>)
Adds a tap stage for side effects
public GpuPipeline Tap<T>(Action<T> action) where T : notnull
Parameters
actionAction<T>
Returns
Type Parameters
T
Transform<TIn, TOut>(Func<TIn, Task<TOut>>)
Adds an async transform stage to the pipeline
public GpuPipeline Transform<TIn, TOut>(Func<TIn, Task<TOut>> asyncTransform) where TIn : notnull where TOut : notnull
Parameters
Returns
Type Parameters
TInTOut
Transform<TIn, TOut>(Func<TIn, TOut>)
Adds a transform stage to the pipeline
public GpuPipeline Transform<TIn, TOut>(Func<TIn, TOut> transform) where TIn : notnull where TOut : notnull
Parameters
transformFunc<TIn, TOut>
Returns
Type Parameters
TInTOut