performance - matlab bsxfun not multithreading? -


i using matlab r2011a , according documentation bsxfun function multithreaded since r2009a (http://www.mathworks.com/help/techdoc/rn/br5k34y-1.html). when use bsxfun compare matrix against upper , lower bound this:

szs=10000; szt=50000; matt=rand(szt,3); mats=rand(szs,3); matsub=rand(szs,3); matslb=rand(szs,3); k=1:szs    matchid = all([bsxfun(@lt,matt,matsub(k,:)) bsxfun(@gt,matt,matslb(k,:))],2); end 

on task manager see 1 core of engaged. missing out or normal?

bsxfun executes passed function in parallel launching threads inside same matlab process. using "task manager" in windows, can't see threads in execution, running processes.

just keep in mind supported multithreaded functions, speed applies if data large enough (but above threshold in example).

another option parallel computing toolbox. using matlabpool function, can open new sessions of matlab in back, each in separate process. , when call parfor distributes load on workers. approach scales when run on cluster of computers.

i think should possible use both in same code..


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -