Hello,
i am currently trying to do some calculations of my code on gpu. therefore, i call the following lines:
angles=gpuArray(angles);[obj.Points(1,:),obj.Points(2,:)]=arrayfun(@(x) laser.calccolpnt(x,cell2mat(Obstacles.Obstaclemap),obj.position,obj.direction,obj.range),angles);
without the first line, this works perfectly fine, anyway, when i add the gpuArray command before, this gives me the following error:
Error using gpuArray/arrayfunFunction passed as first inputargument contains unsupported'MCOS' language feature 'CLASSDEF'.
i even get this, when the called function looks like this:
function [px,py]=calccolpnt(angle,Obstacles,position,direction,range) px=angle; py=angle;end
does anyone know a solution for this problem?
thanks for help.
Best Answer