GpuIndicatorCalculatorBase
StockSharp.Algo.Gpu
Base class for GPU-based indicator calculators.
Implementa: IGpuIndicatorCalculator
Construtores
GpuIndicatorCalculatorBase
protected GpuIndicatorCalculatorBase(Context context, Accelerator accelerator)
gpuIndicatorCalculatorBase = GpuIndicatorCalculatorBase(context, accelerator)
Base class for GPU-based indicator calculators.
- context
- ILGPU context.
- accelerator
- ILGPU accelerator.
Propriedades
IndicatorType
public abstract Type IndicatorType { get; }
value = gpuIndicatorCalculatorBase.IndicatorType
IIndicator type this calculator is associated with.
ParameterType
public abstract Type ParameterType { get; }
value = gpuIndicatorCalculatorBase.ParameterType
IGpuIndicatorParams struct type used as parameter set for this indicator.
ResultType
public abstract Type ResultType { get; }
value = gpuIndicatorCalculatorBase.ResultType
GPU result struct type returned by this calculator.
Métodos
Calculate
public abstract IGpuIndicatorResult[][][] Calculate(GpuCandle[][] candlesSeries, IGpuIndicatorParams[] parameters)
result = gpuIndicatorCalculatorBase.Calculate(candlesSeries, parameters)
Calculate indicator for multiple series and multiple parameter sets in one GPU pass.
- candlesSeries
- Input candle series array. Each series can have different length.
- parameters
- Array of parameter sets to calculate for each series.
Retorna: 3D array of GPU results: [series][parameter set][bar].
ExtractPrice
protected static float ExtractPrice(GpuCandle candle, Level1Fields priceType)
result = GpuIndicatorCalculatorBase.ExtractPrice(candle, priceType)
Extract price value from candle on GPU.
- candle
- Candle.
- priceType
- Price type.
Retorna: Extracted price.
Campos
Accelerator
protected readonly Accelerator Accelerator
value = gpuIndicatorCalculatorBase.Accelerator
ILGPU accelerator used for computations.
Context
protected readonly Context Context
value = gpuIndicatorCalculatorBase.Context
ILGPU context.