From f2c865cb77e178c0f96425dff5c5735002fb571b Mon Sep 17 00:00:00 2001
From: "raphael.bach" <raphael.bach@etu.hesge.ch>
Date: Sat, 14 May 2022 20:47:11 +0200
Subject: [PATCH] Update `.gitignore`, `Doxyfile`, `LICENSE`, `notes` and
 `todo`

---
 .gitignore |  19 +++++---
 Doxyfile   |  11 +++--
 LICENSE    |   2 +
 notes      | 141 +++++++++++++++++++++++++++++++++++++++++++++++++----
 todo       |   8 +++
 5 files changed, 160 insertions(+), 21 deletions(-)
 create mode 100644 todo

diff --git a/.gitignore b/.gitignore
index 837aa12..ad4428d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,24 +28,29 @@ doxygen/
 # Executables
 *.out
 
-# IDE
-.vscode/
-
-# External
-external/include
-external/lib
-
 # Futhark
 *fut.json
+fmpi_entry.json
+include/internal/fmpi_futhark_entry.h
+src/fmpi_futhark_entry.c
+
+# IDE
+.vscode/
 
 # Logs
 *.log
 log/
 
+# Misc
+cloc_exclude
+
 # Object files
 *.o
 obj/
 
+# Scratchpads
+scratchpad
+
 # Static libraries
 *.a
 
diff --git a/Doxyfile b/Doxyfile
index 5879167..bf4e625 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING      = UTF-8
 # title of most generated pages and in a few other places.
 # The default value is: My Project.
 
-PROJECT_NAME           = "Futharkmpi"
+PROJECT_NAME           = "fmpi"
 
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. This
 # could be handy for archiving the generated documentation or if some version
@@ -969,12 +969,15 @@ RECURSIVE              = YES
 # Note that relative paths are relative to the directory from which doxygen is
 # run.
 
-EXCLUDE  = build
+EXCLUDE += build
+EXCLUDE += examples
+EXCLUDE += external
 EXCLUDE += include/generated
 EXCLUDE += include/impl
+EXCLUDE += include/internal/fmpi_futhark_entry.h
+EXCLUDE += src/fmpi_futhark_entry.c
 EXCLUDE += test
 EXCLUDE += tool
-EXCLUDE += external
 
 # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
 # directories that are symbolic links (a Unix file system feature) are excluded
@@ -1102,7 +1105,7 @@ SOURCE_BROWSER         = YES
 # classes and enums directly into the documentation.
 # The default value is: NO.
 
-INLINE_SOURCES         = YES
+INLINE_SOURCES         = NO
 
 # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
 # special comment blocks from generated source code fragments. Normal C, C++ and
diff --git a/LICENSE b/LICENSE
index f5f404b..98c6760 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,7 @@
 BSD Zero Clause License
 
+Copyright (c) 2021 by Raphael Bach
+
 Permission to use, copy, modify, and/or distribute this software for any
 purpose with or without fee is hereby granted.
 
diff --git a/notes b/notes
index f65e4bb..e8b45ef 100644
--- a/notes
+++ b/notes
@@ -1,28 +1,34 @@
 ========== FUTHARK =============================================================
+
 Return code:
     - 0 on success
     - non-zero or NULL on failure
 
 futhark_context_get_error():
     - Returned string must be free() manually
+    - Returns NULL if there is no error
 
 futhark_context_free()
     - futhark_context_sync() must be called right before
 
-futhark_new_*():
-    - Asynchronous -> futhark_context_sync() must be called before using the
-      return value.
+futhark_new_*(): Asynchronous
+    - futhark_context_sync() must be called before using the return value.
+    - Return NULL on failure.
 
-futhark_values_*()
-    - Asynchronous -> futhark_context_sync() must be called before using the
-      return value.
+futhark_values_*(): Asynchronous
+    - futhark_context_sync() must be called before using the return value.
+    - Returns non-zero on failure.
 
-futhark_entry_*()
-    - Asynchronous -> futhark_context_sync() must be called before using the
-      return value.
+futhark_entry_*(): Asynchronous
+    - futhark_context_sync() must be called before using the return value.
+    - Returns non-zero on failure
+    - May return 0 even on failure
     - Check return code of both futhark_entry_*() AND futhark_context_sync()
 
+- Length is always passed as int64_t/i64
+
 ========== MPI =================================================================
+
 MPI_Error_class():
     - Thread-safe
     - Can be called before MPI is initialized
@@ -33,7 +39,7 @@ MPI_Error_string():
     - Can be called before MPI is initialized
     - Can be called after MPI is finalized
 
-========== MISC ================================================================
+
      MPI     |    C     | Futhark
 -------------+----------+---------
 MPI_C_BOOL   | _Bool    | bool
@@ -47,3 +53,118 @@ MPI_UINT32_T | uint32_t | u32
 MPI_UINT64_T | uint64_t | u64
 MPI_FLOAT    | float    | f32
 MPI_DOUBLE   | double   | f64
+
+========== PARTITIONING ========================================================
+
+- Block
+    - Good for data access
+    - Bad for load-balancing
+
+- Cyclic
+    - Good for load-balancing
+    - Bad for data-access
+
+- Striped
+    - n processors
+
+- Checkerboard
+    - n^2 processors
+
+- 1D
+    - row/column block-striped
+    - row/column cyclic-striped
+    - row/column bloc-cyclic-striped
+
+- 2D
+    - row/column block-striped
+    - row/column cyclic-striped
+    - row/column bloc-cyclic-striped
+    - block-checkerboard
+    - cyclic-checkerboard
+    - block-cyclic-checkerboard
+
+========== GLOSSARY ============================================================
+
+API (Application Programming Interface)
+CPU (Central Processing Unit)
+CUDA
+GPGPU (General-purpose computing on graphics processing units)
+GPU
+Halo exchange/Ghost cells
+Interior/Solution cells
+Exterior/Boundary cells
+OpenCL
+Jacobi method
+Gauss-Seidel method
+Finite difference method (FDM)
+Jacobi Iteration
+Loadbalancing
+Speedup
+Efficiency
+SPMD
+SIMD
+SISD
+MISD
+MIMD
+Partitioning
+RMA(Remote Memory Access)
+
+CELLULAR AUTOMATON
+Conway's Game of Life
+=> NEIGHBORHOOD
+
+DISTANCE:
+Chebyshev distance
+Manhattan distance
+
+NEIGHBORHOOD:
+Moore neighborhood
+Von Neumann neighborhood
+=> DISTANCE
+
+STENCIL:
+25-point 3D stencil
+5-point 2D stencil
+7-point 3D stencil
+9-point 2D stencil
+Compact stencil
+Non-compact stencil
+Stencil computation
+=> NEIGHBORHOOD
+
+BOUNDARY CONDITIONS:
+Boundary value problem
+Cauchy boundary condition
+Dirichlet boundary condition
+Mixed boundary condition
+Neumann boundary condition
+Periodic boundary conditions (PBCs)
+Robin boundary condition
+
+MPI(Message Passing Interface):
+Communication-Computation overlap
+Communicator
+Derived Datatype (DDT)
+Group
+Intercommunicators
+Intracommunicators
+One-sided
+Rank
+Size
+Synchronization
+=> COMMUNICATION
+
+COMMUNICATION:
+Asynchronous communication
+Blocking communication
+Collective communication
+Non-blocking communication
+Point-to-point communication
+Synchronous communication
+
+DOMAIN DECOMPOSITION:
+1D
+2D
+Overdecomposition
+
+================================================================================
diff --git a/todo b/todo
new file mode 100644
index 0000000..401e101
--- /dev/null
+++ b/todo
@@ -0,0 +1,8 @@
+========== Tests ===============================================================
+- Game of life:
+    1) 4 quadrants each with a still life in their center which doesn't cross
+       envelopes
+    2) 4 quadrants each with a still life in their center which cross envelopes
+    3) Same as 1) with an oscillator
+    4) Same as 2) with an oscillator
+    5) 4 quadrants each with a glider
-- 
GitLab