CUDA: efficient parallel reduction

CUDA is a very powerful API which allows us to run highly parallel software on Nvidia GPUs. It is typically used to accelerate specific operations, called kernels, such as matrix multiplication, matrix decomposition, training neural networks et cetera. One such common operation is a reduction: adding up a long array of numbers. One simple implementation

FLIP fluids simulation

Update: as of 2022, the full code has been open-sourced and is available on GitHub. In autumn 2018, I teamed up with classmates Silvia Nauer and Mikael Stellio for a project in the ETHZ course Physically-Based Simulation for Computer Graphics. The objective of our project was to create a video of a meteorite crashing into

IACV lecture 1: light, lenses and cameras

This is a summary of the introductory lecture to the coure Image Analysis and Computer Vision which I took at ETH in the autumn semester 2018. Interaction of light and matter Interactions of light and matter be divided into three main types (plus diffraction). Phenomenon Example Absorption Blue water Scattering Blue sky, red sunset Reflection

Exam summary: Robot Dynamics

In the autumn semester of 2018 I took the course Robot Dynamics. The summary I took with me to the exam is available here in PDF format as well as in LaTeX format. Here’s an overview of the topics the course covered: Kinematics Rotation and angular velocity Rigid Body Formulation Homogeneous transformations Kinematics of systems

LaTex template: exam summary

At ETH, many courses offer the possibility of taking a summary with you to the exam. This is usually restricted in size and some times must even be handwritten. I have always preferred writing them in digital format, mainly because it gives me the flexibility to rewrite, add or remove parts if I realise I’m

C++: the Named Parameter Idiom

Some times you will have a large C++ class with many parameters that need initializing. That can lead to some ugly constructor calls: auto popsim = PopulationSim(1000, 100000, 1000, 1000, 1500, 0.17, 0.05, 32, 3, 1, 7, 1); This makes the code very hard to maintain and debug, as there is no easy way to