I'm trying to modify my code working well for a CPU setup to a GPU setup. It appears to be more complicated than what I had expected.
I'm using arrayfun to send the computation to GPU for my monte carlo simulations:
MC_Paths = arrayfun(@Heston_One_Simulation, Param1, Param2, and so on)
with the beginning of the function Heston_One_Simulation defined as
function [S] = Heston_One_Simulation(Param1,Params2, so on...)
And I get the following error message:
Function passed as first input argument contains unsupported or unknown function 'zeros'. For more information see Tips and Restrictions.
Is it impossible to declare new variables while running on a GPU ?
I'm sure I'll have more problems once this one is solved but let's start with that one.