I am trying to use Gpu.Default.For
from the Alea GPU library, but I keep getting an exception:
i32 is not a struct type error.
What does this error mean, and why am I getting it with this simple Gpu.Default.For
loop?
for (Int32 j = 0; j <= TimePeriodArray.Length - 1; j++)
//Gpu.Default.For(0, TimePeriodArray.Length - 1, j =>
{
Int32 days = TimePeriodArray[j];
Double[] CalcResult = new Double[CloseArray.Length];
for (Int32 Index = days; Index <= CloseArray.Length - 1; Index++)
{
Gpu.Default.For(Index - 1, Index - days, i =>
{
CalcResult[Index] = CalcResult[Index] + CloseArray[i];
});
CalcResult[Index] = CalcResult[Index] / days;
}
CalcResultsList.Add(CalcResult);
//});
}