GpuEmaCalculator

StockSharp.Algo.Gpu.Indicators

GPU calculator for Exponential Moving Average (EMA).

继承自: GpuIndicatorCalculatorBase<ExponentialMovingAverage, GpuEmaParams, GpuIndicatorResult>

构造函数

GpuEmaCalculator
public GpuEmaCalculator(Context context, Accelerator accelerator)
gpuEmaCalculator = GpuEmaCalculator(context, accelerator)

Initializes a new instance of the GpuEmaCalculator class.

context
ILGPU context.
accelerator
ILGPU accelerator.

方法

Calculate
public override GpuIndicatorResult[][][] Calculate(GpuCandle[][] candlesSeries, GpuEmaParams[] parameters)
result = gpuEmaCalculator.Calculate(candlesSeries, parameters)
EmaParamsSeriesKernel
private static void EmaParamsSeriesKernel(Index2D index, ArrayView<GpuCandle> flatCandles, ArrayView<GpuIndicatorResult> flatResults, ArrayView<int> offsets, ArrayView<int> lengths, ArrayView<GpuEmaParams> parameters)
GpuEmaCalculator.EmaParamsSeriesKernel(index, flatCandles, flatResults, offsets, lengths, parameters)

ILGPU kernel: EMA computation for multiple series and multiple parameter sets. One thread handles one (parameter, series) pair and iterates bars sequentially.