Speeding up stream2 with parallel computing?
9 ビュー (過去 30 日間)
古いコメントを表示
I've got a set of data that I'm looping through almost 4 million times, and it's iterative, so I can't just parfor it. The whole script takes a couple of days to run. I ran it through the built in profiler and 83-87% of the computation time is spent in stream2. I'm leaning towards GPU, since the lab I'm working for has a computer with a Nvidia Tesla K40, but my parallel computing experience is nonexistent.
The inputs to stream2 are all arrays except of the step size and max vertices, which I need to be able to control. I've tried putting it in to arrayfun and putting all the inputs in to gpuArrays, but stream2 throws an error:
Error using stream2>parseargs (line 100)
Wrong number of input arguments.
Error in stream2 (line 29)
[x, y, u, v, sx, sy, step, maxvert] = parseargs(nargin,varargin);
Here's the code I'm working with:
OPTIONS = [0.05 , 2];
EP = arrayfun(@stream2,C.x/10,C.y/10,C.u/10,C.v/10,Xin,Yin);
Where C is a structure array. As I loop through, the output of stream2 from the n-1 loop will be the Xin and Yin for the nth loop.
Any thoughts on speeding this up?
Edit: Added the @ in front of my function, turns out I had forgotten my inputs to stream2 weren't the same size and shape, so arrayfun probably isn't the solution.
0 件のコメント
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Parallel Computing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!