How can I specify thread tasks?
16 ビュー (過去 30 日間)
古いコメントを表示
I have to loop through all the n choose m combinations of the numbers 1:n. I have this algorithm:
vals = 1:m;
hasNext = true;
while(hasNext)
%do the task here
for M = m:-1:1
if vals(M)<n-m+M
vals(M) = vals(M)+1;
for MM = (M+1):m
vals(MM) = vals(M) + MM - M;
end
break;
end
if M==1
hasNext = false;
end
end
end
obviously parfor is not ideal here. I want to split the computation to multiple threads by splitting up the task to different sections and run that on different cores. LD;DR: Is it possible to do something like:
thread1.check(first part);
thread2.check(second part);
...
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
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!