Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b4e89c24 authored by Nicolas Bellot's avatar Nicolas Bellot Committed by hhakim
Browse files

wrapper matlab

parent 4503967d
Branches
Tags
No related merge requests found
...@@ -72,7 +72,8 @@ dense_times=zeros(nb_mult,nb_dim); ...@@ -72,7 +72,8 @@ dense_times=zeros(nb_mult,nb_dim);
faust_times=zeros(nb_mult,nb_dim); faust_times=zeros(nb_mult,nb_dim);
norm_dense=zeros(1,nb_dim); norm_dense=zeros(1,nb_dim);
norm_faust=zeros(1,nb_dim); norm_faust=zeros(1,nb_dim);
RCGs=ns./(Ms*2); %RCGs=ns./(Ms*2);
RCGs=zeros(1,nb_dim);
h = waitbar(0,'2-norm hadamard : multiplication time comparison ...'); h = waitbar(0,'2-norm hadamard : multiplication time comparison ...');
for i=1:nb_mult for i=1:nb_mult
...@@ -81,7 +82,7 @@ for i=1:nb_mult ...@@ -81,7 +82,7 @@ for i=1:nb_mult
n=ns(k); n=ns(k);
hadamard_dense=Hadamard_matrices{k}; hadamard_dense=Hadamard_matrices{k};
hadamard_faust=Faust(Hadamard_facts{k}); hadamard_faust=Faust(Hadamard_facts{k});
RCGs(k)=RCG(hadamard_faust);
%% 2-norm of the hadamard matrix %% 2-norm of the hadamard matrix
...@@ -143,6 +144,7 @@ semilogy(Ms,speed_up,'linewidth',plot_tickness); ...@@ -143,6 +144,7 @@ semilogy(Ms,speed_up,'linewidth',plot_tickness);
hold on hold on
semilogy(Ms,ones(1,nb_dim),'k','linewidth',plot_tickness); semilogy(Ms,ones(1,nb_dim),'k','linewidth',plot_tickness);
semilogy(Ms,RCGs,'g','linewidth',plot_tickness); semilogy(Ms,RCGs,'g','linewidth',plot_tickness);
grid on grid on
axis([Ms(1) Ms(end) min([speed_up,1,RCGs]) max([speed_up,1,RCGs])]); axis([Ms(1) Ms(end) min([speed_up,1,RCGs]) max([speed_up,1,RCGs])]);
title('speed-up norm(A)'); title('speed-up norm(A)');
...@@ -150,7 +152,7 @@ xlabel('log(dim)'); ...@@ -150,7 +152,7 @@ xlabel('log(dim)');
ylabel('speedup'); ylabel('speedup');
legend('faust','neutral','theoretical','Location',legend_location); legend('faust','neutral','theoretical','Location',legend_location);
set(gca,'XTick',Ms); set(gca,'XTick',Ms);
%% %
subplot(1,3,3); subplot(1,3,3);
id=find(err_norm_faust ~= 0);% semilogy is not compatible with 0 id=find(err_norm_faust ~= 0);% semilogy is not compatible with 0
...@@ -192,3 +194,4 @@ print(figure_name, format_fig); ...@@ -192,3 +194,4 @@ print(figure_name, format_fig);
...@@ -319,7 +319,7 @@ classdef Faust ...@@ -319,7 +319,7 @@ classdef Faust
%% nnz : Relative Complexity Gain (inverse of the density) %% nnz : Relative Complexity Gain (inverse of the density)
function speed_up=RCG(this) function speed_up=RCG(this)
dens=density(this) dens=density(this);
if (dens > 0) if (dens > 0)
speed_up=1/dens; speed_up=1/dens;
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment