GPU computing Monte Carlo

조회 수: 10 (최근 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 CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by