I'm trying to write a MATLAB function that will run on an NVIDIA GeForce GTX 660. I'm using MATLAB R2013b and have the parallel toolbox installed.
I tried to model my code using the paralleldemo_gpu_stencil demo.
I have an array of samples (15000×1) and I want to add values to slices of the samples, where I may have 1,000,000 values to add. I have a nested function that I call using arrayfun, that I loop through for the number of values I want to add. I'm getting the error "gpuArray output type not currently implemented". on the arrayfun line.
1 %Inline function
2 function X = addValue(slice)3 X = (samples + values) * slice;4 end5 samples = gpuArray(samples); % previously defined
6 zeroArray = zeros(size(samples));7 for ii=1:numberValies8 slice = zeroArray; % Use as a mask to apply to only those indices I care about
9 startSlice = slicePos(ii);10 slice(startSlice:startSlice-1) = ones(size(startSlice:startSlice-1,1));11 samples = arrayfun(@addValue, slice);12 end
I'm getting the error on line 11. Any help would be appreciated.
Best Answer