Mercurial > hg > ishara
view arrows/@abuffer/construct.m @ 2:7357e1dc2ad6
Simplified scheduler library with new schedule representation.
author | samer |
---|---|
date | Sat, 22 Dec 2012 16:17:51 +0000 |
parents | 672052bd81f8 |
children |
line wrap: on
line source
function u=construct(s,sizes_in) u=construct(s.base,sizes_in); u.sizes_out = {[u.sizes_out{1}(1),s.width]}; subproc = u.process; width = s.width; if nargin(s.base)==0 && nargout(s.base)==1 u.process = @proc01; elseif nargin(s.base)==1 && nargout(s.base)==0 u.process = @proc10; else u.process = @proc11; end function proc10(X) for i=1:width, subproc(X(:,i)); end end function Y=proc11(X) y=subproc(X(:,1)); Y=repmat(y,1,width); for i=2:width Y(:,i)=subproc(X(:,i)); end end function Y=proc01 y=subproc(); Y=repmat(y,1,width); for i=2:width Y(:,i)=subproc(); end end end