GPU computing Monte Carlo

1 回表示 (過去 30 日間)
cedric W
cedric W 2018 年 10 月 5 日
回答済み: Joss Knight 2018 年 10 月 6 日
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.

回答 (1 件)

Joss Knight
Joss Knight 2018 年 10 月 6 日
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.

カテゴリ

Help Center および File ExchangeGPU Computing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by