Skip to content

Home

Welcome! here you may find something interesting related to math, scientific computing, C++, or compilers.

I'm in the process of adding some more of my projects and links to articles and resources by others which I found useful and interesting. It is very much a work in progress!

About Me

I studied Engineering Physics (Teknisk Fysik a 5 year engineering programme) at KTH, Stockholm, but spent most of my time doing mathematics. After the bachelor's part of my engineering degree I worked as a research engineer for 2 years developing indoor positioning systems. I've also worked with optimization and testing of simulation software. In spring/summer 2024 I finished my master's studies in: Pure Mathematics, specializing in, Analysis, Probability Theory, and PDEs; and in Computer Science, specializing in High Performance Computing.

When I'm not doing math or programming I enjoy being outdoors, especially in the mountains climbing and skiing. I love everything composed by Bach and Beethoven and have played the piano since I was five. Lately I've also dabbled in compiler theory and implementation. Have a look at some of my projects and texts below if you want if you want to get a sense of what I like.

Math

Large Deviations and Weak Convergence of Measures, with applications to Monte Carlo Estimators (M.Sc. thesis) - slides

  • Studies weak convergence and the \(\tau\)-topology on the space of finite signed measures, and large deviations of sums of i.i.d. random variables. Proves Sanov's and Cramér's theorems in their most general forms.
  • Awarded Mittag-Leffler Prize for mathematical thesis work of outstanding scientific value.

Regularity of semilinear elliptic partial differential equations with critical Sobolev exponents (B.Sc. thesis)

Scientific Computing & Code Projects

Gamma Random Variable generation on GPUs using CUDA (M.Sc. thesis slides)

  • gammaRNG

  • Explains the theory of random number generation on GPUs and implements several algorithms for gamma random number generation in CUDA as inline kernels templated on PRNG and float type.

  • Example notebook on Google Colab showing how to compile the code and benchmark generators using the included benchmark class.

cLoxpp A Compiler and Virtual Machine, for the lox programming language
Based on the later chapters of the book Crafting Interpreters by Robert Nystrom. However written entirely in modern C++ instead of C. Also adds functionality not covered by Nystrom, including:

  • Extended bytecode, which yields increased performance and adds support for compiling more constants.

  • Custom Memory Manager with custom allocator support (I have played around with object pools for common object sizes).

Primary Interests

Mathematics
Probability Theory, especially Large Deviations and its applications to Stochastic Simulations and rare events. PDEs, existence and regularity of weak solutions. Weak topologies and convergence in the space of finite signed measures and its subspaces (e.g. probability measures).

Monte Carlo Methods & Random Number Generation
Esepcially Sequential Monte Carlo and filtering applications. Interested in RNGs especially for multithreaded and gpu settings, both from reproducibility and performance perspective.

Scientific Computing & Parallell Programming
Optimization of scientific software and parallell algorithms. Especially GPU programming and optimization.