GPU computing Monte Carlo

2 Ansichten (letzte 30 Tage)
cedric W
cedric W am 5 Okt. 2018
Beantwortet: Joss Knight am 6 Okt. 2018
I'm pricing barrier options with Monte Carlo simulations. I started my code with CPU setting and now I'm moving to GPU. I want to compute independant paths many times, but for each simulation, since I'm pricing a worst of basket and path dependant option, I have to retrieve the path for each asset and each time step. So in the end after gathering results, I have a matrix N (time step) x NbAssets x M simulations.
The point is I don't know where to use gpuArray and how to set the size of the matrix (I mean, how to order the size). Because in the end there is the "gather" part and I don't know how it will be indexed(gathered/concatenated).
I tried to make things as clear as possible. Tell me if that's not.

Antworten (1)

Joss Knight
Joss Knight am 6 Okt. 2018
It's pretty hard to tell from your description. The normal way for Monte Carlo would be to use arrayfun, following the document example Using GPU arrayfun for Monte Carlo Simulations.

Kategorien

Mehr zu GPU Computing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by