Here are source codes of four tasks during my CUDA course in SS13 at TUM