[go: up one dir, main page]

Menu

[17deec]: / timing / time_6.m  Maximize  Restore  History

Download this file

46 lines (32 with data), 616 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
function time_6(sf,dotime)
%
% The purpose of this test is to determine whether it pays of to do
% fewer passes through memory
%
Lr=[480000*sf^2,262144*sf^2,900*sf^2];
ar=[ 600*sf, 512, 2];
Mr=[ 800*sf, 1024, 600*sf];
for ii=1:length(Lr)
L=Lr(ii);
M=Mr(ii);
a=ar(ii);
g=rand(L,1);
f=rand(L,1);
[L, a, M]
N=L/a;
c=gcd(a,M);
p=a/c;
q=M/c;
d=N/q;
f=rand(L,1);
gf=rand(p*q,c*d);
tic;
c1=mex_dgt_fac_4(f,gf,a,M,dotime);
t1=toc;
f=rand(L,1);
gf=rand(p*q,c*d);
tic;
c2=mex_dgt_fac_6(f,gf,a,M,dotime);
t2=toc;
t1/t2
end;