Quick start in solving problems on GPU + CPU [Tutorial]

Revision en1, by dmkz, 2023-06-10 02:25:39

Hello, codeforces!

Do you have modern GPU and CPU and want to calculate something with them, but you don't know how to do it? Dont be upset, because you can read this blog and run your first GPU program on your AMD/Intel/NVIDIA GPU. I will describe installation process and then we will dive into the C++ code. As an example, we will calculate a lot of mazes for Bug Game in parallel. For doing this in simple way, we will use library Boost.Compute, which is a C++ STL-style wrapper over OpenCL library. ...

Installation for Windows

We need to install GCC, Boost and OpenCL. Let's do it with cygwin. Just download it and run.

Install GCC

On the step of choosing packages, select <<View: Full>, type <<Search: gcc>> and click on next packages:

  • colorgcc
  • gcc-core
  • gcc-g++
  • libgcc1
Screenshot for choosing of GCC
Tags gpu, cpu, boost, multi-threading, compute, opencl

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en13 English dmkz 2023-06-10 18:53:36 430
en12 English dmkz 2023-06-10 18:47:07 898
en11 English dmkz 2023-06-10 18:35:21 543 Tiny change: ' Field`:\n~~~~~\ns' -> ' Field`:\n\n~~~~~\ns' (published)
en10 English dmkz 2023-06-10 18:19:49 1457
en9 English dmkz 2023-06-10 17:53:03 2565
en8 English dmkz 2023-06-10 17:25:31 10116
en7 English dmkz 2023-06-10 07:13:14 13671
en6 English dmkz 2023-06-10 03:55:54 734
en5 English dmkz 2023-06-10 03:33:01 393
en4 English dmkz 2023-06-10 03:27:07 428
en3 English dmkz 2023-06-10 03:25:34 73
en2 English dmkz 2023-06-10 03:24:27 3525
en1 English dmkz 2023-06-10 02:25:39 1210 Initial revision (saved to drafts)