GpuRelativeMomentumIndexCalculator
StockSharp.Algo.Gpu.Indicators
GPU calculator for Relative Momentum Index (RMI).
继承自: GpuIndicatorCalculatorBase<RelativeMomentumIndex, GpuRelativeMomentumIndexParams, GpuIndicatorResult>
构造函数
GpuRelativeMomentumIndexCalculator
public GpuRelativeMomentumIndexCalculator(Context context, Accelerator accelerator)
gpuRelativeMomentumIndexCalculator = GpuRelativeMomentumIndexCalculator(context, accelerator)
Initializes a new instance of the GpuRelativeMomentumIndexCalculator class.
- context
- ILGPU context.
- accelerator
- ILGPU accelerator.
方法
Calculate
public override GpuIndicatorResult[][][] Calculate(GpuCandle[][] candlesSeries, GpuRelativeMomentumIndexParams[] parameters)
result = gpuRelativeMomentumIndexCalculator.Calculate(candlesSeries, parameters)
RelativeMomentumIndexParamsSeriesKernel
private static void RelativeMomentumIndexParamsSeriesKernel(Index3D index, ArrayView<GpuCandle> flatCandles, ArrayView<GpuIndicatorResult> flatResults, ArrayView<int> offsets, ArrayView<int> lengths, ArrayView<GpuRelativeMomentumIndexParams> parameters)
GpuRelativeMomentumIndexCalculator.RelativeMomentumIndexParamsSeriesKernel(index, flatCandles, flatResults, offsets, lengths, parameters)
ILGPU kernel: RMI computation for multiple series and parameter sets.