I am using C ++ AMP with Visual Studio 2012 on Windows 8. I have a case where I have 2D array_view, experimentData and 1D array_view, experimentFactors . I want to iterate over the first size of a 2D array and 1 size of a 1D array_view. This is what I have, but I constantly get errors saying that there are no overloads for this. I want to numberOfTests over numberOfTests , which is the first dimension. I want a line:
auto test = experimentData[idx];
to return the entire row of data. I think the section method on array_view is a way to do this, but I can't figure out how to do this.
array_view<int_2, 2> experimentData(numberOfTests, numberOfSolutions, initialConditionSet); array_view<float_2, 1> experimentFactors(numberOfTests, factorData); extent<1> e_size(numberOfTests); parallel_for_each(e_size, [=] (index<1> idx) restrict(amp) { auto test = experimentData.section(idx); auto factors = experimentFactors[idx]; analysisAlgorithm(test, factors); });
The test object must be a 1xN section of the experimentData array_view . The factors object must be one element of the experimentFactors array_view .
Explanation
experimentData array_view has M rows and N columns
experimentFactors array_view has M rows
source share