Hands-on: Using fast indexing in heat equation solver

In this exercise we finish the optimisation of the heat equation solver.

Continue with the same code as in the previous optimisation steps under cython/heat-equation.

Transform the Python for-loops into pure C-loops and utilize fast indexing of NumPy arrays. Include also compiler directives in your code.

When finished with the optimisation, compare the performance to Python/NumPy model solution (in numpy/heat-equation), which uses array operations. You can play around also with larger input data as provided in bottle_medium.dat and bottle_large.dat.

Share this article:

This article is from the free online course:

Python in High Performance Computing

Partnership for Advanced Computing in Europe (PRACE)