========================================================= Working with a 2-dimensional grid of 2-dimensional blocks [TOC] ========================================================= The Jacobi solver was very limited as just the dimensions of one block were supported. We want now to move to a more general solution (which will be completed in the next session). Firstly, we do no longer want to initialize the matrix $A$ on the host. Hence, we no longer need to copy the matrix from host to device as the device can perform the initialization much faster than the host. Exercise ======== Take the skeleton below and develop a kernel function that is responsible for the initialization of $A$. Do this for a grid of $2 \times 2$ blocks (see `GRID_DIM` in the skeleton). Then generate the graphics which shall look as following: ---- IMAGE ---------- session09/jacobi3.jpg --------------------- Skeleton ======== :import:session09/jacobi2.cu :navigate: up -> doc:index back -> doc:session09/page04 next -> doc:session09/page06