This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kokkos_PG.tex
318 lines (265 loc) · 11.5 KB
/
Kokkos_PG.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
%
% $Id: SANDExampleArticleNotstrict.tex,v 1.26 2009/05/01 20:59:19 rolf Exp $
%
% This is an example LaTeX file which uses the SANDreport class file.
% It shows how a SAND report should be formatted, what sections and
% elements it should contain, and how to use the SANDreport class.
% It uses the LaTeX article class, but not the strict option.
% It uses jpeg logos and files to show how pdflatex can be used
%
% Get the latest version of the class file and more at
% http://www.cs.sandia.gov/~rolf/SANDreport
%
% This file and the SANDreport.cls file are based on information
% contained in "Guide to Preparing {SAND} Reports", Sand98-0730, edited
% by Tamara K. Locke, and the newer "Guide to Preparing SAND Reports and
% Other Communication Products", SAND2002-2068P.
% Please send corrections and suggestions for improvements to
% Rolf Riesen, Org. 9223, MS 1110, rolf@cs.sandia.gov
%
%\documentclass[pdf,12pt,relax]{SANDreport}
\documentclass[a4paper,11pt]{book}
\usepackage[utf8x]{inputenc}
\usepackage{graphicx}
%% or use the epsfig package if you prefer to use the old commands
%% \usepackage{epsfig}
%% The amssymb package provides various useful mathematical symbols
%% \usepackage{amssymb}
%% The amsthm package provides extended theorem environments
%% \usepackage{amsthm}
%% The lineno packages adds line numbers. Start line numbering with
%% \begin{linenumbers}, end it with \end{linenumbers}. Or switch it on
%% for the whole article with \linenumbers after \end{frontmatter}.
%% \usepackage{lineno}
%% \usepackage{placeins}
\usepackage{listings}
\usepackage{subfigure}
\usepackage{courier}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
\usepackage{url}
\usepackage{color}
\definecolor{lightlightgray}{gray}{0.97}
\definecolor{lightlightgreen}{rgb}{0.8,1,0.8}
\definecolor{darkblue}{rgb}{0,0,0.8}
\definecolor{darkgreen}{rgb}{0,0.5,0}
\definecolor{LightSkyBlue}{rgb}{0.8,1,0.8}
\definecolor{MidnightBlue}{rgb}{0.8,1,0.8}
\definecolor{SandiaGray}{RGB}{130, 120, 111}\definecolor{SandiaBlue}{RGB}{0, 50, 90}
\definecolor{SandiaLightBlue}{RGB}{0,150,180}
\definecolor{SandiaLightLightBlue}{RGB}{0,200,220}
\definecolor{SandiaRed}{RGB}{130, 36, 51}
\lstset{language=C++,
%%frame=single,
basicstyle=\ttfamily\small,
%%basicstyle=\ttfamily,
%%basicstyle=\sffamily\normalsize,
keywordstyle=\color{darkblue},
%%backgroundcolor=\color{lightlightgray},
commentstyle=\color{darkgreen}
}
\usepackage{kpfonts}
\usepackage[explicit]{titlesec}
\newcommand*\chapterlabel{}
\titleformat{\chapter}
{\gdef\chapterlabel{}
\normalfont\sffamily\Huge\bfseries\scshape}
{\gdef\chapterlabel{\thechapter\ }}{0pt}
{\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-2cm] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
\draw[fill=SandiaGray,color=SandiaGray] (0,0) rectangle
(\paperwidth,2cm);
\node[anchor=east,xshift=.9\paperwidth,rectangle,
rounded corners=20pt,inner sep=11pt,
fill=SandiaBlue,color=SandiaBlue]
{\color{white}\chapterlabel#1};
\end{tikzpicture}
};
\end{tikzpicture}
}
\titlespacing*{\chapter}{0pt}{50pt}{-60pt}
%\pagestyle{fancy}
\fancyhf{}
\fancyhead[CE,CO]{\leftmark}
%\fancyhead[CE]{\hspace{40cm}\thechapter. \chaptername}
%\fancyhead[LO]{\hspace{12.68cm}\thechapter. \chaptername}
\fancyfoot[RE,LO]{\leftmark}
\fancyfoot[CE,CO]{\vspace{0.2cm}\color{white}\thepage}
\renewcommand{\headrulewidth}{10pt}
\renewcommand{\footrulewidth}{65pt}
\fancyheadoffset{\textwidth}
\fancyfootoffset{\textwidth}
\headsep = 1.5cm
\footskip = 40pt
\makeatletter
\def\headrule{{\color{SandiaGray}\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi
\hrule\@height\headrulewidth\@width\headwidth
\vskip-\headrulewidth}}
\makeatother
\makeatletter
\def\footrule{{\color{SandiaBlue}\if@fancyplain\let\footrulewidth\plainheadrulewidth\fi
\hrule\@height\footrulewidth\@width\headwidth
\vskip-\footrulewidth}}
\makeatother
\title{Kokkos: the Programming Guide}
%% use optional labels to link authors explicitly to addresses:
%% \author[label1,label2]{<author name>}
%% \address[label1]{<address>}
%% \address[label2]{<address>}
\author{H. Carter Edwards, Mark Hoemmen, and Christian R. Trott}
%\ead{hcedwar@sandia.gov}
%\author{Christian R. Trott}
%\ead{crtrott@sandia.gov}
%\author{Mark Hoemmen}
%\ead{mhoemme@sandia.gov}
%\cortext[authorcor]{Corresponding author}
%\address{Sandia National Laboratories, PO Box 5800 / MS 1318, Albuquerque NM, 87185}
% ---------------------------------------------------------------------------- %
% Set some things we need for SAND reports. These are mandatory
%
%\SANDnum{SAND2015-xxxx}
%\SANDprintDate{September, 2015}
%\SANDauthor{H. Carter Edwards, Mark Hoemmen, and Christian R. Trott}
% ---------------------------------------------------------------------------- %
\addtolength{\oddsidemargin}{-.4in}
\addtolength{\evensidemargin}{-.4in}
\addtolength{\textwidth}{0.8in}
\addtolength{\topmargin}{-.875in}
\addtolength{\textheight}{1.in}
\begin{document}
% ------------------------------------------------------------------------ %
% An Abstract is required for SAND reports
%
%\begin{abstract}
%\end{abstract}
%\clearpage
% ------------------------------------------------------------------------ %
%\section*{Acknowledgements}
%Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation, a wholly owned subsidiary of Lockheed Martin Corporation, for the U.S. Department of Energy's National Nuclear Security Administration under contract DE-AC04-94AL85000.
%\cleardoublepage
% ------------------------------------------------------------------------ %
%\setcounter{tocdepth}{2}
%\tableofcontents
%\listoffigures
%\listoftables
%\SANDmain
\pagestyle{fancy}
\begin{titlepage}
\vspace{5cm}
\hspace{2cm}
%\begin{minipage}[h]{0.8\textwidth}
{\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-2.5cm] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
\draw[fill=SandiaLightLightBlue,color=SandiaLightLightBlue] (0,-8cm) rectangle (8cm,5.5cm);
\draw[fill=SandiaLightBlue,color=SandiaLightBlue] (0,-6cm) rectangle (6cm,3.5cm);
\draw[fill=SandiaBlue,color=SandiaBlue] (0,-4cm) rectangle (4cm,1.5cm);
\draw[fill=SandiaLightBlue,color=SandiaLightBlue] (4cm,-4cm) circle [radius=4cm];
\draw[fill=SandiaLightLightBlue,color=SandiaLightLightBlue] (6cm,-6cm) circle [radius=6cm];
\draw[fill=white,color=white] (8cm,-8cm) circle [radius=8cm];
\draw[fill=SandiaGray,color=SandiaGray] (0,3.5cm) rectangle (\paperwidth,0.5cm);
\draw[fill=SandiaBlue,color=SandiaBlue] (0,0) rectangle (\paperwidth,2.0cm);
% \draw[fill=SandiaGray,color=SandiaGray] (0,3.5cm) rectangle (\paperwidth,0.5cm);
\end{tikzpicture}
};
\node[yshift=0cm] at (current page.south east)
{\begin{tikzpicture}[remember picture, overlay]
\draw[fill=SandiaLightLightBlue,color=SandiaLightLightBlue] (-8cm,11.5cm) rectangle (8cm,5.5cm);
\draw[fill=SandiaLightBlue,color=SandiaLightBlue] (-6cm,9.5cm) rectangle (6cm,3.5cm);
\draw[fill=SandiaBlue,color=SandiaBlue] (0,7.5cm) rectangle (-4cm,1.5cm);
\draw[fill=SandiaLightBlue,color=SandiaLightBlue] (-4cm,7.5cm) circle [radius=4cm];
\draw[fill=SandiaLightLightBlue,color=SandiaLightLightBlue] (-6cm,9.3cm) circle [radius=6cm];
\draw[fill=white,color=white] (-8cm,11.5cm) circle [radius=8cm];
\draw[fill=SandiaBlue,color=SandiaBlue] (-\paperwidth,0.5cm) rectangle
(\paperwidth,3.5cm);
\draw[fill=SandiaGray,color=SandiaGray] (-\paperwidth,0) rectangle
(\paperwidth,0.5cm);
\end{tikzpicture}
};
\node[yshift=-.25\paperheight] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
\node[anchor=east,xshift=.4\paperwidth,rectangle,
yshift=-.1\paperheight,
rounded corners=20pt,inner sep=11pt,
fill=SandiaBlue]
{\color{white} \Huge Kokkos};
\node[anchor=east,xshift=.8\paperwidth,rectangle,
yshift=-.2\paperheight,
rounded corners=20pt,inner sep=11pt,
fill=SandiaBlue]
{\color{white} \Huge The Programming Guide};
\node[anchor=east,xshift=.8\paperwidth,color=white,rectangle,yshift=-.25\paperheight]
{\color{black}Version 1.0 May 2015};
%\draw [line width=12, SandiaGray] (0.1\paperwidth,-0.15\paperwidth) -- (0.25\paperwidth, 0.0\paperwidth); %\draw [line width=12, SandiaGray] (0.9\paperwidth,-0.15\paperwidth) -- (0.75\paperwidth, 0.0\paperwidth); %\draw [line width=12, SandiaGray] (0.1\paperwidth,-0.27\paperwidth) -- (0.25\paperwidth,-0.42\paperwidth); %\draw [line width=12, SandiaGray] (0.9\paperwidth,-0.27\paperwidth) -- (0.75\paperwidth,-0.42\paperwidth);
%\draw [line width=12, SandiaGray] (0.1\paperwidth,-0.27\paperwidth) -- (0.1\paperwidth,-0.15\paperwidth); %\draw [line width=12, SandiaGray] (0.9\paperwidth,-0.27\paperwidth) -- (0.9\paperwidth,-0.15\paperwidth);
%\draw [line width=12, SandiaGray] (0.35\paperwidth, 0.0\paperwidth) -- (0.65\paperwidth,-0.0\paperwidth); %\draw [line width=12, SandiaGray] (0.35\paperwidth,-0.42\paperwidth) -- (0.65\paperwidth,-0.42\paperwidth);
\end{tikzpicture}
};
\node[xshift=0.25\paperwidth,rectangle, yshift=5cm] at (current page.south west)
{\includegraphics[height=0.4in]{figures/SNL_Stacked_Black_Blue.jpg}};
\node[xshift=0.1\paperwidth,rectangle, yshift=5cm] at (current page.south west)
{\includegraphics[height=0.6in]{figures/DOEbwlogo.pdf}};
\end{tikzpicture}
}
%\end{minipage}
\vfill
\end{titlepage}
%\chapter*{Acknowledgements}
\noindent
Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia
Corporation, a wholly owned subsidiary of Lockheed Martin Corporation, for the U.S.
Department of Energy's National Nuclear Security Administration under contract DE-AC04-94AL85000.
\newline
\newline
\noindent
SAND2015-4178 O
\vspace{4cm}
\noindent
Authors: \newline\newline
Christian R. Trott (crtrott@sandia.gov)\newline
Mark Hoemmen (mhoemm@sandia.gov)\newline
Simon D. Hammond (sdhammo@sandia.gov)\newline
H. Carter Edwards (hcedwar@sandia.gov)
\vspace{1cm}
\noindent
Version: \newline\newline
1.0 May 2015 \newline\newline
\noindent
This document constitutes the initial version of the Kokkos Programming Guide.
As such we ask readers to submit feedback about usability, readability and outright errors.
We expect this document to grow over time and include more comprehensive coverage of
Kokkos's features as well as more examples to guide users.
But we hope that it will proof useful in its current state.
%\maketitle
%\setcounter{tocdepth}{2}
\tableofcontents
\input{Kokkos_PG_Introduction.tex}
\input{Kokkos_PG_MachineModel.tex}
\input{Kokkos_PG_ProgrammingModel.tex}
\input{Kokkos_PG_Compilation.tex}
\input{Kokkos_PG_Initialization.tex}
\input{Kokkos_PG_Views.tex}
\input{Kokkos_PG_ParallelDispatch.tex}
\input{Kokkos_PG_HierarchicalParallelism.tex}
\input{Kokkos_PG_Subviews.tex}
\input{Kokkos_PG_LegacyCodeIntegration.tex}
\clearpage
\bibliographystyle{plain}
\bibliography{Kokkos_PG}
%\include{SANDDistribution}
\end{document}