diff --git a/A1/graphs/exectime.pgf b/A1/graphs/exectime.pgf new file mode 100644 index 0000000..989a157 --- /dev/null +++ b/A1/graphs/exectime.pgf @@ -0,0 +1,764 @@ +%% Creator: Matplotlib, PGF backend +%% +%% To include the figure in your LaTeX document, write +%% \input{.pgf} +%% +%% Make sure the required packages are loaded in your preamble +%% \usepackage{pgf} +%% +%% Figures using additional raster images can only be included by \input if +%% they are in the same directory as the main LaTeX file. For loading figures +%% from other directories you can use the `import` package +%% \usepackage{import} +%% and then include the figures with +%% \import{}{.pgf} +%% +%% Matplotlib used the following preamble +%% \usepackage{fontspec} +%% \setmainfont{DejaVuSerif.ttf}[Path=/usr/lib/python3.8/site-packages/matplotlib/mpl-data/fonts/ttf/] +%% \setsansfont{DejaVuSans.ttf}[Path=/usr/lib/python3.8/site-packages/matplotlib/mpl-data/fonts/ttf/] +%% \setmonofont{DejaVuSansMono.ttf}[Path=/usr/lib/python3.8/site-packages/matplotlib/mpl-data/fonts/ttf/] +%% +\begingroup% +\makeatletter% +\begin{pgfpicture}% +\pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{6.400000in}{4.800000in}}% +\pgfusepath{use as bounding box, clip}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetmiterjoin% +\definecolor{currentfill}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.000000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{6.400000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{6.400000in}{4.800000in}}% +\pgfpathlineto{\pgfqpoint{0.000000in}{4.800000in}}% +\pgfpathclose% +\pgfusepath{fill}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetmiterjoin% +\definecolor{currentfill}{rgb}{0.898039,0.898039,0.898039}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.000000pt}% +\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetstrokeopacity{0.000000}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{4.224000in}}% +\pgfpathlineto{\pgfqpoint{0.800000in}{4.224000in}}% +\pgfpathclose% +\pgfusepath{fill}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.953882in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{0.953882in}{4.224000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{0.953882in}{0.528000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=0.953882in,y=0.430778in,,top]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 0}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{1.669610in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{1.669610in}{4.224000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{1.669610in}{0.528000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=1.669610in,y=0.430778in,,top]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 10}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{2.385339in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{2.385339in}{4.224000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{2.385339in}{0.528000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=2.385339in,y=0.430778in,,top]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 20}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{3.101068in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{3.101068in}{4.224000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{3.101068in}{0.528000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=3.101068in,y=0.430778in,,top]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 30}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{3.816797in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{3.816797in}{4.224000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{3.816797in}{0.528000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=3.816797in,y=0.430778in,,top]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 40}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{4.532525in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{4.532525in}{4.224000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{4.532525in}{0.528000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=4.532525in,y=0.430778in,,top]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 50}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{5.248254in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{5.248254in}{4.224000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{5.248254in}{0.528000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=5.248254in,y=0.430778in,,top]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 60}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=3.280000in,y=0.240809in,,top]{\color{textcolor}\sffamily\fontsize{12.000000}{14.400000}\selectfont Number of threads \(\displaystyle n_{tr}\)}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{0.696000in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{0.696000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{0.800000in}{0.696000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=0.481898in,y=0.643238in,left,base]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 1.0}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{1.149333in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{1.149333in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{0.800000in}{1.149333in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=0.481898in,y=1.096572in,left,base]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 1.5}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{1.602667in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{1.602667in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{0.800000in}{1.602667in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=0.481898in,y=1.549905in,left,base]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 2.0}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{2.056000in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{2.056000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{0.800000in}{2.056000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=0.481898in,y=2.003238in,left,base]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 2.5}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{2.509333in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{2.509333in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{0.800000in}{2.509333in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=0.481898in,y=2.456572in,left,base]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 3.0}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{2.962667in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{2.962667in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{0.800000in}{2.962667in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=0.481898in,y=2.909905in,left,base]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 3.5}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{3.416000in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{3.416000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{0.800000in}{3.416000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=0.481898in,y=3.363238in,left,base]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 4.0}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{3.869333in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{3.869333in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{0.803000pt}% +\definecolor{currentstroke}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{0.000000in}{0.000000in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% +\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{0.800000in}{3.869333in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=0.481898in,y=3.816572in,left,base]{\color{textcolor}\sffamily\fontsize{10.000000}{12.000000}\selectfont 4.5}% +\end{pgfscope}% +\begin{pgfscope}% +\definecolor{textcolor}{rgb}{0.333333,0.333333,0.333333}% +\pgfsetstrokecolor{textcolor}% +\pgfsetfillcolor{textcolor}% +\pgftext[x=0.426343in,y=2.376000in,,bottom,rotate=90.000000]{\color{textcolor}\sffamily\fontsize{12.000000}{14.400000}\selectfont Speed-up \(\displaystyle S\)}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetrectcap% +\pgfsetroundjoin% +\pgfsetlinewidth{4.015000pt}% +\definecolor{currentstroke}{rgb}{0.886275,0.290196,0.200000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{1.025455in}{0.696000in}}% +\pgfpathlineto{\pgfqpoint{1.097027in}{1.300444in}}% +\pgfpathlineto{\pgfqpoint{1.240173in}{2.056000in}}% +\pgfpathlineto{\pgfqpoint{1.526465in}{2.811556in}}% +\pgfpathlineto{\pgfqpoint{2.099048in}{3.416000in}}% +\pgfpathlineto{\pgfqpoint{3.244214in}{3.818963in}}% +\pgfpathlineto{\pgfqpoint{4.389380in}{3.973949in}}% +\pgfpathlineto{\pgfqpoint{5.534545in}{4.056000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}% +\pgfusepath{clip}% +\pgfsetbuttcap% +\pgfsetroundjoin% +\definecolor{currentfill}{rgb}{0.886275,0.290196,0.200000}% +\pgfsetfillcolor{currentfill}% +\pgfsetlinewidth{1.003750pt}% +\definecolor{currentstroke}{rgb}{0.886275,0.290196,0.200000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.041667in}{-0.041667in}}{\pgfqpoint{0.041667in}{0.041667in}}{% +\pgfpathmoveto{\pgfqpoint{0.000000in}{-0.041667in}}% +\pgfpathcurveto{\pgfqpoint{0.011050in}{-0.041667in}}{\pgfqpoint{0.021649in}{-0.037276in}}{\pgfqpoint{0.029463in}{-0.029463in}}% +\pgfpathcurveto{\pgfqpoint{0.037276in}{-0.021649in}}{\pgfqpoint{0.041667in}{-0.011050in}}{\pgfqpoint{0.041667in}{0.000000in}}% +\pgfpathcurveto{\pgfqpoint{0.041667in}{0.011050in}}{\pgfqpoint{0.037276in}{0.021649in}}{\pgfqpoint{0.029463in}{0.029463in}}% +\pgfpathcurveto{\pgfqpoint{0.021649in}{0.037276in}}{\pgfqpoint{0.011050in}{0.041667in}}{\pgfqpoint{0.000000in}{0.041667in}}% +\pgfpathcurveto{\pgfqpoint{-0.011050in}{0.041667in}}{\pgfqpoint{-0.021649in}{0.037276in}}{\pgfqpoint{-0.029463in}{0.029463in}}% +\pgfpathcurveto{\pgfqpoint{-0.037276in}{0.021649in}}{\pgfqpoint{-0.041667in}{0.011050in}}{\pgfqpoint{-0.041667in}{0.000000in}}% +\pgfpathcurveto{\pgfqpoint{-0.041667in}{-0.011050in}}{\pgfqpoint{-0.037276in}{-0.021649in}}{\pgfqpoint{-0.029463in}{-0.029463in}}% +\pgfpathcurveto{\pgfqpoint{-0.021649in}{-0.037276in}}{\pgfqpoint{-0.011050in}{-0.041667in}}{\pgfqpoint{0.000000in}{-0.041667in}}% +\pgfpathclose% +\pgfusepath{stroke,fill}% +}% +\begin{pgfscope}% +\pgfsys@transformshift{1.025455in}{0.696000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsys@transformshift{1.097027in}{1.300444in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsys@transformshift{1.240173in}{2.056000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsys@transformshift{1.526465in}{2.811556in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsys@transformshift{2.099048in}{3.416000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsys@transformshift{3.244214in}{3.818963in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsys@transformshift{4.389380in}{3.973949in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsys@transformshift{5.534545in}{4.056000in}% +\pgfsys@useobject{currentmarker}{}% +\end{pgfscope}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetrectcap% +\pgfsetmiterjoin% +\pgfsetlinewidth{1.003750pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{0.800000in}{4.224000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetrectcap% +\pgfsetmiterjoin% +\pgfsetlinewidth{1.003750pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{5.760000in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{4.224000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetrectcap% +\pgfsetmiterjoin% +\pgfsetlinewidth{1.003750pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{0.528000in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{0.528000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\begin{pgfscope}% +\pgfsetrectcap% +\pgfsetmiterjoin% +\pgfsetlinewidth{1.003750pt}% +\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% +\pgfsetstrokecolor{currentstroke}% +\pgfsetdash{}{0pt}% +\pgfpathmoveto{\pgfqpoint{0.800000in}{4.224000in}}% +\pgfpathlineto{\pgfqpoint{5.760000in}{4.224000in}}% +\pgfusepath{stroke}% +\end{pgfscope}% +\end{pgfpicture}% +\makeatother% +\endgroup% diff --git a/A1/graphs/gengraphs.py b/A1/graphs/gengraphs.py new file mode 100755 index 0000000..769eb43 --- /dev/null +++ b/A1/graphs/gengraphs.py @@ -0,0 +1,24 @@ +#!/usr/bin/python + +import matplotlib.pyplot as plt +import numpy as np +from numpy import array +import tikzplotlib + +plt.style.use("ggplot") + +def speedup(n, p = 0.8): + return 1.0 / (1 - p + p / n) + +x = array([1, 2, 4, 8, 16, 32, 48, 64]) +y = speedup(x) + +plt.plot(x, y, 'o-', lw = 4.0) +plt.xlabel('Number of threads $n_{tr}$') +plt.ylabel('Speed-up $S$') +plt.grid(True) +plt.savefig('exectime.pgf', format='pgf') + +tikzplotlib.save("theor_speedup.tex") + +plt.show() diff --git a/A1/graphs/theor_speedup.tex b/A1/graphs/theor_speedup.tex new file mode 100644 index 0000000..ef60092 --- /dev/null +++ b/A1/graphs/theor_speedup.tex @@ -0,0 +1,35 @@ +% This file was created by tikzplotlib v0.9.4. +\begin{tikzpicture} + +\definecolor{color0}{rgb}{0.886274509803922,0.290196078431373,0.2} + +\begin{axis}[ +axis background/.style={fill=white!89.8039215686275!black}, +axis line style={white}, +tick align=outside, +tick pos=left, +x grid style={white}, +xlabel={Number of threads \(\displaystyle n_{tr}\)}, +xmajorgrids, +xmin=-2.15, xmax=67.15, +xtick style={color=white!33.3333333333333!black}, +y grid style={white}, +ylabel={Speed-up \(\displaystyle S\)}, +ymajorgrids, +ymin=0.814705882352941, ymax=4.89117647058824, +ytick style={color=white!33.3333333333333!black} +] +\addplot [ultra thick, color0, mark=*, mark size=3, mark options={solid}] +table {% +1 1 +2 1.66666666666667 +4 2.5 +8 3.33333333333333 +16 4 +32 4.44444444444445 +48 4.61538461538462 +64 4.70588235294118 +}; +\end{axis} + +\end{tikzpicture}