Skip to content

Commit 3692325

Browse files
jerrycchounode
authored andcommitted
Update on Overleaf.
0 parents  commit 3692325

40 files changed

+1340
-0
lines changed

Appendici/AppendiceA.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
\chapter{Titolo}\label{AppendiceA}
2+
\blindduck[maths]

BookTemplate.tex

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
\documentclass[10pt, twoside]{book}
2+
%\usepackage[chinese]{babel}
3+
\usepackage[utf8]{inputenc}
4+
\usepackage[T1]{fontenc}
5+
%%%%% Pacchetti
6+
\usepackage{FileAusiliari/Layout} % Contiene i pacchetti e le impostazioni per il layout
7+
\usepackage{FileAusiliari/Pacchetti} % Pacchetti aggiuntivi di vario tipo (senza tikz)
8+
\usepackage{FileAusiliari/TikZ} % Ambiente tikzpicture
9+
\usepackage{FileAusiliari/Definizioni} % Definizioni di colori, variabili globali ecc.
10+
\usepackage{FileAusiliari/Environments} % Impostazioni TOC, bibliografia e indice analitico + environments vari per il contenuto del documento
11+
\usepackage{FileAusiliari/Custom} % Tutto ciò che è personalizzabile normalmente dall'utente (tranne i colori per collegamenti ipertestuali, citazioni, link, che sono da modificare in Referencing)
12+
\input{FileAusiliari/Referencing.tex} % Collegamenti ipertestuali e indice analitico
13+
\usepackage{FileAusiliari/Comandi} % Comandi vari
14+
\usepackage{fancyhdr}
15+
\usepackage{titlesec}
16+
\usepackage{listings}
17+
\usepackage{graphicx}
18+
\usepackage{caption}
19+
\usepackage{hyperref}
20+
\usepackage{makeidx}
21+
\usepackage{xcolor}
22+
23+
24+
\usepackage{fontspec} % 字體
25+
\usepackage{xeCJK} % 中文支持
26+
\setmainfont{Times New Roman} % 主字體
27+
\setCJKmainfont{Noto Sans CJK TC} % 中文黑體 思源黑體
28+
\linespread{1.5}
29+
30+
\newcommand{\CJKsection}[1]{{\CJKfamily{titlefont}#1}} % 中文支持 Section Title
31+
\titleformat{\section}{\Large\bfseries\CJKsection}{\thesection}{1em}{}
32+
33+
% 自定義命令
34+
\newcommand{\code}[1]{\texttt{#1}}
35+
\newcommand{\term}[1]{\textit{#1}}
36+
\renewcommand{\bold}[1]{\textbf{#1}}
37+
\newcommand{\figref}[1]{\textbf{Figure~\ref{#1}}}
38+
\newcommand{\tabref}[1]{\textbf{Table~\ref{#1}}}
39+
\newcommand{\lstref}[1]{\textbf{Listing~\ref{#1}}}
40+
\newcommand{\chapref}[1]{\textbf{Chapter~\ref{#1}}}
41+
\newcommand{\secref}[1]{\textbf{Section~\ref{#1}}}
42+
43+
44+
45+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47+
\begin{document}
48+
%%%%%%%%%%%%%%%%%%%%%%%%%%%% TITOLO
49+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50+
% \input{FileAusiliari/Titolo}
51+
\input{FileAusiliari/Titolo2}
52+
%%%%%%%%%%%%%%%%%%%%%%%%%%%% FRONTMATTER
53+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54+
\frontmatter
55+
\pagestyle{fancyfront}
56+
%%%%% INDICE
57+
\begingroup
58+
{
59+
\let\cleardoublepage\relax
60+
%%%%% Nome Indice (NASCOSTO E CREATO A PARTE)
61+
\renewcommand\contentsname{}
62+
\begin{tikzpicture}[remember picture, overlay]
63+
\clip (-80,-95) rectangle (40,10);
64+
\pgftext[x=.8\textwidth, y=0.2cm]{\HUGE\bfseries
65+
Indice} % Titolo indice
66+
\end{tikzpicture}
67+
\vspace{-1cm}
68+
69+
\tableofcontents
70+
\vspace{.25cm}
71+
}
72+
%%%%% INTRODUZIONE
73+
\input{FileAusiliari/Introduzione}
74+
\input{FileAusiliari/Rule}
75+
\endgroup
76+
77+
%%%%% ERRATA
78+
\iffalse
79+
\titleformat{\chapter}
80+
[hang]
81+
{\huge}
82+
{}
83+
{0em}
84+
{}
85+
[\large {\begin{tikzpicture} [remember picture, overlay]
86+
\pgftext[right,x=14.75cm,y=0.2cm]{\color{black}\Huge\bfseries
87+
Errata corrige \& Aggiunte};
88+
\end{tikzpicture}}]
89+
\chapter*{}\normalfont \addcontentsline{toc}{part}{Errata corrige \& Aggiunte}
90+
\begin{longtable}{p{2.55cm}p{1.45cm}p{9cm}}
91+
Data di \newline correzione & Pagina&\\\hline
92+
24/10/2023 & ? & ?
93+
\end{longtable}
94+
\fi
95+
96+
%%%%%%%%%%%%%%%%%%%%%%%%%%%% MAINMATTER
97+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
98+
\mainmatter
99+
100+
\pagestyle{fancymain}
101+
\titleformat{\chapter}[display]{\bfseries\Large} {\filleft\MakeUppercase{\chaptertitlename} \HUGE\thechapter}{.5ex}{\titlerule\vspace{1ex}\filleft}[\vspace{3.5ex}]
102+
\titlespacing*{\chapter}{0pt}{0.1\baselineskip}{0.5\baselineskip}
103+
104+
\fancyheadoffset[L]{\dimexpr\oddsidemargin-0in\relax}
105+
\fancyheadoffset[R]{\dimexpr\oddsidemargin-0in\relax}
106+
107+
\normalfont
108+
\normalsize
109+
110+
111+
% \newgeometry{top=35mm, bottom=35mm, left=15mm, right=15mm, headheight=0pt, headsep=0pt, marginparsep=0pt, marginparwidth=0pt, footskip=0pt, footnotesep=0pt}
112+
% % \part*{\HUGE Parte 1}\label{Parte1}
113+
% \restoregeometry
114+
115+
%%%%% CAPITOLI
116+
\input{Chapters/Chap1}
117+
\input{Chapters/Chap2}
118+
\input{Chapters/Chap3}
119+
\input{Chapters/Chap4}
120+
\input{Chapters/Chap5}
121+
\input{Chapters/Chap6}
122+
\input{Chapters/Chap7}
123+
\input{Chapters/Chap8}
124+
\input{Chapters/Chap9}
125+
\input{Chapters/Chap10}
126+
\input{Chapters/Chap11}
127+
\input{Chapters/Chap12}
128+
\input{Chapters/Chap13}
129+
130+
131+
132+
%%%%% APPENDICI
133+
\newgeometry{top=35mm, bottom=35mm, left=15mm, right=15mm, headheight=0pt, headsep=0pt, marginparsep=0pt, marginparwidth=0pt, footskip=0pt, footnotesep=0pt}
134+
\part*{\HUGE Appendici}
135+
\titleformat{\chapter}[display] {\bfseries\large\raggedright} {\vspace{-2.35cm} \MakeUppercase{\chaptertitlename}\ \Huge \thechapter} {.125ex} {\raggedleft\vspace{-1cm}\Huge\makebox[.5\textwidth]{}}
136+
\titlespacing*{\chapter}{0pt}{6\baselineskip}{2.5\baselineskip}
137+
\restoregeometry
138+
139+
% Capitoli
140+
\titlecontents{chapter}[2.5pc]
141+
{\addvspace{15pt}}
142+
{\begin{tikzpicture}
143+
\pgftext{\LArge\bfseries\bfseries\color{black}\hspace{-1cm} Appendice\ \thecontentslabel{\color{white}.}\hspace{.5cm} }
144+
\end{tikzpicture}\Large }
145+
{}
146+
{\color{black}\titlerule\; \;\Large\bfseries Pagina \thecontentspage}
147+
148+
\pagestyle{fancyapp}
149+
150+
\begin{appendices}
151+
\input{Appendici/AppendiceA}
152+
153+
%%%%%%%%%%%%%%%%%%%%%%%%%%%% BACKMATTER
154+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
155+
\backmatter
156+
157+
%%%%% BIBLIOGRAFIA
158+
\pagestyle{fancyBibliografia}
159+
\titleformat{\chapter}
160+
[hang]
161+
{\vspace{-2cm}\Huge}
162+
{}
163+
{0em}
164+
{}
165+
[\Large {\begin{tikzpicture} [remember picture, overlay]
166+
\pgftext[right,x=14.75cm,y=0.2cm]{\HUGE\bfseries
167+
Bibliografia}
168+
\end{tikzpicture}}]
169+
170+
\nocite{*}
171+
\bibliographystyle{amsalpha}
172+
\bibliography{FileAusiliari/Bibliografia}
173+
\addcontentsline{toc}{part}{Bibliografia}
174+
\cleardoublepage
175+
%INDICE ANALITICO
176+
\pagestyle{fancyIndiceAnalitico}
177+
\renewcommand{\indexname}{}
178+
% SISTEMA IL PROBLEMA DEL LINK ALL'INDICE ANALITICO
179+
\let\cleardoublepage\relax
180+
\titleformat{\chapter}[hang]{}{}{0em}{}[]
181+
\chapter*{}
182+
\titleformat{\chapter}
183+
[hang]
184+
{\Huge}
185+
{}
186+
{0em}
187+
{}
188+
[\Large {\begin{tikzpicture} [remember picture, overlay]
189+
\pgftext[right,x=14.75cm,y=0.2cm]{\HUGE\bfseries
190+
Indice analitico}
191+
\end{tikzpicture}}]
192+
\titlespacing*{\chapter}{0pt}{0\baselineskip}{5\baselineskip}
193+
\addcontentsline{toc}{part}{Indice analitico}
194+
\vspace{-2cm}
195+
\printindex
196+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
197+
\end{appendices}
198+
\end{document}

Chapters/chap0.tex

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
\chapter{ch0}
2+
just a sample chapter
3+
4+
\section{sample}
5+
\begin{verbatim}
6+
\begin{The} \lipsum[1] \end{The}
7+
\end{verbatim}
8+
\begin{The} \lipsum[1] \end{The}
9+
10+
\begin{verbatim}
11+
\begin{Proof} \lipsum[1] \end{Proof}
12+
\end{verbatim}
13+
\begin{Proof} \lipsum[2] \end{Proof}
14+
15+
\begin{verbatim}
16+
\begin{Pro} \lipsum[1] \end{Pro}
17+
\end{verbatim}
18+
\begin{Pro} \lipsum[3] \end{Pro}
19+
20+
\begin{verbatim}
21+
\begin{Le} \lipsum[1] \end{Le}
22+
\end{verbatim}
23+
\begin{Le} \lipsum[5] \end{Le}
24+
25+
\begin{verbatim}
26+
\begin{Co} \lipsum[1] \end{Co}
27+
\end{verbatim}
28+
\begin{Co} \lipsum[6] \end{Co}
29+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30+
\section{Definizioni, esempi, osservazioni}
31+
\begin{verbatim}
32+
\begin{De} \lipsum[1] \end{De}
33+
\end{verbatim}
34+
\begin{De} \lipsum[7] \end{De}
35+
36+
\begin{verbatim}
37+
\begin{Exa} \lipsum[1] \end{Exa}
38+
\end{verbatim}\begin{Exa}\lipsum[8] \end{Exa}
39+
40+
\begin{verbatim}
41+
\begin{Oss} \lipsum[1] \end{Oss}
42+
\end{verbatim}
43+
\begin{Oss}\lipsum \end{Oss}
44+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45+
\section{Description, itemize, enumerate}
46+
\paragraph*{} \underline{Description}
47+
\begin{verbatim}
48+
\begin{description} \item[Oggetto 1] Prova \item[Oggetto 2] Prova \end{description}
49+
\end{verbatim}
50+
\begin{description}
51+
\item[Oggetto 1] Prova
52+
\item[Oggetto 2] Prova
53+
\end{description}
54+
55+
\begin{verbatim}
56+
\begin{itemize} \item Prova \item Prova \item Prova \end{itemize}
57+
\end{verbatim}
58+
\paragraph*{} \underline{Itemize}
59+
\begin{itemize}
60+
\item Prova
61+
\item Prova
62+
\item \lipsum[9]
63+
\end{itemize}
64+
65+
\begin{verbatim}
66+
\begin{enumerate} \item Prova \item Prova \end{enumerate}
67+
\end{verbatim}
68+
\paragraph*{} \underline{Enumerate}
69+
\begin{enumerate}
70+
\item Prova
71+
\item Prova
72+
\end{enumerate}
73+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74+
\section{Note a margine}
75+
\lipsum[1]
76+
\note{Nota a margine: può essere utile come segnaposto per definizioni, teoremi... Si usa col comando \text{$\setminus$note\{\#1\}}}
77+
\lipsum[1]
78+
\lipsum[1]
79+
\expl{Ho impostato una versione con un colore diverso per spiegare passaggi nelle dimostrazioni. Si usa col comando \text{$\setminus$expl\{\#1\}}}
80+
\lipsum[1]
81+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82+
\section{Collegamenti ipertestuali, citazioni, indici, url}
83+
\paragraph*{} Un collegamento ipertestuale si realizza con
84+
\begin{verbatim}\label{Label}\end{verbatim}
85+
e si richiama con
86+
\begin{verbatim}\ref{LabelTesto}\end{verbatim}
87+
Risultato: \label{LabelTesto}\ref{LabelTesto}
88+
89+
\paragraph*{} Una citazione a un libro in bibliografia si realizza con
90+
\begin{verbatim}\cite{LabelLibro}\end{verbatim}
91+
Risultato: \cite{Label}
92+
93+
\paragraph*{} Si inserisce un nuovo elemento nell'indice analitico con i comandi
94+
\begin{verbatim}\index{Index}\end{verbatim}
95+
\begin{verbatim}\index{Index!SecondaVoce}
96+
\end{verbatim}
97+
Per il risultato di questi comandi vedere l'indice analitico a fine documento. \index{Index}\index{Index!SecondaVoce}\index{Index!SecondaVoce!TerzaVoce}
98+
\paragraph*{} Per mettere un link si può usare
99+
\begin{verbatim}\url{https://poisson.phc.dm.unipi.it/~puddu}\end{verbatim}
100+
Risultato: \url{https://poisson.phc.dm.unipi.it/~puddu}

Chapters/chap1.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
\chapter{概覽}
2+
3+
過去 40 年來,我們看到處理能力有了驚人的進步。微處理器設計師透過增加更多的 transistors 和提高 processor clock 的速度,利用 silicon 技術中的 Moore's Law 和 Dennard scaling,不斷推出性能更強的晶片。然而,在 21 世紀初,正如 IBM 的 Robert Dennard 預測的那樣,晶片的 clock frequency 達到了一個極限。這讓我們無法繼續提高 silicon 的功率密度,因為累積的能量會導致散熱變得非常困難。
4+
5+
為了解決這個問題,晶片製造商開始尋求在單一晶片上加入多個 cores 的 parallel processing 技術。雖然這讓晶片性能有了大幅提升,但多數現有軟體仍是基於 sequential processing 模型設計的,這給程式設計師帶來了新的挑戰,他們需要尋找更創新的方法來在應用中實現 parallelism。
6+
7+
最近,我們看到單一 microprocessor 的 cores 數量從幾個增加到十幾甚至幾十個。例如,AMD 的第三代 Ryzen Threadripper CPU 有多達 64 cores,而下一代預計將達到 128 cores。應用程式設計師開始利用 manycore CPUs 的優勢,因為它們在執行多個同時運行的 sequential threads 上非常強大。
8+
9+
另一個值得注意的趨勢是 heterogeneous computing,這是一種使用專為特定任務設計的硬體平台。例如,顯示卡供應商如 ATI 和 NVIDIA 率先推出了專為資料並行和圖形密集型工作負載設計的 GPUs。這些 GPUs 的特殊設計讓它們性能強大,但也要求開發者使用專有的 graphics languages 撰寫程式,這對於它們作為加速器的廣泛應用造成了一定阻礙。
10+
11+
\section{平行程式設計}

Chapters/chap10.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
\chapter{Getting Started with HIP Programming}
2+
\section{Teoremi, dimostrazioni, proposizioni, lemmi, corollari}

Chapters/chap11.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
\chapter{Getting Started with HIP Programming}
2+
\section{Teoremi, dimostrazioni, proposizioni, lemmi, corollari}

Chapters/chap12.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
\chapter{Getting Started with HIP Programming}
2+
\section{Teoremi, dimostrazioni, proposizioni, lemmi, corollari}

Chapters/chap13.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
\chapter{Getting Started with HIP Programming}
2+
\section{Teoremi, dimostrazioni, proposizioni, lemmi, corollari}

Chapters/chap2.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
\chapter{HIP 程式設計入門}
2+
\section{fill your section title here}

Chapters/chap3.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
\chapter{fill your chapter title here}
2+
\section{fill your section title here}

0 commit comments

Comments
 (0)