-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.tex
164 lines (147 loc) · 4.77 KB
/
header.tex
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
% !TEX root = thesis.tex
\usepackage{color}
\usepackage{latexsym}
\usepackage{listings}
\usepackage{enumitem}
\usepackage{amsfonts,amsmath,amssymb}
\usepackage{tabularx}
\usepackage{cprotect}
\usepackage{multirow}
\usepackage{adjustbox}
%\usepackage{units}
\let\oldnl\nl% Store \nl in \oldnl
\newcommand{\nonl}{\renewcommand{\nl}{\let\nl\oldnl}}% Remove line number for one line
%\usepackage{algorithm2e}
%\usepackage{tabularx}
% uncomment to enable clever references
\ifdefined\noauthorea
\usepackage{cleveref}
\AtBeginDocument{\renewcommand{\ref}[1]{\Cref{#1}}}
\AtBeginDocument{\renewcommand{\eqref}[1]{\Cref{#1}}}
\fi
% commands
\ifdefined\noauthorea
\newcommand{\ifauthorea}[2]{#2}
\else
\newcommand{\ifauthorea}[2]{#1}
\fi
\newcommand{\mynote}[1]{\medskip\noindent{\small[{\bf Note:} {\em #1}]}}
\ifdefined\noauthorea
\newcommand{\mychapter}{}
\newcommand{\mysection}{}
\newcommand{\mydefinition}{}
\newcommand{\myfigure}{}
\newcommand{\mytable}{}
\newcommand{\mylemma}{}
\newcommand{\mytheorem}{}
\newcommand{\myequation}{}
\newcommand{\myalgorithm}{}
\newcommand{\myexample}{}
\else
\newcommand{\mychapter}{Chapter~}
\newcommand{\mysection}{Section~}
\newcommand{\mydefinition}{Definition~}
\newcommand{\myfigure}{Figure~}
\newcommand{\mytable}{Table~}
\newcommand{\mylemma}{Lemma~}
\newcommand{\mytheorem}{Theorem~}
\newcommand{\myequation}{Equation~}
%\newcommand{\myalgorithm}{Fi\usepackage{amsmath}gure~} % what the hell???
\newcommand{\myalgorithm}{Figure~}
\newcommand{\myexample}{Example~}
\fi
% theorems
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{corollary}{Corollary}
\newtheorem{definition}{Definition}
\newtheorem{property}{Property}
\newtheorem{example}{Example}
% env
\newenvironment{myproof}
{\noindent{\sc Proof.}}{\hspace*{\fill}$\Box$\par\vspace{2mm}}
\newenvironment{myproofsketch}
{\noindent{\sc Proof} (Sketch).}{\hspace*{\fill}$\Box$\par\vspace{2mm}}
%% macros
\newcommand{\missing}{\textbf{XXX}}
\newcommand{\algmissing}{Sorry, I still have to typeset the algorithm for Authorea :-) Check GitHub instead.}
\newcommand{\etal}{{\em et al.}}
% HCCT
\newcommand{\gcc}{{\tt gcc}}
\newcommand{\gprof}{{\tt gprof}}
\newcommand{\spacesaving}{Space-Saving}
% k-BLPP
\newcommand{\kipf}{\mbox{$k$-IPF}}
\newcommand{\ksf}{\mbox{$k$-SF}}
\newcommand{\kblpp}{\mbox{$k$-BLPP}}
\newcommand{\blpp}{\mbox{BLPP}}
\newcommand{\specjvm}{{\tt SPEC JVM2008}}
\newcommand{\dacapo}{{\tt DaCapo}}
\newcommand{\javagrande}{{\tt Java Grande}}
% OSRKit
\newcommand{\osrkit}{{\sf OSRKit}}
\newcommand{\tinyvm}{{\sf TinyVM}}
\newcommand{\clang}{{\tt clang}}
\newcommand{\shootout}{{\tt shootout}}
\newcommand{\feval}{{\tt feval}}
\newcommand{\fbase}{$\textsf{f}$}
\newcommand{\fvariant}{$\textsf{f'}$}
\newcommand{\fosrfrom}{$\textsf{f}_{\textsf{from}}$}
\newcommand{\fosrto}{$\textsf{f}\textsf{'}_{\textsf{to}}$}
\newcommand{\fstub}{$\textsf{f}_{\textsf{stub}}$}
\newcommand{\osrpoint}{$\textsf{L}$}
%% build_comp
\newcommand{\mytt}[1]{\text{${\tt #1}$}}
% language
\newcommand{\trans}{\Rightarrow}
\newcommand{\mysem}[1]{[\![#1]\!]}
\newcommand{\lve}{\text{LVE}}
\newcommand{\live}{\mytt{live}}
\newcommand{\islive}{\mytt{is\_live}}
\newcommand{\ureachdef}{\mytt{urdef}}
\newcommand{\dom}{\mytt{dom}}
\newcommand{\stmt}{\mytt{stmt}}
\newcommand{\point}{\mytt{point}}
\newcommand\Tau{\mathcal{T}}
\newcommand{\wskip}{\mytt{skip}}
\newcommand{\wif}{\mytt{if}}
\newcommand{\wthen}{\mytt{then}}
\newcommand{\wgoto}{\mytt{goto}}
\newcommand{\welse}{\mytt{else}}
\newcommand{\wdef}{\mytt{def}}
\newcommand{\wuse}{\mytt{use}}
\newcommand{\wtrans}{\mytt{trans}}
\newcommand{\wfreevar}{\mytt{freevar}}
\newcommand{\wconlit}{\mytt{conlit}}
\newcommand{\wstmt}{\mytt{stmt}}
\newcommand{\wpoint}{\mytt{point}}
\newcommand{\wx}{\mytt{x}}
\newcommand{\wy}{\mytt{y}}
\newcommand{\we}{\mytt{e}}
\newcommand{\wc}{\mytt{c}}
\newcommand{\wv}{\mytt{v}}
\newcommand{\wm}{\mytt{m}}
% algorithms
\newcommand{\mundef}{unde\hspace{-0.1em}f}
\newcommand{\osrtrans}{\mytt{OSR\_trans}}
\newcommand{\buildcomp}{\mytt{build\_comp}}
\newcommand{\reconstruct}{\mytt{reconstruct}}
\newcommand{\apply}{\mytt{apply}}
\newcommand{\dopasses}{\mytt{do\_passes}}
% misc
\newcommand{\alloca}{\mytt{alloca}}
\newcommand{\load}{\mytt{load}}
\newcommand{\memtoreg}{\mytt{mem2reg}}
\newcommand{\store}{\mytt{store}}
\newcommand{\RAUW}{\mytt{replace\_all}}
\newcommand{\RAUWfull}{\mytt{replace\_all}$(O, N)$}
\newcommand{\gdb}{\mytt{gdb}}
%debugging
\newcommand{\speccpu}{{\tt SPEC CPU2006}}
\newcommand{\phoronixpts}{{\tt Phoronix PTS}}
%% stuff for tabular
\newcommand*\rot{\rotatebox{90}}
% hack for wrapping: http://tex.stackexchange.com/questions/54069/table-with-text-wrapping
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}m{#1}}
% maybe see also http://tex.stackexchange.com/questions/115668/wrapping-text-in-multicolumn