diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..7a2e09bd0a30d2a1458be71d1e6656bd720d432a --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +all: + docker-compose run pandoc make + +regen: + docker-compose run pandoc make clean all + +clean: + docker-compose run pandoc make clean + +.PHONY: all clean regen diff --git a/README.md b/README.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bd794123e3d43bc1e7e94f9958a6daf064dca9b0 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,107 @@ +# Structure de rapport HEPIA - HES-SO + +Ce repo vous permet de créer rapidement un rapport de semestre ou de bachelor conformément aux demandes de l'HEPIA. + +## Installation + +Il faut installer [Pandoc](https://pandoc.org/). Pandoc 2.9 c'est mieux. Il faut l'installer avec un `.deb` car les versions sur les repos sont en général tous nuls et tout vieux. + +Il faut ensuite [XeLaTeX](https://packages.debian.org/fr/sid/texlive-xetex). Il permet de convertir notre rapport de LaTeX en `.pdf`. + +Il y a probablement d'autres paquets à installer, mais pas de panique : en lançant la compilation de votre rapport, Pandoc vous indiquera si quelque chose manque, ce en plantant lamentablement. C'est très drôle à voir. + +## Je n'ai pas envie d'installer tout plein de trucs sur mon ordi ! + +Pas de souci. En pushant sur votre repo git (je vous recommande de faire un git juste pour votre rapport), GitLab va automatiquement générer votre rapport. +Une fois pushé, votre rapport, s'il est écrit correctement, possèdera une petite coche verte. En cliquant sur _download_, vous pouvez télécharger un artefact nommé _build_ qui contient votre rapport. +Un conseil cependant : je vous recommande d'installer pandoc sur votre ordinateur, vous perdrez moins de temps à attendre que GitLab compile votre rapport. Ca peut prendre du temps ! + +## Structure de dossiers et fichiers + +- `figs` : Vos figures, c'est-à-dire vos images du rapport. Vous pouvez faire des sous-dossiers si vous voulez. Voir plus bas pour comment mettre une image facilement dans votre rapport. +- `templates` : La partie LaTeX du rapport. Touchez pas trop sauf si nécessaire. +- `text` : Votre rapport en markdown. Je décris plus bas comment ça marche. +- `config.yaml` : C'est là que vous pourrez configurer la plupart des informations de votre rapport. Pensez à changer les infos là dedans. +- `figs/front-logo.png` : Le logo utilisé pour votre rapport. Changez cette image. + +Les autres fichiers ne sont pas spécialement importants, ne les supprimez pas pour autant. + +## Compilation de votre rapport + +Ce qui est tout à fait classe avec Pandoc, c'est que vous pouvez écrire votre rapport en Markdown et il vous le convertira en PDF proprement. Vous pouvez même mettre du LaTeX dedans, cela fonctionnera convenablement. Il y a toutefois quelques indications à suivre (voir plus bas). + +Avant tout, pensez à changer les informations dans `config.yaml`. Elles changeront automatiquement dans tout le travail. Par exemple, si vous changez la valeur `sensei` dans `config.yaml`, le nom de votre professeur responsable sera changé dans tout le rapport. +Il faut aussi changer quelques valeurs dans `0-preface.md`, dans le LaTeX. + +Pour lancer la compilation de votre rapport, faites simplement `make`. Pour nettoyer votre projet, faites `make clean`. Pas trop compliqué en somme. + +## Les trucs qui sont faits pour vous + +- Le titre +- La table des matières +- La table des figures +- Le glossaire +- La bibliographie + +## Les trucs PAS faits pour vous + +Cette section est plus importante que celle du dessus. + +- La table des annexes +- La vérification de la syntaxe et de l'orthographe +- Le texte : le contenu, les remerciements, le résumé, l'introduction et la conclusion. + +## Indications d'usage + +Dans le désordre, quelques infos à savoir sur ce template. + +- Mettez vos fichier markdown dans le dossier `text`. + +- Mettez vos image dans le dossier `figs`. + +- Vous **DEVEZ** mettre vos fichiers markdown dans l'ordre alphabétique d'apparition. Par exemple, si vous avez une préface, une introduction, un chapitre, et une conclusion, vous nommerez vos fichiers : + + - `1-préface.md` + - `2-introduction.md` + - `3-chapitre-un.md` + - `4-conclusion.md` + + Le nom après le chiffre (et le tiret) n'est pas important, mais le reste l'est. + +- Il **faut** finir tous ces fichiers Markdown dans `text` par un `\pagebreak`. Cela permet de séparer chaque document par un saut de page. Ce n'est pas nécessaire d'en mettre un pour le dernier fichier markdown (cela ferait une page vierge à la fin du document) + +- Il **faut** avoir un fichier de bibliographie en format BibLaTeX nommé `my.bib`. Vous pouvez référencer votre bibliographie en faisant [@le_nom_de_votre_entrée_dans_votre_bibliographie]. Si vous n'avez pas de fichier de ce type, créez-le juste vide. Zotero a une extension [Better BibTex](https://retorque.re/zotero-better-bibtex/) qui permet de synchroniser votre Zotero directement dans my.bib, c'est super pratique, je vous recommande de l'utiliser. + +- Je vous fournis du LaTeX dans certains fichiers markdown. Il n'est pas là par hasard. N'y touchez pas, sans quoi vous risquez de tout casser. + +- Vous pouvez ajouter des notes de bas de page, des listes, des tableaux, tout plein de trucs en bouquinant [la documentation Pandoc](https://pandoc.org/MANUAL.html). Je vous recommande d'y jeter un œil, c'est fort sympa ce qu'on peut faire sans trop s'embêter. + +- Il y a une URL dans `text/ZZ-glossaire.md`. **Lisez la doc**. + +- Si vous faites des tableaux Markdown dans votre rapport, et que vous voulez qu'il apparaisse dans la liste des tables, ajouter `Table: <la légende de votre tableau>` juste après votre tableau, à la ligne d'après. Sans ligne vide entre votre tableau et votre légende. + +- Je vous déconseille de mettre du code dans votre rapport. Ma template déconne pas mal avec. Si vous DEVEZ en mettre, contentez-vous de petits extraits ou de mettre des screens. + +- Si le texte semi-transparent en haut à gauche de chaque slide est décalé, vous pouvez faire un réglage dans le fichier `templates/default.tex` à la ligne 250. + +- J'ai été flemmard. Si une entreprise vous mandate pour votre travail de Bachelor/semestre, il faudra ajouter cela manuellement (probablement dans `0-preface.md`). + +## Raccourcis + +Je vous ai simplifiés la vie au plus : il y a des raccourcis pour aller plus vite. La syntaxe est un peu dégueu, mais c'est pas la mer à boire. + +Rappel : une figure = une image. + +```latex +% Insère une image (et l'ajoute dans la table des figures) : +\img{Le chemin vers l'image}{les options de l'image, comme la taille (scale=0.2)}{La légende de l'image}{La source de l'image} +\cimg fait la même chose, mais au centre. + +Exemple : \cimg{figs/internet-minute.jpg}{scale=0.5}{Ce que produit Internet chaque minute (en 2019)}{Source : tiré de \url{https://www.visualcapitalist.com/what-happens-in-an-internet-minute-in-2019/}, ref. URL01} +``` + +## Remerciements + +Merci au Docteur Orestis Malaspinas pour sa sagesse de l'utilisation de Pandoc et de la promotion tout à fait positive qu'il en a faite. + +Merci à Monsieur Heirich d'avoir été mon cobaye pour la création de ce template. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..3ee59c7e02ebb943e7ea65e152407f2873e1b398 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3.3" +services: + pandoc: + image: omalaspinas/pandoc:latest + environment: + USER: 1000 + GROUP: 1000 + container_name: pandoc + volumes: + - ./src:/mnt/src + working_dir: /mnt/src/ diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..27252750b271a7bca1007c00467a9ccd3eca2b4d --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,17 @@ +.DS_Store +*.aux +*.dvi +*.log +*.gz +*.backup +*.pdf +*.html +errors.txt +rapport.tex +*.lof +*.lot +*.out +*.toc +*.apc +.vscode +.idea \ No newline at end of file diff --git a/src/LICENSE b/src/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5c93f45654687732c6b9b568186deb766f78a81c --- /dev/null +++ b/src/LICENSE @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..6e77a673991a15287aa7e9d93f89caf2bbafd007 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,29 @@ +OPTIONS = --from markdown+footnotes + +PDFOPTIONS = --highlight-style kate +PDFOPTIONS += --lua-filter=meta-vars.lua +PDFOPTIONS += --pdf-engine xelatex +PDFOPTIONS += --template=./templates/default.latex +PDFOPTIONS += --top-level-division=chapter +PDFOPTIONS += --citeproc + +MD=$(sort $(wildcard text/*.md)) +PDF=$(patsubst %.md,%.pdf,$(MD)) +TEX=$(patsubst %.md,%.tex,$(MD)) + +all: rapport.pdf + +rapport.pdf: rapport.tex + xelatex --shell-escape $^ + xelatex --shell-escape $^ + xelatex --shell-escape $^ + xelatex --shell-escape $^ + xelatex --shell-escape $^ + +rapport.tex: config.yaml $(MD) + pandoc -s $(OPTIONS) $(PDFOPTIONS) $^ -o $@ + +clean: + rm -f rapport* + +.PHONY: all clean diff --git a/src/config.yaml b/src/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3ce788de4e85d5482fdf07a6296c77b9921ce0ec --- /dev/null +++ b/src/config.yaml @@ -0,0 +1,52 @@ +--- +author: + - Baptiste Coudray +title: "FUTHARK-MPI : LE CALCUL HAUTE PERFORMANCE DISTRIBUÉ POUR LES GENS" # Le titre de votre travail +smallTitle: "LE CALCUL HAUTE PERFORMANCE DISTRIBUÉ POUR LES GENS" # Le "petit" titre de votre travail, càd le titre qui sera affiché en haut de chaque page +institute: Haute École du Paysage, d'Ingénierie et d'Architecture de Genève +name: Baptiste +surname: Coudray +keywords: [ HEPIA, Rapport, bachelor, Futhark, MPI, Programmation parallèle ] +orientation: logicielle +projectMonth: Mars +year: 2021 +sensei: "Dr. Orestis Malaspinas" +frontLogoLegend: "Jeu de la vie" # La légende de l'image de couverture +frontLogoSourceURL: "https://upload.wikimedia.org/wikipedia/commons/e/e5/Gospers_glider_gun.gif" # La source de l'image de couverture +workTitle: "Travail de bachelor" +workFor: "..." +bibliography: my.bib +csl: iso690.csl +biblio-title: Références documentaires +link-citations: true +autoSectionLabels: false +autoEqnLabels: true +lang: fr +documentclass: report +papersize: A4 +cref: false +fontsize: 12pt +linestretch: 1.5 +geometry: + - left=25mm + - right=25mm + - headheight=25mm + - top=25mm + - bottom=25mm +toc: true +toc-depth: 2 +header-includes: | + \usepackage{fontspec} + \usepackage{graphicx} + \usepackage{sectsty} + \usepackage{enumitem} + \usepackage[toc]{glossaries} + \usepackage{wrapfig} + \usepackage{subcaption} + + \makenoidxglossaries + \sectionfont{\fontsize{12}{15}\selectfont} + \subsectionfont{\fontsize{12}{15}\selectfont} + \setlist[itemize]{label=\textbullet} + \input{text/ZZ-glossaire.tex} +--- diff --git a/src/figs/amdahls-law.png b/src/figs/amdahls-law.png new file mode 100644 index 0000000000000000000000000000000000000000..60fdf744578d7fe94a950d3dab2efb696db5f618 Binary files /dev/null and b/src/figs/amdahls-law.png differ diff --git a/src/figs/futhark.png b/src/figs/futhark.png new file mode 100644 index 0000000000000000000000000000000000000000..8fdabf6c262266fa3e07fad95e2af4a38adefcf2 Binary files /dev/null and b/src/figs/futhark.png differ diff --git a/src/figs/gol-blinker.graffle b/src/figs/gol-blinker.graffle new file mode 100644 index 0000000000000000000000000000000000000000..5d5a3b6b53d69a71d34a2b37a0899c8e30c3d354 Binary files /dev/null and b/src/figs/gol-blinker.graffle differ diff --git a/src/figs/gol_blinker1.png b/src/figs/gol_blinker1.png new file mode 100644 index 0000000000000000000000000000000000000000..0df7e4533758957e09a90bfcd2f575db78337b65 Binary files /dev/null and b/src/figs/gol_blinker1.png differ diff --git a/src/figs/gol_blinker2.png b/src/figs/gol_blinker2.png new file mode 100644 index 0000000000000000000000000000000000000000..353d481ffcfe190b82496af018e5f6b44076d144 Binary files /dev/null and b/src/figs/gol_blinker2.png differ diff --git a/src/figs/gol_result_and_speedup_cpu.png b/src/figs/gol_result_and_speedup_cpu.png new file mode 100644 index 0000000000000000000000000000000000000000..0ef2be6adf8e25cd97a4fdadee00bffb5c3fad71 Binary files /dev/null and b/src/figs/gol_result_and_speedup_cpu.png differ diff --git a/src/figs/gustafson-law.png b/src/figs/gustafson-law.png new file mode 100644 index 0000000000000000000000000000000000000000..14841a52957c10fd7a13d177751c8b5f085d63db Binary files /dev/null and b/src/figs/gustafson-law.png differ diff --git a/src/figs/hepia.png b/src/figs/hepia.png new file mode 100644 index 0000000000000000000000000000000000000000..c147c8ba9ca2424fe502a62c602b30c6604b46f2 Binary files /dev/null and b/src/figs/hepia.png differ diff --git a/src/figs/hes.png b/src/figs/hes.png new file mode 100644 index 0000000000000000000000000000000000000000..b1c0d6011571f9b917c014383f17a8e389c3e1a3 Binary files /dev/null and b/src/figs/hes.png differ diff --git a/src/iso690.csl b/src/iso690.csl new file mode 100644 index 0000000000000000000000000000000000000000..93cca47ed37c6963ddc6ecb0966e8393d2b9e870 --- /dev/null +++ b/src/iso690.csl @@ -0,0 +1,493 @@ +<?xml version="1.0" encoding="utf-8"?> +<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" default-locale="fr-FR"> + <info> + <title>ISO-690 (numeric, French)</title> + <id>http://www.zotero.org/styles/iso690-numeric-fr</id> + <link href="http://www.zotero.org/styles/iso690-numeric-fr" rel="self"/> + <link href="https://forums.zotero.org/discussion/23511" rel="documentation"/> + <author> + <name>Laure Mellifluo</name> + <email>laure.melli@gmail.com</email> + </author> + <author> + <name>Raphael Grolimund</name> + <email>raphael.grolimund@epfl.ch</email> + </author> + <author> + <name>Michel Hardegger</name> + <email>hardegger@gmail.com</email> + </author> + <category citation-format="numeric"/> + <category field="generic-base"/> + <summary>Style based on ISO 690:2010(F), V1.1</summary> + <updated>2015-01-22T16:03:28+00:00</updated> + <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> + </info> + <locale> + <terms> + <term name="no date">[sans date]</term> + <term name="in">in</term> + <term name="online">en ligne</term> + <term name="accessed">consulté le</term> + <term name="retrieved">disponible</term> + <term name="from">à l'adresse</term> + </terms> + </locale> + <macro name="author"> + <names variable="author"> + <name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never"> + <name-part name="family" text-case="uppercase"/> + <name-part name="given"/> + </name> + </names> + </macro> + <macro name="editor"> + <names variable="editor"> + <name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never"> + <name-part name="family" text-case="uppercase"/> + <name-part name="given"/> + </name> + <label prefix=" (" form="short" suffix=".)"/> + </names> + </macro> + <macro name="translator"> + <names variable="translator"> + <name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never"> + <name-part name="family" text-case="uppercase"/> + <name-part name="given"/> + </name> + <label prefix=" (" form="short" suffix=".)"/> + </names> + </macro> + <macro name="responsability"> + <choose> + <if variable="author editor translator" match="any"> + <choose> + <if variable="author"> + <text macro="author"/> + </if> + <else-if variable="editor"> + <text macro="editor"/> + </else-if> + <else> + <text macro="translator"/> + </else> + </choose> + </if> + </choose> + </macro> + <macro name="container-author"> + <names variable="container-author"> + <name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never"> + <name-part name="family" text-case="uppercase"/> + <name-part name="given"/> + </name> + </names> + </macro> + <macro name="container-responsability"> + <choose> + <if variable="container-author editor translator" match="any"> + <choose> + <if variable="container-author"> + <text macro="container-author"/> + </if> + <else-if variable="editor"> + <text macro="editor"/> + </else-if> + <else> + <text macro="translator"/> + </else> + </choose> + </if> + </choose> + </macro> + <macro name="year-date"> + <choose> + <if variable="issued"> + <date variable="issued"> + <date-part name="year" form="long"/> + </date> + </if> + <else> + <text term="no date"/> + </else> + </choose> + </macro> + <macro name="title"> + <choose> + <if type="book thesis map motion_picture song manuscript" match="any"> + <text variable="title" font-style="italic"/> + </if> + <else-if type="paper-conference speech chapter article-journal article-magazine article-newspaper entry entry-dictionary entry-encyclopedia post-weblog post webpage broadcast" match="any"> + <text variable="title" suffix=". "/> + <choose> + <if type="chapter paper-conference" match="any"> + <text term="in" text-case="capitalize-first" suffix=" : "/> + </if> + </choose> + <choose> + <if variable="container-author editor translator" match="any"> + <text macro="container-responsability"/> + <choose> + <if variable="container-title event" match="any"> + <text value=", "/> + </if> + </choose> + </if> + </choose> + <choose> + <if variable="container-title"> + <text variable="container-title" font-style="italic"/> + </if> + <else> + <text variable="event" font-style="italic"/> + </else> + </choose> + </else-if> + <else-if type="report"> + <text variable="number" suffix=": "/> + <text variable="title" font-style="italic"/> + </else-if> + <else-if type="patent"> + <text variable="title"/> + </else-if> + <else> + <text variable="title" font-style="italic"/> + </else> + </choose> + <choose> + <if variable="URL"> + <text term="online" prefix=" [" suffix="]"/> + </if> + </choose> + </macro> + <macro name="number"> + <text variable="number"/> + </macro> + <macro name="medium"> + <text variable="medium" prefix=" [" suffix="]"/> + </macro> + <macro name="genre"> + <choose> + <if type="map"> + <choose> + <if variable="genre"> + <text variable="genre" prefix="[" suffix="]"/> + </if> + <else> + <text value="carte" prefix="[" suffix="]"/> + </else> + </choose> + </if> + <else> + <text variable="genre"/> + </else> + </choose> + </macro> + <macro name="date"> + <choose> + <if variable="issued"> + <date variable="issued"> + <date-part name="day" suffix=" "/> + <date-part name="month" suffix=" "/> + <date-part name="year"/> + </date> + </if> + </choose> + </macro> + <macro name="edition"> + <text variable="edition" form="long"/> + </macro> + <macro name="publisher-group"> + <group delimiter=" : "> + <text variable="publisher-place"/> + <text variable="publisher"/> + </group> + </macro> + <macro name="issue"> + <group delimiter=", "> + <text variable="volume" prefix="Vol. "/> + <choose> + <if variable="volume"> + <text variable="issue" prefix="n° "/> + <text variable="page" prefix="pp. "/> + </if> + <else-if variable="issue"> + <text variable="issue" prefix="N° "/> + <text variable="page" prefix="pp. "/> + </else-if> + <else> + <text variable="page" prefix="pp. "/> + </else> + </choose> + </group> + </macro> + <macro name="accessed"> + <choose> + <if variable="URL"> + <group prefix=" [" suffix="]"> + <text term="accessed" text-case="capitalize-first"/> + <date variable="accessed"> + <date-part name="day" prefix=" "/> + <date-part name="month" prefix=" "/> + <date-part name="year" prefix=" "/> + </date> + </group> + </if> + </choose> + </macro> + <macro name="collection"> + <group delimiter=", "> + <text variable="collection-title"/> + <text variable="collection-number"/> + </group> + </macro> + <macro name="page"> + <choose> + <if type="book thesis manuscript" match="any"> + <text variable="number-of-pages" suffix=" p"/> + </if> + <else-if type="chapter paper-conference article-newspaper" match="any"> + <text variable="page" prefix="pp. "/> + </else-if> + <else-if type="report patent" match="any"> + <text variable="page" suffix=" p"/> + </else-if> + </choose> + </macro> + <macro name="isbn"> + <text variable="ISBN" prefix="ISBN "/> + </macro> + <macro name="doi"> + <text variable="DOI" prefix="DOI "/> + </macro> + <macro name="url"> + <choose> + <if variable="URL"> + <group> + <text term="retrieved" suffix=" " text-case="capitalize-first"/> + <text term="from" suffix=" : "/> + <text variable="URL"/> + </group> + </if> + </choose> + </macro> + <macro name="archive"> + <group delimiter=": "> + <text variable="archive"/> + <text macro="archive_location"/> + </group> + </macro> + <macro name="archive_location"> + <choose> + <if variable="archive_location"> + <text variable="archive_location"/> + </if> + <else> + <text variable="call-number"/> + </else> + </choose> + </macro> + <macro name="abstract"> + <text variable="abstract"/> + </macro> + <macro name="note"> + <text variable="note"/> + </macro> + <citation collapse="citation-number" after-collapse-delimiter="; "> + <sort> + <key variable="citation-number"/> + </sort> + <layout prefix="(" suffix=")" delimiter=", "> + <group delimiter=", "> + <text variable="citation-number"/> + <group> + <label variable="locator" suffix=". " form="short" strip-periods="true"/> + <text variable="locator"/> + </group> + </group> + </layout> + </citation> + <bibliography> + <sort> + <key variable="citation-number"/> + </sort> + <layout> + <text variable="citation-number" display="left-margin" font-weight="bold" suffix=". "/> + <choose> + <if type="book map" match="any"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="genre" suffix=". "/> + <text macro="edition" suffix=". "/> + <text macro="publisher-group" suffix=", "/> + <text macro="year-date" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="collection" suffix=". "/> + <text macro="isbn" suffix=". "/> + <text macro="url"/> + </group> + </if> + <else-if type="article-journal article-magazine" match="any"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="edition" suffix=". "/> + <text macro="date" suffix=". "/> + <text macro="issue" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="doi" suffix=". "/> + <text macro="url"/> + </group> + </else-if> + <else-if type="article-newspaper"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="edition" suffix=". "/> + <text macro="publisher-group" suffix=", "/> + <text macro="date" suffix=". "/> + <text macro="page" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="url"/> + </group> + </else-if> + <else-if type="chapter entry entry-dictionary entry-encyclopedia" match="any"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" font-style="normal" suffix=". "/> + <text macro="edition" suffix=". "/> + <text macro="publisher-group" suffix=", "/> + <text macro="year-date" suffix=". "/> + <text macro="page" suffix=". "/> + <text macro="collection" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="isbn" suffix=". "/> + <text macro="url"/> + </group> + </else-if> + <else-if type="speech"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="genre" suffix=". "/> + <text macro="publisher-group" suffix=". "/> + <text macro="date" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="page" suffix=". "/> + <text macro="url"/> + </group> + </else-if> + <else-if type="paper-conference"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="genre" suffix=". "/> + <text macro="publisher-group" suffix=", "/> + <text macro="date" suffix=". "/> + <text macro="page" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="collection" suffix=". "/> + <text macro="isbn" suffix=". "/> + <text macro="url"/> + </group> + </else-if> + <else-if type="thesis"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="genre" suffix=". "/> + <text macro="publisher-group" suffix=", "/> + <text macro="year-date" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="url"/> + </group> + </else-if> + <else-if type="post-weblog post webpage" match="any"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="date" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="url"/> + </group> + </else-if> + <else-if type="broadcast motion_picture song" match="any"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="medium" suffix=". "/> + <text macro="publisher-group" suffix=", "/> + <text macro="date" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="collection" suffix=". "/> + <text macro="isbn" suffix=". "/> + <text macro="url"/> + </group> + </else-if> + <else-if type="report" match="any"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="genre" suffix=". "/> + <text macro="edition" suffix=". "/> + <text macro="publisher-group" suffix=", "/> + <text macro="year-date" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="collection" suffix=". "/> + <text macro="url"/> + </group> + </else-if> + <else-if type="manuscript" match="any"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="genre" suffix=". "/> + <text macro="edition" suffix=". "/> + <text macro="publisher-group" suffix=", "/> + <text macro="year-date" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="collection" suffix=". "/> + <text macro="url"/> + </group> + </else-if> + <else-if type="patent"> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="number" suffix=". "/> + <text macro="date" suffix=". "/> + <text macro="publisher-group" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="collection" suffix=". "/> + <text macro="url"/> + </group> + </else-if> + <else> + <group display="right-inline"> + <text macro="responsability" suffix=". "/> + <text macro="title" suffix=". "/> + <text macro="medium" suffix=". "/> + <text macro="genre" suffix=". "/> + <text macro="date" suffix=". "/> + <text macro="edition" suffix=". "/> + <text macro="publisher-group" suffix=". "/> + <text macro="number" suffix=". "/> + <text macro="accessed" suffix=". "/> + <text macro="collection" suffix=". "/> + <text macro="page" suffix=". "/> + <text macro="isbn" suffix=". "/> + <text macro="url"/> + </group> + </else> + </choose> + <group display="right-inline"> + <text macro="archive"/> + </group> + <group display="right-inline"> + <text macro="note"/> + </group> + </layout> + </bibliography> +</style> diff --git a/src/meta-vars.lua b/src/meta-vars.lua new file mode 100644 index 0000000000000000000000000000000000000000..eebede7c0a53bd5274617aed7c5bfe4262a9d7ed --- /dev/null +++ b/src/meta-vars.lua @@ -0,0 +1,53 @@ +function replace(front, ac, back, command) + + new_str = string.format("%s\\%s{%s}%s", front, command, ac, back) + + return new_str +end + +function Str(el) + + front, capital, plural, ac, apostrophe, back = el.text:match( + "(%g*)%(([%+%-]+)(%^-)(%w+[_%-]*%w*)%)([%\u{0027}%\u{2019}]*)(%g*)" + ) + + if ac ~= "" then + if plural == "^" then + if capital == "++" then + command = "Glspl" + elseif capital == "+" then + command = "glspl" + elseif capital == "-+" then + command = "Glsentryplural" + elseif capital == "-" then + command = "glsentryplural" + else + -- Unknown command string so just return the element unchanged + return el + end + else + if capital == "++" then + command = "Gls" + elseif capital == "+" then + command = "gls" + elseif capital == "-+" then + command = "Glsentryname" + elseif capital == "-" then + command = "glsentryname" + else + -- Unknown command string so just return the element unchanged + return el + end + end + + if apostrophe == "\u{0027}" or apostrophe == "\u{2019}" then + if back ~= "" then + back = string.format("\\textquotesingle %s", back) + else + back = "\\textquotesingle\\space" + end + end + + return pandoc.RawInline("tex", replace(front, ac, back, command)) + end +end diff --git a/src/my.bib b/src/my.bib new file mode 100644 index 0000000000000000000000000000000000000000..8369d955857fde9f2322eaf06cda09abc8b83721 --- /dev/null +++ b/src/my.bib @@ -0,0 +1,125 @@ +@online{kendall_mpi_nodate, + title = {{MPI} Send and Receive · {MPI} Tutorial}, + url = {https://mpitutorial.com/tutorials/mpi-send-and-receive/}, + author = {Kendall, Wes}, + urldate = {2021-03-03}, + file = {MPI Send and Receive · MPI Tutorial:/Users/baptistecdr/Zotero/storage/Y5W9BQBP/mpi-send-and-receive.html:text/html}, +} + +@inreference{noauthor_jeu_2020, + title = {Jeu de la vie}, + rights = {Creative Commons Attribution-{ShareAlike} License}, + url = {https://fr.wikipedia.org/w/index.php?title=Jeu_de_la_vie}, + abstract = {Le jeu de la vie est un automate cellulaire imaginé par John Horton Conway en 1970 et qui est probablement le plus connu de tous les automates cellulaires. Malgré des règles très simples, le jeu de la vie est Turing-complet. +Le jeu de la vie est un jeu de simulation au sens mathématique plutôt que ludique. Bien que n'étant pas décrit par la théorie des jeux, certains le décrivent comme un « jeu à zéro joueur ».}, + booktitle = {Wikipédia}, + urldate = {2021-03-03}, + date = {2020-11-24}, + langid = {french}, + file = {Snapshot:/Users/baptistecdr/Zotero/storage/ECF2P336/index.html:text/html}, +} + +@online{noauthor_basic_nodate, + title = {Basic usage with the factorial function}, + url = {https://futhark-lang.org/examples/fact.html}, + urldate = {2021-03-03}, + file = {Basic usage with the factorial function:/Users/baptistecdr/Zotero/storage/B6VQZVH5/fact.html:text/html}, +} + +@inreference{noauthor_message_2020, + title = {Message Passing Interface}, + rights = {Creative Commons Attribution-{ShareAlike} License}, + url = {https://fr.wikipedia.org/w/index.php?title=Message_Passing_Interface}, + abstract = {Message Passing Interface ({MPI}), est une norme conçue en 1993-94 pour le passage de messages entre ordinateurs distants ou dans un ordinateur multiprocesseur. Elle est devenue de facto un standard de communication pour des nœuds exécutant des programmes parallèles sur des systèmes à mémoire distribuée. Elle définit une bibliothèque de fonctions, utilisable avec les langages C, C++ et Fortran. +{MPI} a été écrite pour obtenir de bonnes performances aussi bien sur des machines massivement parallèles à mémoire partagée que sur des clusters d'ordinateurs hétérogènes à mémoire distribuée. Elle est disponible sur de très nombreux matériels et systèmes d'exploitation. Ainsi, {MPI} possède l'avantage par rapport aux plus vieilles bibliothèques de passage de messages d'être grandement portable (car {MPI} a été implémentée sur presque toutes les architectures de mémoires) et rapide (car chaque implémentation a été optimisée pour le matériel sur lequel il s'exécute). +Depuis 1997, une nouvelle version de {MPI} est disponible, {MPI}-2, qui apporte quelques puissantes[évasif] fonctionnalités supplémentaires[Lesquels ?].}, + booktitle = {Wikipédia}, + urldate = {2021-03-03}, + date = {2020-08-18}, + langid = {french}, + file = {Snapshot:/Users/baptistecdr/Zotero/storage/LYSKJH5C/index.html:text/html}, +} + +@online{noauthor_mpi_nodate, + title = {{MPI} Forum}, + url = {https://www.mpi-forum.org/}, + urldate = {2021-03-03}, + langid = {english}, + file = {Snapshot:/Users/baptistecdr/Zotero/storage/FZMLQQ7X/www.mpi-forum.org.html:text/html}, +} + +@online{noauthor_filegol-blinker1png_nodate, + title = {File:Gol-blinker1.png}, + url = {https://commons.wikimedia.org/wiki/File:Gol-blinker1.png}, + shorttitle = {File}, + urldate = {2021-03-03}, + langid = {english}, + file = {Snapshot:/Users/baptistecdr/Zotero/storage/9KAMIL8Z/FileGol-blinker1.html:text/html}, +} + +@online{noauthor_filegol-blinker2png_nodate, + title = {File:Gol-blinker2.png}, + url = {https://commons.wikimedia.org/wiki/File:Gol-blinker2.png}, + shorttitle = {File}, + urldate = {2021-03-03}, + langid = {english}, + file = {Snapshot:/Users/baptistecdr/Zotero/storage/NJBL98JF/FileGol-blinker2.html:text/html}, +} + +@artwork{wikipedia_speed-up_2008, + title = {The speed-up of a program from parallelization is limited by how much of the program can be parallelized.}, + url = {https://commons.wikimedia.org/wiki/File:AmdahlsLaw.svg}, + shorttitle = {Amdahl's law}, + author = {Wikipedia, Daniels220}, + urldate = {2021-03-03}, + date = {2008-04-13}, + file = {Wikimedia Snapshot:/Users/baptistecdr/Zotero/storage/IQD37NXE/FileAmdahlsLaw.html:text/html}, +} + +@artwork{peahihawaii_speedup_nodate, + title = {Speedup according to Gustafson's Law.}, + rights = {Permission is granted to copy, distribute and/or modify this document under the terms of the {GNU} Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled {GNU} Free Documentation License.http://www.gnu.org/copyleft/fdl.{htmlGFDLGNU} Free Documentation Licensetruetrue}, + url = {https://commons.wikimedia.org/wiki/File:Gustafson.png}, + shorttitle = {Gustafson's law}, + author = {{Peahihawaii}}, + urldate = {2021-03-03}, + file = {Wikimedia Snapshot:/Users/baptistecdr/Zotero/storage/FPBB7RUJ/FileGustafson.html:text/html}, +} + +@inreference{noauthor_parallelisme_2021, + title = {Parallélisme (informatique)}, + rights = {Creative Commons Attribution-{ShareAlike} License}, + url = {https://fr.wikipedia.org/w/index.php?title=Parall%C3%A9lisme_(informatique)}, + abstract = {En informatique, le parallélisme consiste à mettre en œuvre des architectures d'électronique numérique permettant de traiter des informations de manière simultanée, ainsi que les algorithmes spécialisés pour celles-ci. Ces techniques ont pour but de réaliser le plus grand nombre d'opérations en un temps le plus petit possible. +Les architectures parallèles sont devenues le paradigme dominant pour tous les ordinateurs depuis les années 2000. En effet, la vitesse de traitement qui est liée à l'augmentation de la fréquence des processeurs connait des limites. La création de processeurs multi-cœurs, traitant plusieurs instructions en même temps au sein du même composant, résout ce dilemme pour les machines de bureau depuis le milieu des années 2000. +Pour être efficaces, les méthodes utilisées pour la programmation des différentes tâches qui constituent un programme sont spécifiques à ce mode de calcul, c'est-à-dire que les programmes doivent être réalisés avec cette optique. Ces méthodes ont initialement été développées de manière théorique et sur des superordinateurs, qui étaient à une période les seuls à compter de nombreux processeurs, mais sont de plus en plus volontiers utilisées par les développeurs de logiciel du fait de l'omniprésence de telles architectures. +Certains types de calculs se prêtent particulièrement bien à la parallélisation : la dynamique des fluides, les prédictions météorologiques, la modélisation et simulation de problèmes de dimensions plus grandes, le traitement de l'information et l'exploration de données, le décryptage de messages, la recherche de mots de passe, le traitement d'images ou la fabrication d'images de synthèse, tels que le lancer de rayon, l'intelligence artificielle et la fabrication automatisée. Initialement, c'est dans le domaine des supercalculateurs que le parallélisme a été utilisé, à des fins scientifiques.}, + booktitle = {Wikipédia}, + urldate = {2021-03-03}, + date = {2021-02-07}, + langid = {french}, + file = {Snapshot:/Users/baptistecdr/Zotero/storage/92MTSL2B/index.html:text/html}, +} + +@inreference{noauthor_programmation_2021, + title = {Programmation fonctionnelle}, + rights = {Creative Commons Attribution-{ShareAlike} License}, + url = {https://fr.wikipedia.org/w/index.php?title=Programmation_fonctionnelle}, + abstract = {La programmation fonctionnelle est un paradigme de programmation de type déclaratif qui considère le calcul en tant qu'évaluation de fonctions mathématiques. +Comme le changement d'état et la mutation des données ne peuvent pas être représentés par des évaluations de fonctions la programmation fonctionnelle ne les admet pas, au contraire elle met en avant l'application des fonctions, contrairement au modèle de programmation impérative qui met en avant les changements d'état. +Un langage fonctionnel est donc un langage de programmation dont la syntaxe et les caractéristiques encouragent la programmation fonctionnelle. Alors que l'origine de la programmation fonctionnelle peut être trouvée dans le lambda-calcul, le langage fonctionnel le plus ancien est Lisp, créé en 1958 par {McCarthy}. Lisp a donné naissance à des variantes telles que Scheme (1975) et Common Lisp (1984) qui, comme Lisp, ne sont pas ou peu typées. Des langages fonctionnels plus récents tels {ML} (1973), Haskell (1987), {OCaml}, Erlang, Clean et Oz, {CDuce}, Scala (2003), F\# ou {PureScript} (2013), Agda (en) sont fortement typés.}, + booktitle = {Wikipédia}, + urldate = {2021-03-10}, + date = {2021-01-27}, + langid = {french}, + file = {Snapshot:/Users/baptistecdr/Zotero/storage/3ZY5HPXJ/index.html:text/html}, +} + +@artwork{muidark_elder_nodate, + title = {Elder futhark}, + url = {https://commons.wikimedia.org/wiki/File:Elder_futhark.png}, + shorttitle = {Elder futhark}, + author = {{MuiDark}}, + urldate = {2021-03-13}, + file = {Wikimedia Snapshot:/Users/baptistecdr/Zotero/storage/YG6H6Z6R/FileElder_futhark.html:text/html}, +} diff --git a/src/templates/default.latex b/src/templates/default.latex new file mode 100644 index 0000000000000000000000000000000000000000..0678481aa0bef59bbafbe591c11ef6002ccbfa2e --- /dev/null +++ b/src/templates/default.latex @@ -0,0 +1,428 @@ +\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} +$if(beamerarticle)$ +\usepackage{beamerarticle} % needs to be loaded first +$endif$ +$if(fontfamily)$ +\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} +$else$ +\usepackage{lmodern} +$endif$ +$if(linestretch)$ +\usepackage{setspace} +\setstretch{$linestretch$} +$endif$ +\usepackage{amssymb,amsmath,bm} +\usepackage{ifxetex,ifluatex} +\usepackage{tabularx} +\usepackage{fixltx2e} % provides \textsubscript +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} + \usepackage[utf8]{inputenc} +$if(euro)$ + \usepackage{eurosym} +$endif$ +\else % if luatex or xelatex +$if(mathspec)$ + \ifxetex + \usepackage{mathspec} + \else + \usepackage{unicode-math} + \fi +$else$ + \usepackage{unicode-math} +$endif$ + \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} +$for(fontfamilies)$ + \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$} +$endfor$ +$if(euro)$ + \newcommand{\euro}{€} +$endif$ +$if(mainfont)$ + \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} +$endif$ +$if(sansfont)$ + \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} +$endif$ +$if(monofont)$ + \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} +$endif$ +$if(mathfont)$ +$if(mathspec)$ + \ifxetex + \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \else + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \fi +$else$ + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} +$endif$ +$endif$ +$if(CJKmainfont)$ + \usepackage{xeCJK} + \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} +$endif$ +\fi +% use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +% use microtype if available +\IfFileExists{microtype.sty}{% +\usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} +\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} +\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref +$if(verbatim-in-note)$ +\usepackage{fancyvrb} +$endif$ +\usepackage[unicode=true]{hyperref} +$if(colorlinks)$ +\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref +$endif$ +\hypersetup{ +$if(title-meta)$ + pdftitle={$title-meta$}, +$endif$ +$if(author-meta)$ + pdfauthor={$author-meta$}, +$endif$ +$if(keywords)$ + pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, +$endif$ +$if(colorlinks)$ + colorlinks=true, + linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, + citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, + urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, +$else$ + pdfborder={0 0 0}, +$endif$ + breaklinks=true} +\urlstyle{same} % don't use monospace font for urls +$if(verbatim-in-note)$ +\VerbatimFootnotes % allows verbatim text in footnotes +$endif$ +$if(geometry)$ +\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} +$endif$ +$if(lang)$ +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} +$if(babel-newcommands)$ + $babel-newcommands$ +$endif$ +\else + \usepackage{polyglossia} + \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} +$for(polyglossia-otherlangs)$ + \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} +$endfor$ +\fi +$endif$ +$if(natbib)$ +\usepackage{natbib} +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} +$endif$ +$if(biblatex)$ +\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} +$for(bibliography)$ +\addbibresource{$bibliography$} +$endfor$ +$endif$ +$if(listings)$ +\usepackage{listings} +$endif$ +$if(lhs)$ +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} +$endif$ +$if(highlighting-macros)$ +$highlighting-macros$ +$endif$ +$if(tables)$ +\usepackage{longtable,booktabs} +% Fix footnotes in tables (requires footnote package) +\IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{long table}}{} +$endif$ +$if(graphics)$ +\usepackage{graphicx,grffile} +\makeatletter +\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} +\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} +\makeatother +% Scale images if necessary, so that they will not overflow the page +% margins by default, and it is still possible to overwrite the defaults +% using explicit options in \includegraphics[width, height, ...]{} +\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} +$endif$ +$if(links-as-notes)$ +% Make links footnotes instead of hotlinks: +\renewcommand{\href}[2]{#2\footnote{\url{#1}}} +$endif$ +$if(strikeout)$ +\usepackage[normalem]{ulem} +% avoid problems with \sout in headers with hyperref: +\pdfstringdefDisableCommands{\renewcommand{\sout}{}} +$endif$ +$if(indent)$ +$else$ +\IfFileExists{parskip.sty}{% +\usepackage{parskip} +}{% else +\setlength{\parindent}{0pt} +\setlength{\parskip}{6pt plus 2pt minus 1pt} +} +$endif$ +\setlength{\emergencystretch}{3em} % prevent overfull lines +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} + +$if(subparagraph)$ +$else$ +% Redefines (sub)paragraphs to behave more like sections +\ifx\paragraph\undefined\else +\let\oldparagraph\paragraph +\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else +\let\oldsubparagraph\subparagraph +\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi +$endif$ +$if(dir)$ +\ifxetex + % load bidi as late as possible as it modifies e.g. graphicx + $if(latex-dir-rtl)$ + \usepackage[RTLdocument]{bidi} + $else$ + \usepackage{bidi} + $endif$ +\fi +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \TeXXeTstate=1 + \newcommand{\RL}[1]{\beginR #1\endR} + \newcommand{\LR}[1]{\beginL #1\endL} + \newenvironment{RTL}{\beginR}{\endR} + \newenvironment{LTR}{\beginL}{\endL} +\fi +$endif$ + +% set default figure placement to htbp +\makeatletter +\def\fps@figure{htbp} +\makeatother + +$for(header-includes)$ +$header-includes$ +$endfor$ + +$if(title)$ +\title{$title$} +$endif$ +$if(subtitle)$ +\providecommand{\subtitle}[1]{} +\subtitle{$subtitle$} +$endif$ +$if(author)$ +\author{$for(author)$$author$$sep$ \and $endfor$} +$endif$ +$if(institute)$ +\providecommand{\institute}[1]{} +\institute{$for(institute)$$institute$$sep$ \and $endfor$} +$endif$ +\date{$date$} + +% CUSTOM PACKAGES +\usepackage[nottoc]{tocbibind} +\usepackage{titlesec} +\usepackage[color=black,opacity=0.5,angle=0,scale=1,]{background} +\usepackage[absolute]{textpos} +\usepackage{tocloft} +\usepackage{svg} +% END OF CUSTOM PACKAGES + +% CUSTOM PACKAGES ROUTINES +\titleformat{\chapter}[display]{\centering\normalfont\LARGE\bfseries}{Chapitre \thechapter :}{10pt}{\LARGE} +\titleformat{\section}{\large\normalfont\bfseries}{\thesection. }{10pt}{\large} +\titleformat{\subsection}{\normalfont\bfseries}{\hspace{.75cm}\alph{subsection}) }{10pt}{} + +\backgroundsetup{ + contents={% + \small{$name$, $surname$ - $smallTitle$ - $workTitle$ - $projectMonth$ $year$} + }, + position={3.9, 0.5} +} +% END OF CUSTOM PACKAGE ROUTINES + +% CUSTOM ROUTINES +\renewcommand{\thesubsection}{\thesection.\alph{subsection}} % Pour définir les sous sections en mode 1.1.A et non pas 1.1.1 +\usepackage{setspace} % Interligne +\onehalfspacing +% Problèmes biblio réglés plus bas +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newlength{\csllabelwidth} +\setlength{\csllabelwidth}{1.5em} +\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry spacing + {% don't indent paragraphs + \setlength{\parindent}{0pt} + % turn on hanging indent if param 1 is 1 + \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi + % set entry spacing + \ifnum #2 > 0 + \setlength{\parskip}{#2\baselineskip} + \fi + }% + {} +\usepackage{calc} % for \widthof, \maxof +\newcommand{\CSLBlock}[1]{#1\hfill\break} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\maxof{\widthof{#1}}{\csllabelwidth}}{#1}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{152mm}{#1}} % +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$endif$ +% Appendices +\newcommand{\listappendicesname}{Liste des annexes} +\newlistof{appendices}{apc}{\listappendicesname} +\newcommand{\appendices}[1]{\addcontentsline{apc}{appendices}{#1}\addcontentsline{toc}{section}{#1}} +\newcommand{\newappendix}[1]{\section*{#1}\appendices{#1}} +% Raccourcis +\newcommand{\img}[4]{% \img{path}{settings}{caption}{source} + \begin{figure} + \includegraphics[#2]{#1} + \caption{#3} + \caption*{\textit{#4}} + \end{figure} +} +\newcommand{\cimg}[4]{% \img{path}{settings}{caption}{source} + \begin{figure} + \centering + \includegraphics[#2]{#1} + \caption{#3} + \caption*{\textit{#4}} + \end{figure} +} +% END OF CUSTOM ROUTINES + +\begin{document} +% Nom conformes des tables +\renewcommand*\listfigurename{Liste des illustrations} +\renewcommand*\listtablename{Liste des tableaux} +% Sets the page numbering style to roman +%\pagestyle{headings} +\setcounter{page}{1} +\pagenumbering{roman} + +% Hides the page number for the cover page +\thispagestyle{empty} +% Hides the header for the cover page +\NoBgThispage +% Cover page +\begin{figure} + \begin{sffamily} + \begin{minipage}{.4\textwidth} + \centering + \hspace*{-3cm}\includegraphics[scale=1]{figs/hepia.png} + \end{minipage}\qquad + \begin{minipage}{.4\textwidth} + \centering + \hspace*{5cm}\includegraphics[scale=1]{figs/hes.png} + \end{minipage} + \end{sffamily} +\end{figure} + +\begin{center} + \huge{$title$}\\ + \vspace{.5cm} + \IfFileExists{figs/front-logo.png}{ + \includegraphics[scale=1.2]{figs/front-logo.png}\\ + }{ + \vspace{8cm} + } + + \vspace{1mm} + \Large{$workTitle$ présenté par}\\ + \vspace{1mm} + \textbf{\Large{$author$}}\\ + \vspace{2mm} + + \vspace{3mm} + \textbf{\Large{Ingénierie des technologies de l’information avec orientation en $orientation$}} + + \vspace{3mm} + \large{\textbf{$projectMonth$ $year$}}\\ + \vspace{5mm} + \begin{tabular}{ p{6cm} } + \multicolumn{1}{c}{Professeur HES responsable}\\ + \multicolumn{1}{c}{\textbf{$sensei$}}\\ + \end{tabular} +\end{center} +% End of cover page + +\pagebreak +% Hides the page number on page two +\thispagestyle{empty} +% Illustration URL page +\vspace*{\fill} +\IfFileExists{figs/front-logo.png}{ + $frontLogoLegend$ \url{$frontLogoSourceURL$} +}{ + Cette page a été laissée blanche intentionnellement. +} +% End of illustration URL page + +\pagebreak + +$for(include-before)$ +$include-before$ +$endfor$ + +\pagebreak +% Table of contents +$if(toc)$ +{ +$if(colorlinks)$ +\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$} +$endif$ +\setcounter{tocdepth}{$toc-depth$} +\tableofcontents +} +$endif$ +% End of table of contents + +\pagebreak +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$endif$ + +$if(lot)$ +\listoftables +$endif$ +$if(lof)$ +\listoffigures +$endif$ +$body$ + +$if(natbib)$ +$if(bibliography)$ +$if(biblio-title)$ +$if(book-class)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} + +$endif$ +$endif$ +$if(biblatex)$ +\printbibliography$if(biblio-title)$[title=$biblio-title$] +$endif$ + +$endif$ +$for(include-after)$ +$include-after$ + +$endfor$ +\end{document} diff --git a/src/templates/extremely-blank.latex b/src/templates/extremely-blank.latex new file mode 100644 index 0000000000000000000000000000000000000000..f37d7c6dce58b8562418d2af96ac8e6f5e8bcb14 --- /dev/null +++ b/src/templates/extremely-blank.latex @@ -0,0 +1 @@ +$body$ \ No newline at end of file diff --git a/src/text/00-preface.md b/src/text/00-preface.md new file mode 100644 index 0000000000000000000000000000000000000000..5dabdc0c9ebd1e0b8466eaa7c6c41db89f8e3c95 --- /dev/null +++ b/src/text/00-preface.md @@ -0,0 +1,20 @@ +# Acknowledgements {-} + +I would like to thank the people who helped me during this project: + +* Dr. Orestis Malaspinas, for his supervision and help on the project, +* Michaël El Kharroubi, for his help on the project, +* Dr. Troels Henriksen, for his answers to my questions, +* Theo Pirkl, for the model of the bachelor thesis. + +# Abstract {-} + +Today, most computers are equipped with GPUs. They provide more and more computing cores and have become real embedded high performance computing tools. In this context, the number of applications taking advantage of these tools seems low at first glance. The problem is that the development tools are heterogeneous, complex and strongly dependent on the GPU running the code. Futhark is an experimental, functional and architecture agnostic language, that is why it seems relevant to study it. It allows generating code allowing a standard sequential execution (on a single core processor), on GPU (with CUDA and OpenCL backends), on several cores of the same processor (shared memory). To make it a tool that could be used on all high performance platforms, it lacks support for distributed computing. In this work the goal is to develop a library that can port any Futhark code to an MPI library with as little effort as possible. + +\begin{figure} \vspace{.1cm} \begin{center} \includegraphics[width=3.72cm,height=2.4cm]{figs/front-logo.png} +\end{center} \end{figure} \begin{tabular}{ p{3cm} p{1cm} p{1cm} p{6cm} } \multicolumn{1}{l}{Candidat :}& & & +\multicolumn{1}{l}{Professeur responsable :}\\ \multicolumn{1}{l}{\textbf{Baptiste Coudray}} & & & +\multicolumn{1}{l}{\textbf{Dr. Orestis Malaspinas}} \\ \multicolumn{1}{l}{Filière d'études : ITI} & & & +\multicolumn{1}{l}{} \\ \end{tabular} + +\pagebreak diff --git a/src/text/01-references.md b/src/text/01-references.md new file mode 100644 index 0000000000000000000000000000000000000000..dbe3e2ed1beaea2b078ceebfc1872b9be7b86a55 --- /dev/null +++ b/src/text/01-references.md @@ -0,0 +1,18 @@ +\printnoidxglossary[sort=word,title=List of acronyms,nonumberlist] + +\pagebreak + +\listoffigures + +#### Reference of the URLs {-} + +\begin{tabular}{ p{3cm} p{9cm} } \multicolumn{1}{l}{URL01} & +\multicolumn{1}{l}{\url{https://upload.wikimedia.org/wikipedia/commons/e/e5/Gospers_glider_gun.gif}}\\ +\multicolumn{1}{l}{URL02} & \multicolumn{1}{l}{\url{https://commons.wikimedia.org/wiki/File:AmdahlsLaw.svg}} \\ +\multicolumn{1}{l}{URL03} & \multicolumn{1}{l}{\url{https://commons.wikimedia.org/wiki/File:Gustafson.png}} \\ +\multicolumn{1}{l}{URL04} & \multicolumn{1}{l}{\url{https://commons.wikimedia.org/wiki/File:Elder_futhark.png}} \\ +\multicolumn{1}{l}{URL05} & \multicolumn{1}{l}{\url{https://commons.wikimedia.org/wiki/File:Gol-blinker1.png}} \\ +\multicolumn{1}{l}{URL06} & \multicolumn{1}{l}{\url{https://commons.wikimedia.org/wiki/File:Gol-blinker2.png}} \\ +\end{tabular} + +\pagebreak diff --git a/src/text/02-introduction.md b/src/text/02-introduction.md new file mode 100644 index 0000000000000000000000000000000000000000..1b52ccbd4b686319c7594b12a22ca082017078fe --- /dev/null +++ b/src/text/02-introduction.md @@ -0,0 +1,21 @@ +\pagenumbering{arabic} + +# Introduction {-} + + +## Motivation {-} + + +## Presentation of the project {-} + + +## Working method {-} + +During this project, I used Git and put my source code on the Gitlab platform of HEPIA: + +* https://gitedu.hesge.ch/baptiste.coudray/projet-de-bachelor + * Source code of the library with usage examples. +* https://gitedu.hesge.ch/baptiste.coudray/projet-de-semestre/-/tree/report + * Source code of this report + +\pagebreak diff --git a/src/text/04-programmation-parallele.md b/src/text/04-programmation-parallele.md new file mode 100644 index 0000000000000000000000000000000000000000..d07c186586a98503267b1b8e861cf347c08c6ed7 --- /dev/null +++ b/src/text/04-programmation-parallele.md @@ -0,0 +1,42 @@ +# La programmation parallèle + +La programmation parallèle permet de réaliser des opérations sur des données de manières simultanée dans le but d'augmenter la vitesse de traitement par rapport à la programmation séquentielle. D'après la taxonomie de Flynn, il existe plusieurs types de parallélisme : + +* SISD + * *Single Instruction Single Data*, la machine effectue une instruction sur une donnée à la fois. C'est typiquement un + ordinateur personnel qu'on pouvait acheter jusqu'à la fin des années 1990. +* SIMD + * *Single Instruction Multiple Data*, la machine effectue une instruction sur plusieurs données à la fois. + Aujourd'hui, la plupart des processeurs ont la possibilité d'effectuer ces opérations. +* MISD + * *Multiple Instruction Single Data*, plusieurs unités de calcul effectuent une opération sur une donnée. +* MIMD + * *Multiple Instruction Multiple Data*, plusieurs unités de calcul effectuent une opération sur plusieurs données. [@noauthor_parallelisme_2021] + +\pagebreak + +Dans le parallélisme, il existe deux lois importantes : + +1. la loi d'Amdahl +2. la loi de Gustafon-Barsis + +\cimg{figs/amdahls-law.png}{scale=0.6}{Loi d'Amdahl}{Source : Tiré de https://commons.wikimedia.org/, ref. URL02} + +La loi d'Amdahls affirme que la vitesse globale du programme est limitée par le code qui ne peut être parallélisée. En effet, dans un code il y aura presque toujours une partie séquentielle non parallélisable. Il y a donc une relation entre le ratio de code parallélisable et la vitesse globale d'exécution du programme. + +Dans le graphique ci-dessus, on remarque que si : + +* 50 % du code est parallélisé, alors, on obtient une accélération théorique maximale de x2 à partir de 16 processeurs. +* 75 % du code est parallélisé, alors, on obtient une accélération théorique maximale de x4 à partir de 128 processeurs. +* 90 % du code est parallélisé, alors, on obtient une accélération théorique maximale de x10 à partir de 512 processeurs. +* 95 % du code est parallélisé, alors, on obtient une accélération théorique maximale de x20 à partir de 4096 processeurs. + +\pagebreak + +\cimg{figs/gustafson-law.png}{scale=0.75}{Loi de Gustafon-Barsis}{Source : Tiré de https://commons.wikimedia.org/, ref. URL03} + +La loi de Gustafson dit que plus le nombre de données à traiter est grand, plus l'utilisation d'un grand nombre de processeurs sera avantageux. Ainsi, l'accélération est linéaire comme on peut le voir sur le graphique. + +Sur le graphique, on remarque par exemple qu'avec un code qui est 90 % parallélisé, on a un *speedup* d'au moins x100 avec 120 processeurs là où la loi d'Amdahl estimait un *speedup* maximal de x10 avec 512 processeurs. La loi de Gustafson est donc beaucoup plus optimiste en termes de gain de performance. + +\pagebreak diff --git a/src/text/05-mpi.md b/src/text/05-mpi.md new file mode 100644 index 0000000000000000000000000000000000000000..a8936f6ad181501b28886cdaff234a2f87ccb680 --- /dev/null +++ b/src/text/05-mpi.md @@ -0,0 +1,95 @@ +# Message Passing Interface + +In order to realize parallel programming, the standard (+^MPI) was created in 1993-1994 to standardize the passage of messages between several computers or in a computer with several processors/cores [@noauthor_message_2020]. (+^MPI) is therefore a communication protocol and not a programming language. Currently, the latest version of (+^MPI) is 4.0 +which was approved in 2021. There are several implementations of the standard: + +* MPICH, which support for the moment, MPI 3.1, +* Open MPI, which support, for the moment, MPI 3.1 + +I used Open MPI throughout this project, both on my computer and on the cluster of the (+^HES-GE). + +\pagebreak + +## Example + +To understand the basis of (+^MPI), let's look at an example mimicking a *token ring* network [@kendall_mpi_nodate]. This type of network forces a process to send a message to the message in the console for example, only if it has the token in its possession. Once it has emitted its message, the process must transmit the token to its neighbor. + +\cimg{figs/ring.png}{scale=0.4}{Imitation of a network in \textit{token ring}}{Source : Baptiste Coudray} + +In this example, the node with the identifier zero has first the token that it will pass to the node one, then it will give it to node two, etc. The program ends when the token is back in the possession of the process +zero: node four sends the token to node zero. + +Pour comprendre la base de (+^MPI), voyons un exemple imitant un réseau en *token ring*[@kendall_mpi_nodate]. Ce type de réseau contraint un processus peut émettre un +message dans la console par exemple, seulement s'il a en sa possession le jeton. Une fois qu'il a émi son message, le +processus doit transmettre le jeton à son voisin. + +\cimg{figs/ring.png}{scale=0.4}{Imitation d'un réseau en \textit{token ring}}{Source : Baptiste Coudray} + +Dans cet exemple, le nœud avec l'identifiant zéro et possède en premier lieu le jeton qu'il passera au nœud un, puis il +le donnera au nœud deux, etc. Le programme se termine quand le jeton sera de nouveau en sa possession du processus +zéro : le nœud quatre envoie le jeton au nœud zéro. + +```c +int main(int argc, char** argv) { + // Initialize the MPI environment + MPI_Init(&argc, &argv); + // Find out rank, size + int world_rank; + MPI_Comm_rank(MPI_COMM_WORLD, &world_rank); + int world_size; + MPI_Comm_size(MPI_COMM_WORLD, &world_size); + + int token; + // Receive from the lower process and send to the higher process. Take care + // of the special case when you are the first process to prevent deadlock. + if (world_rank != 0) { + MPI_Recv(&token, 1, MPI_INT, world_rank - 1, 0, MPI_COMM_WORLD, + MPI_STATUS_IGNORE); + printf("Process %d received token %d from process %d\n", + world_rank, token, world_rank - 1); + } else { + // Set the token's value if you are process 0 + token = -1; + } + MPI_Send(&token, 1, MPI_INT, (world_rank + 1) % world_size, 0, + MPI_COMM_WORLD); + // Now process 0 can receive from the last process. This makes sure that at + // least one MPI_Send is initialized before all MPI_Recvs (again, to prevent + // deadlock) + if (world_rank == 0) { + MPI_Recv(&token, 1, MPI_INT, world_size - 1, 0, MPI_COMM_WORLD, + MPI_STATUS_IGNORE); + printf("Process %d received token %d from process %d\n", world_rank, + token, world_size - 1); + } + MPI_Finalize(); +} +``` + +Any parallel program using (+^MPI) must call the `MPI_Init` function to initialize the environment, otherwise an error message is displayed. Then, `MPI_Comm_rank` allows us to retrieve our ID (the node number we have) and then with the `MPI_Comm_size` function, we get the number of nodes on which our program is running. +Thanks to the node number, the node with the identifier zero, sends the token to its neighbor via the `MPI_Send` function. + +So, once sent, it waits for node four to send the token via the function `MPI_Recv`. The other nodes are waiting to receive the token from their neighbor to pass the token in turn. +The nodes communicate through the communicator `MPI_COMM_WORLD` which is a macro-constant designating all nodes associated with the current program. + +Finally, every program must terminate with the `MPI_Finalize()` function, otherwise the execution ends with an +error message. + +```bash +mpicc ring.c -o ring +mpirun -n 5 ./ring +``` + +To compile a (+^MPI) program, you have to go through the `mpicc` program which is a wrapper +around (+^GCC). Indeed, `mpicc` automatically adds the right compilation parameters to the (+^GCC) program. +Our compiled program must be run through `mpirun` so that it distributes our program to the compute nodes. The `-n` parameter is used to specify the number of processes to run. + + +``` +Process 1 received token -1 from process 0 +Process 2 received token -1 from process 1 +Process 3 received token -1 from process 2 +Process 4 received token -1 from process 3 +Process 0 received token -1 from process 4 +``` +Thus, we can see that the processes exchange the token each in turn until the zero node receives the token again. diff --git a/src/text/06-futhark.md b/src/text/06-futhark.md new file mode 100644 index 0000000000000000000000000000000000000000..f4863e9ce05c7dbbfcb3248735e752da5b5c45ed --- /dev/null +++ b/src/text/06-futhark.md @@ -0,0 +1,104 @@ +# Introduction to the language Futhark + +\cimg{figs/futhark.png}{scale=0.60}{Futhark}{Source : Tiré de https://commons.wikimedia.org/, ref. URL04} + +Futhark is a purely functional programming language for producing parallelizable code on (+^CPU) or (+^GPU). It was designed by Troels Henriksen, Cosmin Oancea and Martin Elsman at the University of Copenhagen. +The main goal of Futhark is to write generic code that can be compiled into either : + +* (+^OpenCL), +* (+^CUDA), +* multi-threaded (+^POSIX) C, +* sequential C, +* sequential Python. + +Although a Futhark code can be compiled into an executable, this feature is reserved for testing purposes because there is no (+^ES). Thus, the main interest is to write very specific functions that you would like to speed up thanks to parallel programming and to compile in library mode so that it can be used in a C program. + +\pagebreak + +## Example 1 + +To better understand Futhark, here is a very simple example, which consists in calculating the factorial of a number. @noauthor_basic_nodate]. + +``` +let fact (n: i32): i32 = reduce (*) 1 (1...n) +let main (n: i32): i32 = fact n +``` + +Futhark does not handle recursion, so the factorial of a number is defined as the successive multiplication of numbers from one to `n`. In Futhark, this operation is defined as the reduction of an array with the multiplication of each value as the operation. The entry point of the program, `main`, takes as parameter a number and calls the function `fact`. + +Futhark ne gère pas la récursion, de ce fait, la factorielle d'un nombre est défini comme la multiplication successive des nombres allant de un à `n`. En Futhark, on définit cette opération par la réduction d'un tableau avec comme opération la multiplication de chaque valeur. Le point d'entrée du programme, `main`, prends en paramètre un nombre et appelle la fonction `fact`. + +```bash +futhark opencl fact.fut +echo 12 | ./fact +``` + +To compile the Futhark code, we have to specify a backend, this one allows to compile our code in : + +* (+^OpenCL) (opencl, pyopencl), +* (+^CUDA) (cuda), +* multi-thread (+^POSIX) C (multicore), +* sequential C (c), +* Python sequential (python). + +Here I compile in (+^OpenCL) to run the program on the graphics card, and I run the program with the number 12 as parameter. + +``` +479001600i32 +``` + +The program calculates the factorial of 12 and therefore returns 479 001 600. + +## Example 2 + +In this other example, we use Futhark in a C program to perform a very specific operation, in this case to calculate the factorial of a number. + +```futhark +entry fact (n: i32): i32 = reduce (*) 1 (1...n) +``` +Functions that can be used in C code must be defined with the `entry` keyword. Therefore, the `fact` function respects this rule. + +```bash +futhark opencl --lib fact.fut +``` + +Then you have to compile the Futhark code in library mode and specify the backend. Here, the factorial program is compiled in (+^OpenCL). Finally, it generates a `fact.h` and `fact.c` file, which can be included in a C program. + +```c +#include <stdio.h> +#include <stdlib.h> +#include "fact.h" + +int main(int argc, char **argv) { + int number = atoi(argv[1]); + + struct futhark_context_config *futcfg = futhark_context_config_new(); + struct futhark_context *futctx = futhark_context_new(futcfg); + + int result; + futhark_entry_fact(futctx, &result, number); + printf("%d\n", result); + + futhark_context_config_free(futcfg); + futhark_context_free(futctx); + return 0; +} +``` + +The program initializes a Futhark configuration and a Futhark context, then the program calls the `fact` function which has been compiled in C. It is called via the function `futhark_entry_fact` which takes as arguments the Futhark context, an integer pointer to store the result, and the number whose factorial is desired. + + +```bash +futhark opencl --library fact.fut +gcc fact.c -c +gcc main.c -o fact fact.o -lOpenCL -lm +``` + +```bash +./fact 12 +479001600 +``` + +The execution of the program with the factorial of 12, returns the correct value, i.e 479 001 600. + +\pagebreak diff --git a/src/text/07-jeu-de-la-vie.md b/src/text/07-jeu-de-la-vie.md new file mode 100644 index 0000000000000000000000000000000000000000..a42a5897a4071b696f359fd1aaa98836def20c75 --- /dev/null +++ b/src/text/07-jeu-de-la-vie.md @@ -0,0 +1,35 @@ +# Game of Life + +The Game of Life is a zero-player game designed by John Horton Conway in 1970. It is also one of the best known +cellular automata. A cellular automaton consists of a regular grid of cells each containing a state +chosen among a finite set and which can evolve in the course of time. The game does not require the interaction of a player +for it to evolve, it evolves thanks to these extremely simple rules: + +1. a cell has eight neighbors, +2. a cell can be either alive or dead, +3. a dead cell with exactly three living neighbors becomes alive, +4. a living cell with two or three living neighbors stays alive, otherwise it dies. [@noauthor_jeu_2020] + +## Example + +\cimg{figs/gol_blinker1.png}{scale=0.40}{First state of blinker}{Source : Taken from +\url{https://commons.wikimedia.org/}, ref. URL05. Re-created by Baptiste Coudray} + +A basic example is the blinker: + +* the cell (one, one) and (one, three) die because they have seven dead neighbors and one living neighbor (rule n°4), +* the cell (zero, two) and (two, two) are born because they have three living neighbors (rule n°3), +* the cell (one, two) stays alive because it has two living neighbors (rule n°4). + +\cimg{figs/gol_blinker2.png}{scale=0.40}{Second state of blinker}{Source : Taken from +\url{https://commons.wikimedia.org/}, ref. URL06. Re-created by Baptiste Coudray} + +Thus, after the application of the rules, the horizontal line becomes a vertical line. At the next iteration, the vertical line becomes a horizontal line again. + +## Parallelized version + +\cimg{figs/gol_result_and_speedup_cpu.png}{width=\linewidth}{First state of blinker}{Source : Taken from +\url{https://commons.wikimedia.org/}, ref. URL05. Re-created by Baptiste Coudray} + + +\pagebreak diff --git a/src/text/08-conclusion.md b/src/text/08-conclusion.md new file mode 100644 index 0000000000000000000000000000000000000000..e2c5c985e276ce5927d10ed8b06006b64ba23bfc --- /dev/null +++ b/src/text/08-conclusion.md @@ -0,0 +1,3 @@ +# Conclusion + +\pagebreak diff --git a/src/text/09-bibliographie.md b/src/text/09-bibliographie.md new file mode 100644 index 0000000000000000000000000000000000000000..3b5583f182a59a405705141d0ff375e94466c08a --- /dev/null +++ b/src/text/09-bibliographie.md @@ -0,0 +1 @@ +# Références documentaires {-} diff --git a/src/text/ZZ-glossaire.tex b/src/text/ZZ-glossaire.tex new file mode 100644 index 0000000000000000000000000000000000000000..65132214662af4d4ff9bbd5883b48bb2563ef8df --- /dev/null +++ b/src/text/ZZ-glossaire.tex @@ -0,0 +1,17 @@ +% USAGE : https://github.com/tomncooper/pandoc-gls + +% Insérez les termes pour le glossaire ici. +% Ne mettez pas de points à la fin d'une entrée, ils sont mis pour vous ! + +% Insérez les termes pour la table des acronymes ici. +% Ne mettez pas de points à la fin d'une entrée, ils sont mis pour vous ! +\newacronym{CPU}{CPU}{Central Processing Unit} +\newacronym{GPU}{GPU}{Graphics Processing Unit} +\newacronym{MPI}{MPI}{Message Passing Interface} +\newacronym{GCC}{GCC}{GNU Compiler Collection} +\newacronym{POSIX}{POSIX}{Portable Operating System Interface uniX} +\newacronym{CUDA}{CUDA}{Compute Unified Device Architecture} +\newacronym{OpenCL}{OpenCL}{Open Computing Language} +\newacronym{SDL2}{SDL2}{Simple Directmedia Layer 2} +\newacronym{HES-GE}{HES-GE}{Haute École Spécialisée de GEnève} +\newacronym{ES}{E/S}{Entrée/Sortie}