[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
vectorization quiz
From: |
Francesco Potortì |
Subject: |
vectorization quiz |
Date: |
Wed, 08 Sep 2010 11:32:47 +0200 |
I thought a little, but I do not see the way of vectorising this. It's
a loop that is run only few times, but is called very frequently.
Essentially, there are few 2-D maps stacked one over the other which
must be shifted each by a variable amount and then summed to obtain a
new 2-D map. Here is the code:
for mi = 1:m
llka += llkm(by+offm(mi,1), bx+offm(mi,2), mi);
endfor
where:
m ==> 5
size(llka) ==> 156 222
size(llkm) ==> 186 252 5
by ==> 16:172
bx ==> 16:238
size(offm) ==> 5 2
offm(m,i) ==> a scalar in the range [-15;15]
Thanks in advance to those wishing to try :)
--
Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR Fax: +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa Email: address@hidden
(entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it/
- vectorization quiz,
Francesco Potortì <=