Skip to content
Snippets Groups Projects
Commit 29c9c135 authored by clac16's avatar clac16
Browse files

Uma tentativa fracassada de resumo

parent f8738911
Branches
No related tags found
No related merge requests found
%%
%% This is file `caption2.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% caption2.dtx (with options: `package')
%%
%% Copyright (C) 1994-2002 Axel Sommerfeldt (caption@sommerfeldt.net)
%%
%% --------------------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.2
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.2 or later is part of all distributions of LaTeX
%% version 1999/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{caption2}
[2002/08/03 v2.1 Customising captions (AS)]
\newcommand*\captionfont{}
\newcommand*\captionlabelfont{}
\newcommand*\captionlabeldelim{}
\newcommand*\captionlabelsep{}
\newcommand*\captionsize{}
\newdimen\captionmargin
\newdimen\captionwidth
\newif\ifcaptionwidth
\newdimen\captionindent
\newif\ifcaptionlabel\captionlabeltrue
\newif\ifonelinecaptions
\newif\ifignoreLTcapwidth
\newcommand*\setcaptionmargin{%
\captionwidthfalse
\setlength\captionmargin}
\newcommand*\setcaptionwidth{%
\captionwidthtrue
\setlength\captionwidth}
\newcommand*\normalcaptionparams{%
\let\captionsize\@empty
\renewcommand*\captionfont{\captionsize}%
\let\captionlabelfont\@empty%
\renewcommand*\captionlabeldelim{:}%
\renewcommand*\captionlabelsep{\space}%
\setcaptionmargin\z@\setlength\captionindent\z@
\onelinecaptionstrue}
\newcommand*\caption@eh{%
If you do not understand this error, please take a closer look\MessageBreak
at the documentation of the `caption2' package.\MessageBreak
\@ehc}
\newcommand*\defcaptionstyle[1]{%
\@namedef{caption@@#1}}
\newcommand*\newcaptionstyle[1]{%
\expandafter\ifx\csname caption@@#1\endcsname\relax
\expandafter\defcaptionstyle
\else
\PackageError{caption2}{Caption style `#1' already defined}{\caption@eh}%
\expandafter\@gobbletwo
\fi
{#1}}
\newcommand*\renewcaptionstyle[1]{%
\expandafter\ifx\csname caption@@#1\endcsname\relax
\PackageError{caption2}{Caption style `#1' undefined}{\caption@eh}%
\expandafter\@gobbletwo
\else
\expandafter\defcaptionstyle
\fi
{#1}}
\newcommand*\dummycaptionstyle[2]{%
\defcaptionstyle{#1}{%
\expandafter\ifx\csname caption@@\caption@style\expandafter\endcsname%
\csname caption@@#1\endcsname
\PackageError{caption2}{You can't use the caption style `#1' directy}{%
The caption style `#1' is only a dummy and does not really exists.%
\MessageBreak You have to redefine it (with \protect\renewcaptionstyle)
before you can select\MessageBreak it with \protect\captionstyle.
\space\caption@eh}%
\else
#2\usecaptionstyle{\caption@style}%
\fi}}
\newcaptionstyle{normal}{\caption@makecaption{normal}}
\newcaptionstyle{center}{\caption@makecaption{center}}
\newcaptionstyle{centerlast}{\caption@makecaption{centerlast}}
\newcaptionstyle{flushleft}{\caption@makecaption{flushleft}}
\newcaptionstyle{flushright}{\caption@makecaption{flushright}}
\newcaptionstyle{hang}{\caption@makecaption{hang}}
\newcaptionstyle{hang+center}{\caption@makecaption{hang@center}}
\newcaptionstyle{hang+centerlast}{\caption@makecaption{hang@centerlast}}
\newcaptionstyle{hang+flushleft}{\caption@makecaption{hang@flushleft}}
\newcaptionstyle{indent}{\caption@makecaption{indent}}
\newcommand*\captionstyle[1]{%
\expandafter\ifx\csname caption@@#1\endcsname\relax
\PackageError{caption2}{Undefined caption style `#1'}{\caption@eh}%
\else
\def\caption@style{#1}%
\fi}
\DeclareOption{normal}{\captionstyle{normal}}
\DeclareOption{center}{\captionstyle{center}}
\DeclareOption{centerlast}{\captionstyle{centerlast}}
\DeclareOption{flushleft}{\captionstyle{flushleft}}
\DeclareOption{flushright}{\captionstyle{flushright}}
\DeclareOption{anne}{\ExecuteOptions{centerlast}}
\DeclareOption{hang}{\captionstyle{hang}}
\DeclareOption{hang+center}{\captionstyle{hang+center}}
\DeclareOption{hang+centerlast}{\captionstyle{hang+centerlast}}
\DeclareOption{hang+flushleft}{\captionstyle{hang+flushleft}}
\DeclareOption{isu}{\ExecuteOptions{hang}}
\DeclareOption{indent}{\captionstyle{indent}}
\DeclareOption{scriptsize}{\g@addto@macro\captionsize\scriptsize}
\DeclareOption{footnotesize}{\g@addto@macro\captionsize\footnotesize}
\DeclareOption{small}{\g@addto@macro\captionsize\small}
\DeclareOption{normalsize}{\g@addto@macro\captionsize\normalsize}
\DeclareOption{large}{\g@addto@macro\captionsize\large}
\DeclareOption{Large}{\g@addto@macro\captionsize\Large}
\DeclareOption{up}{\g@addto@macro\captionlabelfont\upshape}
\DeclareOption{it}{\g@addto@macro\captionlabelfont\itshape}
\DeclareOption{sl}{\g@addto@macro\captionlabelfont\slshape}
\DeclareOption{sc}{\g@addto@macro\captionlabelfont\scshape}
\DeclareOption{md}{\g@addto@macro\captionlabelfont\mdseries}
\DeclareOption{bf}{\g@addto@macro\captionlabelfont\bfseries}
\DeclareOption{rm}{\g@addto@macro\captionlabelfont\rmfamily}
\DeclareOption{sf}{\g@addto@macro\captionlabelfont\sffamily}
\DeclareOption{tt}{\g@addto@macro\captionlabelfont\ttfamily}
\DeclareOption{oneline}{\onelinecaptionstrue}
\DeclareOption{nooneline}{\onelinecaptionsfalse}
\newcommand*\caption@package[1]{\@namedef{caption@pkt@#1}}
\DeclareOption{float}{\caption@twozerofalse\caption@package{float}{1}}
\DeclareOption{longtable}{\caption@twozerofalse\caption@package{longtable}{1}}
\DeclareOption{subfigure}{\caption@twozerofalse\caption@package{subfigure}{1}}
\DeclareOption{none}{\caption@twozerofalse
\caption@package{float}{0}\caption@package{longtable}{0}%
\caption@package{subfigure}{0}}
\DeclareOption{all}{\ExecuteOptions{float,longtable,subfigure}}
\DeclareOption{ruled}{}
\DeclareOption{ignoreLTcapwidth}{\ignoreLTcapwidthtrue}
\DeclareOption{debug}{\caption@debugtrue}
\newif\ifcaption@debug
\newif\ifcaption@twozero
\normalcaptionparams
\ExecuteOptions{none,normal}
\caption@twozerotrue
\ProcessOptions*
\ifcaption@twozero
\PackageInfo{caption2}{Running in caption2 v2.0 compatibility mode}
\fi
\def\captionof{\@ifstar{\caption@of{\caption*}}{\caption@of\caption}}
\newcommand*\caption@of[2]{\def\@captype{#2}#1}
\@ifundefined{abovecaptionskip}{%
\newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{}
\@ifundefined{belowcaptionskip}{%
\newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{}
\newdimen\captionlinewidth
\renewcommand\@makecaption[2]{%
\vskip\abovecaptionskip
\captionlinewidth\hsize
\def\captionlabel{#1}%
\def\captiontext{#2}%
\usecaptionstyle{\caption@style}%
\vskip\belowcaptionskip}
\newcommand*\usecaptionstyle[1]{%
\ifx\captiontext\relax
\PackageError{caption2}{You can't use \protect#1
in normal text}{The usage of \protect#1 is only
allowed inside code declared with\MessageBreak \protect\defcaptionstyle,
\protect\newcaptionstyle \space or \protect\renewcaptionstyle.
\space\caption@eh}
\else
\@ifundefined{caption@@#1}%
{\PackageError{caption2}{Caption style `#1' undefined}{\caption@eh}}%
{\@nameuse{caption@@#1}}
\fi}
\newcommand*\caption@makecaption[1]{%
\ifcaptionlabel
\def\caption@label{{\captionlabelfont\captionlabel\captionlabeldelim}\captionlabelsep}%
\else
\let\caption@label\@empty
\fi
\usecaptionmargin\captionfont
\onelinecaption{\caption@label\captiontext}%
{\@nameuse{caption@@@#1}}}
\newcommand*\caption@@@normal{%
\caption@label\captiontext\par}
\newcommand*\caption@@@center{%
\centering\caption@label\captiontext\par}%
\newcommand*\caption@centerlast{%
\advance\leftskip by 0pt plus 1fil%
\advance\rightskip by 0pt plus -1fil%
\parfillskip0pt plus 2fil\relax}
\newcommand*\caption@@@centerlast{%
\caption@centerlast\caption@label\captiontext\par}
\newcommand*\caption@@@flushleft{%
\raggedright\caption@label\captiontext\par}%
\newcommand*\caption@@@flushright{%
\raggedleft\caption@label\captiontext\par}%
\newcommand*\caption@@@hang{%
\sbox\@tempboxa{\caption@label}%
\hangindent\wd\@tempboxa\noindent
\usebox\@tempboxa\caption@hangplus\captiontext\par}
\newcommand*\caption@hangplus{}
\newcommand*\caption@@@hang@center{%
\let\caption@hangplus\centering\caption@@@hang}
\newcommand*\caption@@@hang@centerlast{%
\let\caption@hangplus\caption@centerlast\caption@@@hang}
\newcommand*\caption@@@hang@flushleft{%
\let\caption@hangplus\raggedright\caption@@@hang}
\newcommand*\caption@@@indent{%
\hangindent\captionindent\noindent
\caption@label\captiontext\par}
\newcommand\onelinecaption[1]{%
\let\next\@firstofone
\ifonelinecaptions
\sbox\@tempboxa{#1}%
\ifdim\wd\@tempboxa >\captionlinewidth
\else
\def\next{{\centering\usebox{\@tempboxa}\par}\@gobble}%
\fi
\fi\next}
\newcommand*\usecaptionmargin{%
\ifcaptionwidth
\leftskip\captionlinewidth
\advance\leftskip by -\captionwidth
\divide\leftskip by 2
\rightskip\leftskip
\captionlinewidth\captionwidth
\else
\leftskip\captionmargin
\rightskip\captionmargin
\advance\captionlinewidth by -2\captionmargin
\fi}
\renewcommand*\caption@package[3]{%
\if1\@nameuse{caption@pkt@#1}%
\@ifundefined{#2}%
{\let\next\AtBeginDocument}%
{\let\next\@firstofone}%
\else
\ifcaption@twozero
\@ifundefined{#2}{#3\let\next\@gobble}{%
\PackageWarning{caption2}{%
The `#1' package will be supported without explicit option %
(v2.0 compatibility issue)}%
\let\next\@firstofone}%
\else
#3\let\next\@gobble
\fi
\fi
\expandafter\let\csname caption@pkt@#1\endcsname\undefined
\ifcaption@debug
\ifx\next\@gobble\PackageInfo{caption2}{#1 => gobble}%
\else\ifx\next\@firstofone\PackageInfo{caption2}{#1 => firstofone}%
\else\ifx\next\AtBeginDocument\PackageInfo{caption2}{#1 => AtBeginDocument}%
\else\PackageInfo{caption2}{#1 => ???}\fi\fi\fi
\fi
\next}
\caption@package{float}{floatc@plain}{}{%
\ifx\floatc@plain\relax
\PackageWarning{caption2}{%
Option `float' was set but there is no float package loaded}
\else
\PackageInfo{caption2}{float package v1.2 (or newer) detected}
\newcommand\caption@floatc[3]{%
\ifx\captionlabelfont\@empty
\let\captionlabelfont\@fs@cfont
\fi
\captionlinewidth\hsize
\def\captionlabel{#2}%
\def\captiontext{#3}%
\usecaptionstyle{#1}}
\renewcommand*\floatc@plain{\caption@floatc{\caption@style}}
\@ifpackagewith{caption2}{ruled}{%
\dummycaptionstyle{ruled}{\onelinecaptionsfalse\setcaptionmargin{\z@}}%
}{%
\newcaptionstyle{ruled}{%
\ifcaptionlabel
{\@fs@cfont\captionlabel}\space%
\fi\captiontext\par}%
}
\renewcommand*\floatc@ruled{\caption@floatc{ruled}}
\renewcommand*\caption@of[2]{\def\@captype{#2}%
\@ifundefined{fst@#2}{}{%
\@nameuse{fst@#2}%
\@ifundefined{@float@setevery}{}{\@float@setevery{#2}}%
\let\caption@fs@capt\@fs@capt
\let\@fs@capt\caption@of@float}
#1}
\newcommand\caption@of@float[2]{\egroup
\vskip\abovecaptionskip
\normalsize\caption@fs@capt{#1}{#2}%
\vskip\belowcaptionskip
\bgroup}%
\fi}
\caption@package{longtable}{LT@makecaption}{}{%
\ifx\LT@makecaption\relax
\PackageWarning{caption2}{%
Option `longtable' was set but there is no longtable package loaded}
\else
\PackageInfo{caption2}{longtable package v3.15 (or newer) detected}
\dummycaptionstyle{longtable}{}
\renewcommand\LT@makecaption[3]{%
\LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\hsize{%
\ifignoreLTcapwidth
\else
\setcaptionwidth\LTcapwidth
\fi
\captionlinewidth\hsize
\captionlabelfalse#1\captionlabeltrue
\def\captionlabel{#2}%
\def\captiontext{#3}%
\usecaptionstyle{longtable}%
\endgraf\vskip\baselineskip}%
\hss}}}
\fi}
\newcommand*\setsubcapstyle{%
\@ifundefined{subcapraggedrightfalse}{%
\newif\ifsubcapraggedright}{}%
\ifsubcaphang
\ifsubcapcenter
\subcapstyle{hang+center}%
\else\ifsubcapcenterlast
\subcapstyle{hang+centerlast}%
\else\ifsubcapraggedright
\subcapstyle{hang+flushleft}%
\else
\subcapstyle{hang}%
\fi\fi\fi
\else\ifsubcapcenter
\subcapstyle{center}%
\else\ifsubcapcenterlast
\subcapstyle{centerlast}%
\else\ifsubcapraggedright
\subcapstyle{flushleft}%
\else
\subcapstyle{normal}%
\fi\fi\fi\fi}
\newcommand\caption@makesubcaption[2]{%
\renewcommand*\captionfont{\subcapsize\subcapfont}%
\renewcommand*\captionlabelfont{\normalfont\subcapsize\subcaplabelfont}%
\let\captionlabeldelim\subcaplabeldelim
\let\captionlabelsep\subcaplabelsep
\ifsubfigcapwidth\captionwidthtrue\else\captionwidthfalse\fi
\setlength\captionmargin\subfigcapmargin
\setlength\captionwidth\subfigcapwidth
\captionindent\subcapindent
\ifsubcapnooneline\onelinecaptionsfalse\else\onelinecaptionstrue\fi
\hbox to\@tempdima{%
\caption@subfig@hss\parbox[t]{\@tempdima}{%
\captionlinewidth\@tempdima
\captionlabeltrue
\def\captionlabel{#1}%
\def\captiontext{\ignorespaces #2}%
\usecaptionstyle{\caption@substyle}}%
\caption@subfig@hss}}
\caption@package{subfigure}{@makesubfigurecaption}{%
\let\setsubcapstyle\undefined
\let\caption@makesubcaption\undefined}{%
\ifx\@makesubfigurecaption\relax
\PackageWarning{caption2}{%
Option `subfigure' was set but there is no subfigure package loaded}
\let\setsubcapstyle\undefined
\let\caption@makesubcaption\undefined
\else
\ifx\subcapfont\undefined
\PackageInfo{caption2}{subfigure package v2.0 detected}
\let\subcapfont\@empty
\newcommand*\subfigcapwidth{\z@}
\newcommand*\setsubcapmargin{%
\subfigcapwidthfalse
\renewcommand*\subfigcapmargin}
\newcommand*\setsubcapwidth{%
\subfigcapwidthtrue
\renewcommand*\subfigcapwidth}
\newcommand*\subcaplabelsep{\space}
\let\caption@subfig@hss\hfil
\else
\PackageInfo{caption2}{subfigure package v2.1 (or newer) detected}
\newdimen\subfigcapwidth
\newcommand*\setsubcapmargin{%
\subfigcapwidthfalse
\setlength\subfigcapmargin}
\newcommand*\setsubcapwidth{%
\subfigcapwidthtrue
\setlength\subfigcapwidth}
\newcommand*\subcaplabelsep{\hskip\subfiglabelskip}
\let\caption@subfig@hss\hss
\fi
\newif\ifsubfigcapwidth
\newdimen\subcapindent
\newcommand*\subcaplabeldelim{}
\newcommand*\subcapstyle[1]{%
\expandafter\ifx\csname caption@@#1\endcsname\relax
\PackageError{caption2}{Undefined caption style `#1'}{\caption@eh}%
\else
\def\caption@substyle{#1}%
\fi}
\setsubcapstyle
\renewcommand*\@thesubfigure{\thesubfigure}
\renewcommand*\@thesubtable{\thesubtable}
\let\@makesubfigurecaption\caption@makesubcaption
\let\@makesubtablecaption\caption@makesubcaption
\fi}
\let\caption@package\undefined
\endinput
%%
%% End of file `caption2.sty'.
\relax
\providecommand\babel@aux[2]{}
\@nameuse{bbl@beforestart}
\catcode `"\active
\citation{kasliwal2017}
\citation{davis2021}
\citation{halbiniak2022}
\citation{che2009rodinia}
\babel@aux{brazil}{}
\@writefile{toc}{\contentsline {section}{\numberline {1}Introdução}{1}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2}Os testes}{1}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {3}Resultados}{2}{}\protected@file@percent }
\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Tempos de execução médios para diferentes parâmetros de compilação\relax }}{3}{}\protected@file@percent }
\providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}}
\newlabel{tab:resultados-medios}{{1}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Análise dos códigos}{3}{}\protected@file@percent }
\newlabel{list:pfilter.c.1}{{1}{3}}
\@writefile{lol}{\contentsline {lstlisting}{\numberline {1}{\ignorespaces Segmento de particle-filter (linhas 288--293)}}{3}{}\protected@file@percent }
\newlabel{list:pfilter.c.2}{{2}{3}}
\@writefile{lol}{\contentsline {lstlisting}{\numberline {2}{\ignorespaces Segmento de particle-filter (linhas 499--504)}}{3}{}\protected@file@percent }
\bibstyle{sbc}
\bibdata{sbc-template}
\bibcite{che2009rodinia}{Che et~al. 2009}
\bibcite{davis2021}{Davis et~al. 2021}
\newlabel{list:pfilter.c.3}{{3}{4}}
\@writefile{lol}{\contentsline {lstlisting}{\numberline {3}{\ignorespaces Segmento de particle-filter (linhas 439--441)}}{4}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {5}Impacto da vetorização}{4}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {6}Conclusão}{4}{}\protected@file@percent }
\bibcite{halbiniak2022}{Halbiniak et~al. 2022}
\bibcite{kasliwal2017}{Kasliwal and Vladimirov 2017}
\gdef \@abspage@last{5}
\begin{thebibliography}{}
\bibitem[Che et~al. 2009]{che2009rodinia}
Che, S., Boyer, M., Meng, J., Tarjan, D., Sheaffer, J.~W., Lee, S.-H., and
Skadron, K. (2009).
\newblock Rodinia: A benchmark suite for heterogeneous computing.
\newblock In {\em 2009 IEEE international symposium on workload
characterization (IISWC)}, pages 44--54. Ieee.
\bibitem[Davis et~al. 2021]{davis2021}
Davis, J.~H., Daley, C., Pophale, S., Huber, T., Chandrasekaran, S., and
Wright, N.~J. (2021).
\newblock Performance assessment of openmp compilers targeting nvidia v100
gpus.
\newblock In {\em Accelerator Programming Using Directives: 7th International
Workshop, WACCPD 2020, Virtual Event, November 20, 2020, Proceedings 7},
pages 25--44. Springer.
\bibitem[Halbiniak et~al. 2022]{halbiniak2022}
Halbiniak, K., Wyrzykowski, R., Szustak, L., Kulawik, A., Meyer, N., and
Gepner, P. (2022).
\newblock Performance exploration of various c/c++ compilers for amd epyc
processors in numerical modeling of solidification.
\newblock {\em Advances in Engineering Software}, 166:103078.
\bibitem[Kasliwal and Vladimirov 2017]{kasliwal2017}
Kasliwal, V. and Vladimirov, A. (2017).
\newblock A performance-based comparison of c/c++ compilers.
\end{thebibliography}
@article{halbiniak2022,
title={Performance exploration of various C/C++ compilers for AMD EPYC processors in numerical modeling of solidification},
author={Halbiniak, Kamil and Wyrzykowski, Roman and Szustak, Lukasz and Kulawik, Adam and Meyer, Norbert and Gepner, Pawel},
journal={Advances in Engineering Software},
volume={166},
pages={103078},
year={2022},
publisher={Elsevier}
}
@misc{kasliwal2017,
title={A performance-based comparison of C/C++ compilers},
author={Kasliwal, Vishal and Vladimirov, Andrey},
year={2017},
publisher={Colfax International. Nov}
}
@inproceedings{davis2021,
title={Performance assessment of OpenMP compilers targeting NVIDIA V100 GPUs},
author={Davis, Joshua Hoke and Daley, Christopher and Pophale, Swaroop and Huber, Thomas and Chandrasekaran, Sunita and Wright, Nicholas J},
booktitle={Accelerator Programming Using Directives: 7th International Workshop, WACCPD 2020, Virtual Event, November 20, 2020, Proceedings 7},
pages={25--44},
year={2021},
organization={Springer}
}
@inproceedings{che2009rodinia,
title={Rodinia: A benchmark suite for heterogeneous computing},
author={Che, Shuai and Boyer, Michael and Meng, Jiayuan and Tarjan, David and Sheaffer, Jeremy W and Lee, Sang-Ha and Skadron, Kevin},
booktitle={2009 IEEE international symposium on workload characterization (IISWC)},
pages={44--54},
year={2009},
organization={Ieee}
}
This is BibTeX, Version 0.99d (TeX Live 2023/Fedora 40)
Capacity: max_strings=200000, hash_size=200000, hash_prime=170003
The top-level auxiliary file: sbc-template.aux
The style file: sbc.bst
Database file #1: sbc-template.bib
You've used 4 entries,
1935 wiz_defined-function locations,
497 strings with 4727 characters,
and the built_in function-call counts, 2048 in all, are:
= -- 196
> -- 117
< -- 3
+ -- 44
- -- 42
* -- 173
:= -- 352
add.period$ -- 13
call.type$ -- 4
change.case$ -- 41
chr.to.int$ -- 4
cite$ -- 4
duplicate$ -- 74
empty$ -- 122
format.name$ -- 48
if$ -- 405
int.to.chr$ -- 1
int.to.str$ -- 0
missing$ -- 3
newline$ -- 22
num.names$ -- 12
pop$ -- 43
preamble$ -- 1
purify$ -- 41
quote$ -- 0
skip$ -- 56
stack$ -- 0
substring$ -- 116
swap$ -- 17
text.length$ -- 2
text.prefix$ -- 0
top$ -- 0
type$ -- 24
warning$ -- 0
while$ -- 15
width$ -- 0
write$ -- 53
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Fedora 40) (preloaded format=pdflatex 2024.12.2) 6 FEB 2025 03:45
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**resumo-erad.tex
(./resumo-erad.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-22>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2022/07/02 v1.4n Standard LaTeX file (size option)
)
\c@part=\count185
\c@section=\count186
\c@subsection=\count187
\c@subsubsection=\count188
\c@paragraph=\count189
\c@subparagraph=\count190
\c@figure=\count191
\c@table=\count192
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
) (./sbc-template.sty
Package: sbc-template 2001/06/09
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2020/01/02 v5.9 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
(/usr/share/texlive/texmf-dist/tex/generic/iftex/ifvtex.sty
Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
))
\Gm@cnth=\count193
\Gm@cntv=\count194
\c@Gm@tempcnt=\count195
\Gm@bindingoffset=\dimen141
\Gm@wd@mp=\dimen142
\Gm@odd@mp=\dimen143
\Gm@even@mp=\dimen144
\Gm@layoutwidth=\dimen145
\Gm@layoutheight=\dimen146
\Gm@layouthoffset=\dimen147
\Gm@layoutvoffset=\dimen148
\Gm@dimlist=\toks17
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2023/03/12 v3.6j Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2023/03/12 v2.4 caption3 kernel (AR)
\caption@tempdima=\dimen149
\captionmargin=\dimen150
\caption@leftmargin=\dimen151
\caption@rightmargin=\dimen152
\caption@width=\dimen153
\caption@indent=\dimen154
\caption@parindent=\dimen155
\caption@hangindent=\dimen156
Package caption Info: Standard document class detected.
)
\c@caption@flags=\count196
\c@continuedfloat=\count197
)
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty
Package: times 2020/03/25 PSNFSS-v9.3 (SPQR)
)
\c@instn=\count198
(/usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.sty
Package: titlesec 2021/07/05 v2.14 Sectioning titles
\ttl@box=\box51
\beforetitleunit=\skip50
\aftertitleunit=\skip51
\ttl@plus=\dimen157
\ttl@minus=\dimen158
\ttl@toksa=\toks18
\titlewidth=\dimen159
\titlewidthlast=\dimen160
\titlewidthfirst=\dimen161
)
(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count199
))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 107.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex
))
\Gin@req@height=\dimen162
\Gin@req@width=\dimen163
)
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip16
Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
)
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2021/02/14 v1.3d Input encoding file
\inpenc@prehook=\toks19
\inpenc@posthook=\toks20
)
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
Package: babel 2023/02/13 3.86 The Babel package
\babel@savecnt=\count266
\U@D=\dimen164
\l@unhyphenated=\language48
(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def)
\bbl@readstream=\read2
\bbl@dirlevel=\count267
(/usr/share/texlive/texmf-dist/tex/generic/babel-portuges/brazil.ldf
Language: portuges 2021/07/09 v1.2t Portuguese support from the babel system
Package babel Info: Hyphen rules for 'brazil' set to \l@portuguese
(babel) (\language38). Reported on input line 111.
Package babel Info: Making " an active character on input line 143.
))
(/usr/share/texlive/texmf-dist/tex/latex/csvsimple/csvsimple.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2023-02-22 L3 programming layer (loader)
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2023-01-16 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count268
\l__pdf_internal_box=\box52
))
Package: l3keys2e 2023-02-02 LaTeX2e option processing using LaTeX3 keys
)
Package: csvsimple 2022/09/20 v2.3.2 LaTeX CSV file processing
)
(/usr/share/texlive/texmf-dist/tex/latex/csvsimple/csvsimple-legacy.sty
Package: csvsimple-legacy 2022/09/20 version 2.3.2 LaTeX2e CSV file processing
(/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty
(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
\pgfutil@everybye=\toks21
\pgfutil@tempdima=\dimen165
\pgfutil@tempdimb=\dimen166
)
(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
\pgfutil@abb=\box53
)
(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
(/usr/share/texlive/texmf-dist/tex/generic/pgf/pgf.revision.tex)
Package: pgfrcs 2023-01-15 v3.1.10 (3.1.10)
))
(/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
\pgfkeys@pathtoks=\toks22
\pgfkeys@temptoks=\toks23
(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeyslibraryfiltered
.code.tex
\pgfkeys@tmptoks=\toks24
))) (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2022/04/13 v1.1d Standard LaTeX ifthen package (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/tools/shellesc.sty
Package: shellesc 2019/11/08 v1.0c unified shell escape interface for LaTeX
Package shellesc Info: Restricted shell escape enabled on input line 77.
)
\csv@file=\read3
\c@csvinputline=\count269
\c@csvrow=\count270
\c@csvcol=\count271
\csv@out=\write3
)
(/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty
Package: array 2022/09/04 v2.5g Tabular extension package (FMi)
\col@sep=\dimen167
\ar@mcellbox=\box54
\extrarowheight=\dimen168
\NC@list=\toks25
\extratabsurround=\skip52
\backup@length=\skip53
\ar@cellbox=\box55
)
(/usr/share/texlive/texmf-dist/tex/latex/makecell/makecell.sty
Package: makecell 2009/08/03 V0.1e Managing of Tab Column Heads and Cells
\rotheadsize=\dimen169
\c@nlinenum=\count272
\TeXr@lab=\toks26
)
(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.sty
\lst@mode=\count273
\lst@gtempboxa=\box56
\lst@token=\toks27
\lst@length=\count274
\lst@currlwidth=\dimen170
\lst@column=\count275
\lst@pos=\count276
\lst@lostspace=\dimen171
\lst@width=\dimen172
\lst@newlines=\count277
\lst@lineno=\count278
\lst@maxwidth=\dimen173
(/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty
File: lstmisc.sty 2023/02/27 1.9 (Carsten Heinz)
\c@lstnumber=\count279
\lst@skipnumbers=\count280
\lst@framebox=\box57
)
(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.cfg
File: listings.cfg 2023/02/27 1.9 listings configuration
))
Package: listings 2023/02/27 1.9 (Carsten Heinz)
LaTeX Font Info: Trying to load font information for OT1+ptm on input line 2
1.
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1ptm.fd
File: ot1ptm.fd 2001/06/04 font definitions for OT1/ptm.
) (./resumo-erad.aux)
\openout1 = `resumo-erad.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 21.
LaTeX Font Info: ... okay on input line 21.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 21.
LaTeX Font Info: ... okay on input line 21.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 21.
LaTeX Font Info: ... okay on input line 21.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 21.
LaTeX Font Info: ... okay on input line 21.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 21.
LaTeX Font Info: ... okay on input line 21.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 21.
LaTeX Font Info: ... okay on input line 21.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 21.
LaTeX Font Info: ... okay on input line 21.
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result:
* driver: pdftex
* paper: a4paper
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes:
* h-part:(L,W,R)=(85.35826pt, 426.79135pt, 85.35826pt)
* v-part:(T,H,B)=(99.58464pt, 674.33032pt, 71.13188pt)
* \paperwidth=597.50787pt
* \paperheight=845.04684pt
* \textwidth=426.79135pt
* \textheight=674.33032pt
* \oddsidemargin=13.08827pt
* \evensidemargin=13.08827pt
* \topmargin=-9.68535pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=12.0pt
* \footskip=30.0pt
* \marginparwidth=44.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.8pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: listings package is loaded.
Package caption Info: End \AtBeginDocument code.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count281
\scratchdimen=\dimen174
\scratchbox=\box58
\nofMPsegments=\count282
\nofMParguments=\count283
\everyMPshowfont=\toks28
\MPscratchCnt=\count284
\MPscratchDim=\dimen175
\MPnumerator=\count285
\makeMPintoPDFobject=\count286
\everyMPtoPDFconversion=\toks29
) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
85.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
\c@lstlisting=\count287
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 23.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 23.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 23.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line 89.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 89.
LaTeX Font Info: Trying to load font information for OT1+pcr on input line 9
4.
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1pcr.fd
File: ot1pcr.fd 2001/06/04 font definitions for OT1/pcr.
) [1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}{/usr/share/texlive/texmf-di
st/fonts/enc/dvips/base/8r.enc}]
Underfull \hbox (badness 1442) in paragraph at lines 133--147
\OT1/ptm/m/n/12 ling, mas n[]ao com GCC. E, por de-fault, ICC usa um mo-delo de
ponto flu-tu-
[]
Overfull \hbox (2.30893pt too wide) in paragraph at lines 152--158
[][]
[]
LaTeX Font Info: Trying to load font information for OT1+phv on input line 1
58.
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1phv.fd
File: ot1phv.fd 2020/03/25 scalable font definitions for OT1/phv.
)
LaTeX Warning: `h' float specifier changed to `ht'.
Underfull \hbox (badness 1014) in paragraph at lines 175--180
\OT1/ptm/m/n/12 grama particle-filter. Fo-ram es-co-lhi-dos os c[]odigos ge-ra-
dos com as flags \OT1/pcr/m/n/12 -O3 \OT1/ptm/m/n/12 e
[]
Underfull \vbox (badness 1484) has occurred while \output is active []
[2]
LaTeX Font Info: Trying to load font information for OML+ptm on input line 1
88.
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/omlptm.fd
File: omlptm.fd
)
LaTeX Font Info: Font shape `OML/ptm/m/n' in size <10.95> not available
(Font) Font shape `OML/cmm/m/it' tried instead on input line 188.
LaTeX Font Info: Trying to load font information for OMS+ptm on input line 1
88.
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/omsptm.fd
File: omsptm.fd
)
LaTeX Font Info: Font shape `OMS/ptm/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 188.
[3]
LaTeX Font Info: Font shape `OML/ptm/m/n' in size <12> not available
(Font) Font shape `OML/cmm/m/it' tried instead on input line 243.
LaTeX Font Info: Font shape `OMS/ptm/m/n' in size <12> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 243.
(./resumo-erad.bbl [4]) [5] (./resumo-erad.aux) )
Here is how much of TeX's memory you used:
8515 strings out of 477136
149120 string characters out of 5813382
1871388 words of memory out of 6000000
28679 multiletter control sequences out of 15000+600000
538270 words of font info for 75 fonts, out of 8000000 for 9000
430 hyphenation exceptions out of 8191
72i,19n,77p,304b,1576s stack positions out of 10000i,1000n,20000p,200000b,200000s
</usr/share/texlive/texmf-dist
/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/share/texlive/texmf-dist/fonts
/type1/public/amsfonts/cm/cmmi12.pfb></usr/share/texlive/texmf-dist/fonts/type1
/public/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public
/amsfonts/cm/cmr12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfon
ts/cm/cmr8.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
sy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/courier/ucrr8a.pfb></us
r/share/texlive/texmf-dist/fonts/type1/urw/helvetic/uhvb8a.pfb></usr/share/texl
ive/texmf-dist/fonts/type1/urw/times/utmb8a.pfb></usr/share/texlive/texmf-dist/
fonts/type1/urw/times/utmbi8a.pfb></usr/share/texlive/texmf-dist/fonts/type1/ur
w/times/utmr8a.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/times/utmri8a
.pfb>
Output written on resumo-erad.pdf (5 pages, 145715 bytes).
PDF statistics:
81 PDF objects out of 1000 (max. 8388607)
49 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
File added
\documentclass[12pt]{article}
\usepackage{sbc-template}
\usepackage{graphicx,url}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\usepackage{csvsimple}
\usepackage{array}
\usepackage{makecell}
\usepackage{listings}
\sloppy
\title{Comparação de compiladores C/C++ para processadores x86}
\author{Cristopher Carcereri \inst{1}}
\address{Departamento de Informática -- Universidade Federal do Paraná (UFPR)}
\begin{document}
\maketitle
\begin{resumo}
A escolha de compilador pode afetar significativamente a performance de
aplicações.
Este artigo busca avaliar o impacto de diferentes compiladores C/C++ em
aplicações científicas com base no conjunto de benchmarks rodinia e
investigar suas causas.
São testados os compiladores AOCC, Clang, GCC e ICC.
A comparação mostra que o compilador da Intel apresenta uma vantagem
significativa que se deve principalmente a sua capacidade de vetorizar o
código automaticamente.
\end{resumo}
\section{Introdução}
Com aplicações de alta performance escritas em linguagens de alto nível, a
eficiência do código produzido pelo compilador é um fator importante para o uso
de recursos e velocidade de processamento atingida.
%Embora compiladores compartilhem muitas estratégias de otimização básicas, há
%distinção em melhorias específicas, focadas na arquitetura ou implementação, que
%podem resultar em variações significativas de desempenho.
%Em particular, compiladores diferem em sua capacidade de tirar proveito da
%profusão de instruções de arquiteturas x86-64 modernas, com extensões como SSE e
%AVX2.
Entender as diferenças de performance entre os códigos gerados é importante
tanto para programadores e pesquisadores maximizarem a performance de uma
aplicação em uma plataforma de hardware particular, quanto para desenvolvedores
de compiladores identificarem oportunidades de melhorar seu produto.
Este estudo busca explorar o impacto de quatro compiladores C/C++
amplamente usados --- GCC (GNU Compiler Collection), Clang, AOCC (AMD Optimizing
C/C++ Compiler) e ICC (Intel oneAPI DPC++/C++ Compiler) --- no desempenho
de aplicações científicas, usando um conjunto abrangente de benchmarks.
Além de quantificar diferenças no tempo de execução, buscamos investigar as
causas das disparidades observadas.
\cite{kasliwal2017} compara a performance de seis compiladores
C/C++ para Intel Xeon Platinum baseado na arquitetura Skylake usando três
kernels pararelizados com OpenMP.
\cite{davis2021} testou seis compiladores usando cinco aplicações
em sistemas heterogêneos com GPUs Nvidia V100.
Com o maior parte dos compiladores foi empregado OpenMP para o GPU offload, mas
OpenACC e CUDA e também foram utilizados .
\cite{halbiniak2022} examina cinco compiladores para
processadores AMD EPYC Rome usando duas implementações, paralelizadas com OpenMP,
de modelagem numérica da solidificação de ligas.
Nos três casos, a avaliação mostrou que o desempenho dos compiladores varia
substancialmente.
\section{Os testes}
Para comparar a performance, foi adotado o conjunto de benchmarks Rodinia
(versão 3.1), que pode ser facilmente obtido e testado e que implementa uma
variedade de programas paralelos úteis para aplicações científicas
\cite{che2009rodinia}.
Para os testes, foram selecionados 17 (de um total de 19) implementações usando
a API OpenMP.\footnote
{O programa MUMmerGPU foi excluído porque emprega, também, CUDA, não suportado
pelas versões mais recentes dos compiladores.
O programa lud mostrou uma imensa sensibilidade ao compilador e as flags, então
teria um impacto desproporcional na performance média.
A razão entre o maior e menor tempo de execução para lud é cerca de \(17.5\).
Dentre os demais programas, a maior razão é \(3.3\), e a média (aritmética)
das razões é \(1.7\).
}
Foram feitas algumas modificações à versão original do Rodinia.
Em especial, os makefiles foram alterados para simplificar a compilação com
diferentes parâmetros e, para reduzir o impacto de I/O na aferição, a saída dos
programas foi direcionada para \texttt{/dev/null}.
Os benchmarks modificados e os scripts usados para teste estão disponíveis
em \url{foo.bar}.
%\subsection{Compiladores testados}
Os compiladores testados foram GCC (14.2.1), clang (19.1.0), ICC (2025.0.1) e
AOCC (5.0).
GCC, parte do projeto GNU, inclui front ends para várias linguagens, assim
como back ends para diversas arquiteturas.
%https://gcc.gnu.org/
%https://en.wikibooks.org/wiki/GNU_C_Compiler_Internals/GNU_C_Compiler_Architecture
Clang é o front end para linguagens na família C para o LLVM.
%https://clang.llvm.org/
O Intel C Compiler também é baseado no LLVM, com a versão 2025.0.1 tendo
LLVM 19.0.0 como back end.
%Comando "icx -x c /dev/null -dM -E|grep clang" para exibir a versão.
AOCC é um fork do Clang que inclui otimizações da AMD, com foco particular
(nas últimas versões) em processadores Zen.
O AOCC 5.0 tem como back end o LLVM 17.0.6.
%https://www.amd.com/pt/developer/aocc.html
Os benchmarks foram compilados e executados em um computador com AMD Ryzen
1700 e 16 GiB de RAM.
Para entender o impacto das otimizações, diferentes conjuntos de flags foram
testados, mas apenas os mais relevantes serão reportados.\footnote
{Os dados completos estão disponíveis em \url{foo.bar}.}
Para cada combinação de benchmark, compilador e flags avaliada mediu-se o
tempo de oito execuções individuais e calculou-se uma média aritmética.
\section{Resultados}
A Tabela~\ref{tab:resultados-medios} mostra a média geométrica dos tempos médios
calculados para os benchmarks com algumas combinações de compilador e flags.
Em todos os casos o desvio padrão geométrico é igual ou inferior a 1.01.
São omitidas a flag de dialeto (\texttt{-std=gnu89}) usada com alguns programas
em C e as flags que habilitam OpenMP (\texttt{-qopenmp} com ICC,
\texttt{-fopenmp} com os demais compiladores).
As diferenças nas flags selecionadas visam compensar variações entre as flags
definidas para compiladores.
Com AOCC, Clang e ICC \texttt{O3} implica loop unrolling, mas não com GCC.
E, por default, ICC usa um modelo de ponto flutuante (\texttt{-fp-model=fast=1})
que habilita otimizações que sacrificam a acurácia da aritmética, ao contrário
dos demais.
O comportamento default destes compiladores foi equiparado com a flag
\texttt{-fp-model=precise} do ICC.\footnote
{A flag \texttt{-fp-model=precise} desabilita otimizações que usam instruções
fma.
Enquanto isso é uma desvantagem para o ICC, reduzindo o ganho com
\texttt{-march=native}, a diferença provavelmente é pouco significativa:
com os demais compiladores, o impacto de instruções fma é inferior a 1\%.
}
\begin{table}[h]
\scriptsize
\centering
\begin{tabular}{| l | c |}
\hline
\textbf{\centering Compilador e flags} & \makecell{\textbf{Tempo de execução} \\ \textbf{(Média Geométrica)}}
\csvreader[head to column names]{tabela-resultados-medios.csv}{}
{\\\hline \FLAGS & \GEOMEANEXLUD}\\\hline
\end{tabular}
\caption{Tempos de execução médios para diferentes parâmetros de compilação}
\label{tab:resultados-medios}
\end{table}
%Reordenar linhas da tabela?
O compilador da Intel obteve o maior desempenho.
Comporando o melhor caso da tabela para cada compilador, ICC superou o GCC em
cerca de 5\%, e GCC superou o Clang em cerca de 4\%.
Para todos os conjuntos de flags testados, a performance média do Clang supera a
do AOCC entre 1\% e 3\%.
Com a flag \texttt{-march=native} há uma melhora sensível nos tempos de execução
para GCC e ICC, enquanto há uma piora para Clang e AOCC, indicando que os dois
têm problemas ao tentar utilizar extensões como AVX2.
\section{Análise dos códigos}
Para investigar as causas das diferenças observadas, analisamos os código
do programa particle-filter.
Foram escolhidos os códigos gerados com as flags \texttt{-O3} e
\texttt{-march=native}, além de \texttt{-funroll-loops} com GCC e
\texttt{-fp-model=precise} com ICC.
A Listagem~\ref{list:pfilter.c.1} contém um segmento do programa.
A seção que o inclui executa aproximadamente \(2.4\) vezes mais rápido no
programa gerado pelo ICC do que no produzido pelo GCC, e aproximadamente \(1.4\)
vezes mais rápido no GCC do que no Clang e AOCC.
\begin{lstlisting}[label=list:pfilter.c.1,basicstyle=\small,
caption={Segmento de particle-filter (linhas 288--293)}]
for(x = 0; x < lengthCDF; x++) {
if(CDF[x] >= value) {
index = x;
break;
}
}
\end{lstlisting}
AOCC e Clang geram, para este trecho, um código praticamente idêntico e
menos otimizado que os dos outros dois compiladores.
O laço principal consiste de 6 instruções, incluindo 1 leitura da memória,
1 comparação ponto flutuante e 2 saltos condicionais.
GCC otimiza o segmento com loop unrolling: o laço principal compara 8
elementos por iteração e consiste de 35 instruções, incluindo 8 leituras da
memória, 8 comparações ponto flutuante e 9 saltos condicionais.
ICC vetoriza o fragmento.
O laço principal realiza comparações e consiste de 12 instruções,
incluindo 4 comparações de (vetores) ponto flutuante lidos da memória
e 2 saltos condicionais.
A Listagem~\ref{list:pfilter.c.2} contém outro segmento de particle-filter.
Os quatro compiladores foram capazes vetorizar este código.
No entanto, GCC usa registradores de 128 bits, enquanto os demais usam
registradores de 256 bits.
GCC realiza loop unrolling com fator 16, e AOCC e CLANG, 8.
ICC não realiza loop unrolling, copiando 4 elementos (um registrador
de 256 bits) por laço.
\begin{lstlisting}[label=list:pfilter.c.2,basicstyle=\small,
caption={Segmento de particle-filter (linhas 499--504)}]
for(x = 0; x < Nparticles; x++){
arrayX[x] = xj[x];
arrayY[x] = yj[x];
weights[x] = 1/((double)(Nparticles));
}
\end{lstlisting}
O segmento na listagem~\ref{list:pfilter.c.2} está dentro de um outro laço,
em que o valor de \texttt{Nparticles} não muda.
Clang e AOCC computam a divisão de ponto flutuante \texttt{1/Nparticles}
cada vez que entram no laço interno.
Já GCC e ICC ambos tiram proveito do fato que o resultado não muda para
computá-lo uma única vez, no laço exterior: o código correspondente ao segmento
apenas carrega este valor.
Nenhum dos compiladores, no entanto, remove toda a atribuição da linha 4.
Outro trecho de particle-filter é apresentado na Listagem~\ref{list:pfilter.c.3}.
Como no primeiro exemplo, apenas o ICC vetoriza o código.
Para tanto, o laço principal mantém quatro acumuladores em um registrador.
Ao sair do laço, o valor dos quatro acumuladores é somado.
Como no segundo exemplo, ICC não realiza loop unrolling.
Já o laço principal do GCC soma dezesseis elementos por iteração.
Clang e AOCC nem vetorizam nem realizam loop unrolling.
\begin{lstlisting}[label=list:pfilter.c.3,caption={Segmento de particle-filter (linhas 439--441)}]
for(x = 0; x < Nparticles; x++){
sumWeights += weights[x];
}
\end{lstlisting}
\section{Impacto da vetorização}
A análise dos códigos demonstra que o compilador da Intel identifica
possibilidades de vetorização automática que os outros compiladores ignoram.
GCC, em especial, mesmo ao vetorizar um código, pode não ser capaz de utilizar
toda a largura dos registradores, como visto para a
Listagem~\ref{list:pfilter.c.2}.
De fato, como mostra a Tabela~\ref{tab:resultados-medios}, ICC é o compilador
mais afetado ao se desabilitar a vetorização automática, com sua performance
média piorando em cerca de 4\%.
A vantagem frente ao GCC é reduzida para cerca de 1\%.
Mas essa diferença não reflete totalmente o efeito da vetorização na performance
do ICC.
A análise do código revela que o código compilado com \texttt{-no-vec} ainda
mantém vetorizações mais simples, incluindo as correspondentes aos segmentos
na Listagem~\ref{list:pfilter.c.2} e Listagem~\ref{list:pfilter.c.3}, em que
não apenas a vetorização é mantida, mas o compilador passa a realizar
loop unrolling para operar sobre oito elementos (dois vetores) por iteração.
\section{Conclusão}
\bibliographystyle{sbc}
\bibliography{sbc-template}
\end{document}
% LaTeX definitions for SBC 2001 style
%
% Created by Jomi Hubner & Rafael Bordini, june 2001
% updated march 2005
% updated december 2017
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{sbc-template}[2001/06/09]
% margem sup 3.5 cm: h� 1,5 cm para header, + 2 cm para top
% margem inf 2.5 cm: h� 1,5 cm para foot, + 1 cm para bottom
% margem esq/dir 3 cm
\RequirePackage[a4paper,top=3.5cm,left=3cm,right=3cm,bottom=2.5cm]{geometry}
\parindent 1.27cm
\parskip 6pt
\flushbottom
% captions
%updated 2017. Change deprecated caption2 to caption package
\RequirePackage[bf,sf,footnotesize,indent]{caption}
\setlength{\captionmargin}{0.8cm}
\renewcommand{\captionfont}{\sffamily\footnotesize\bfseries}
%\renewcommand{\captionlabeldelim}{.}
\captionsetup{labelsep=period}
% font
\RequirePackage{times}
\renewcommand{\normalsize}{\@setfontsize\normalsize\@xiipt\@xivpt}
\newcommand{\XIIIPT}{\@setfontsize\xiiipt{13}{17}}
\newcommand{\XVIPT}{\@setfontsize\xvipt{16}{20}}
% new commands
\newcounter{instn}
\setcounter{instn}{1}
\newcommand{\instnum}{\arabic{instn}}
\newcommand{\inst}[1]{\ensuremath{^{#1}}}
\newcommand{\nextinstitute}{\\\mbox{}\\[-6pt] \addtocounter{instn}{1}\inst{\instnum}}
\newcommand{\email}[1]{\\\mbox{}\\[-6pt]\footnotesize\texttt{#1}}
\renewcommand{\and}{, }
% to avoid [...] in the bibliography
% \item[] instead of \item[\@biblabel{#1}\hfill]
\def\@lbibitem[#1]#2{\item[]\if@filesw
{\let\protect\noexpand
\immediate
\write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
\renewenvironment{thebibliography}[1]
{\section*{\refname
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
%% changed!
\itemindent -\leftmargin
\itemsep 6pt
%%%%%%%%%%%
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
% itens
\setlength\leftmargini {1.27cm}
\setlength\leftmargin {\leftmargini}
\setlength\leftmarginii {\leftmargini}
\setlength\leftmarginiii {\leftmargini}
\setlength\leftmarginiv {\leftmargini}
\setlength \labelsep {.5em}
\setlength \labelwidth {\leftmargini}
\addtolength\labelwidth {-\labelsep}
\def\@listI{\leftmargin\leftmargini
\parsep 0\p@ \@plus1\p@ \@minus\p@
\topsep 0\p@ \@plus2\p@ \@minus4\p@
\itemsep0\p@}
\let\@listi\@listI
\@listi
\def\@listii {\leftmargin\leftmarginii
\labelwidth\leftmarginii
\advance\labelwidth-\labelsep
\topsep 0\p@ \@plus2\p@ \@minus\p@}
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii
\advance\labelwidth-\labelsep
\topsep 0\p@ \@plus\p@\@minus\p@
\parsep \z@
\partopsep \p@ \@plus\z@ \@minus\p@}
% sections
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-6\p@ \@plus -4\p@ \@minus -4\p@}%
{0\p@ \@plus 4\p@ \@minus 4\p@}%
{\normalfont\XIIIPT\bfseries\boldmath
\rightskip=\z@ \@plus 8em\pretolerance=10000 }}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-6\p@ \@plus -4\p@ \@minus -4\p@}%
{0\p@ \@plus 4\p@ \@minus 4\p@}%
{\normalfont\normalsize\bfseries\boldmath
\rightskip=\z@ \@plus 8em\pretolerance=10000 }}
%\renewcommand{\thesection}{\arabic{section}.}
%\renewcommand{\thesubsection}{\thesection\arabic{subsection}.}
%\renewcommand{\thesubsubsection}{\thesubsection\arabic{subsubsection}.}
\RequirePackage{titlesec}
\titlelabel{\thetitle.\hspace{1ex}}
% first page
\pagestyle{empty}
\newcommand{\authortag}[1]{$^{#1}$}
\def\address#1{\gdef\@address{#1}}
\def\@maketitle{\newpage
%\null % isso dava um espaco extra antes do title
\begin{center}
%\vglue -6pt
% \vspace*{12pt}
\vspace*{-.7cm}
{\XVIPT\bf\@title\par}
\vglue 6pt plus 3pt minus 3pt
{\normalsize
\textbf{\begin{tabular}[t]{c}\@author\end{tabular}}\par}
\vglue 6pt plus 3pt minus 3pt
{\normalsize
\begin{tabular}[t]{c}\inst{\instnum}\@address\end{tabular}\par}
\vglue 6pt plus 3pt minus 3pt
\end{center}\par
}
\let\maketitleOLD\maketitle
\renewcommand{\maketitle}{\maketitleOLD\thispagestyle{empty}}
\renewenvironment{abstract}{%
\list{}{\advance\topsep by6pt\relax%\small
\leftmargin=0.8cm
\labelwidth=\z@
\listparindent=\z@
\itemindent\listparindent
\rightmargin\leftmargin}\item[\hskip\labelsep
\bfseries\itshape Abstract.]\itshape}%
{\endlist}
\newenvironment{resumo}{%
\list{}{\advance\topsep by6pt\relax%\small
\leftmargin=0.8cm
\labelwidth=\z@
\listparindent=\z@
\itemindent\listparindent
\rightmargin\leftmargin}\item[\hskip\labelsep
\bfseries\itshape Resumo.]\itshape}%
{\endlist}
%Updated 2017. If hyperref is used, do not change references styles
\RequirePackage{etoolbox}%
\AtEndPreamble{\@ifpackageloaded{hyperref}
{%
\makeatletter
\def\@lbibitem[#1]#2{%
\@skiphyperreftrue
\H@item[%
\ifx\Hy@raisedlink\@empty
\hyper@anchorstart{cite.#2\@extra@b@citeb}%
\hyper@anchorend
\else
\Hy@raisedlink{%
\hyper@anchorstart{cite.#2\@extra@b@citeb}\hyper@anchorend
}%
\fi
\hfill
]%
\@skiphyperreffalse
\if@filesw
\begingroup
\let\protect\noexpand
\immediate\write\@auxout{%
\string\bibcite{#2}{#1}%
}%
\endgroup%
\fi%
\ignorespaces%
}%
\makeatother%
}%
}%
\ No newline at end of file
This diff is collapsed.
FLAGS,GEOMEAN,GEOSD,GEOMEANEXLUD,GEOSDEXLUD
aocc -O3,49.65,1.005,47.28,1.005
aocc -O3 -march=native,50.93,1.004,48.51,1.004
aocc -O3 -march=native -fno-tree-vectorize -fno-tree-slp-vectorize,54.55,1.011,49.13,1.011
clang -O3,48.97,1.004,46.7,1.004
clang -O3 -march=native,49.9,1.002,47.75,1.002
clang -O3 -march=native -fno-tree-vectorize -fno-tree-slp-vectorize,53.89,1.005,48.1,1.005
gcc -O3 -funroll-loops,51.49,1.003,45.92,1.003
gcc -O3 -funroll-loops -march=native,49.85,1.003,44.69,1.003
gcc -O3 -funroll-loops -march=native -fno-tree-vectorize -fno-tree-loop-vectorize -fno-tree-slp-vectorize,48.53,1.002,45.06,1.002
icx -O3 -fp-model=precise,45.0,1.004,43.37,1.005
icx -O3 -march=native -fp-model=precise,43.44,1.01,42.7,1.01
icx -O3 -fma -march=core-avx2 -fp-model=precise -no-vec,48.88,1.003,44.47,1.003
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment