GpuDemandIndexCalculator

StockSharp.Algo.Gpu.Indicators

GPU calculator for Demand Index indicator.

继承自: GpuIndicatorCalculatorBase<DemandIndex, GpuDemandIndexParams, GpuIndicatorResult>

构造函数

GpuDemandIndexCalculator
public GpuDemandIndexCalculator(Context context, Accelerator accelerator)
gpuDemandIndexCalculator = GpuDemandIndexCalculator(context, accelerator)

Initializes a new instance of the GpuDemandIndexCalculator class.

context
ILGPU context.
accelerator
ILGPU accelerator.

方法

Calculate
public override GpuIndicatorResult[][][] Calculate(GpuCandle[][] candlesSeries, GpuDemandIndexParams[] parameters)
result = gpuDemandIndexCalculator.Calculate(candlesSeries, parameters)
DemandIndexParamsSeriesKernel
private static void DemandIndexParamsSeriesKernel(Index2D index, ArrayView<GpuCandle> flatCandles, ArrayView<GpuIndicatorResult> flatResults, ArrayView<int> offsets, ArrayView<int> lengths, ArrayView<GpuDemandIndexParams> parameters, ArrayView<double> windowStorage, int maxParamLength)
GpuDemandIndexCalculator.DemandIndexParamsSeriesKernel(index, flatCandles, flatResults, offsets, lengths, parameters, windowStorage, maxParamLength)

ILGPU kernel: Demand Index computation for multiple series and parameter sets. One thread processes a (parameter, series) pair sequentially across bars.