Is there a way to make device memory persist between CUDA MEX calls
古いコメントを表示
I'm wondering if there is a graceful way to allocate data on or transfer data to the GPU in one MEX file (basically MATLAB interfaces to cudaMalloc or cudaMemcpy) and then process that data on the GPU with a different MEX file. I'm wondering if it is possible to do this without the Parallel Computing Toolbox.
When I do the memory transfer/allocation on the GPU, I will need to keep the pointer to the device memory and have it reside in the MATLAB workspace in some form until it is ready to be passed to the data processing MEX file. I'm wondering what the best way to do that is. Would I just convert the pointer value (not dereferenced) to a MATLAB integer and then convert it back again in the data processing MEX file when needed?
採用された回答
その他の回答 (1 件)
Eric Sampson
2014 年 1 月 2 日
0 投票
Matt, see if the methods discussed in the following thread could be adapted for your use: http://www.mathworks.com/matlabcentral/newsreader/view_thread/278243
カテゴリ
ヘルプ センター および File Exchange で GPU Computing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!