Can I use my GPU to exchange some computing tasks?

I am writing an opengl C program, and I know that most of the graphics jobs are done by the GPU. My question is: can I use a graphics processor to calculate non-graphics material? For example, calculate1 + 2 + 3 + ... + 100 = ?

+3
source share
4 answers

You can use OpenCL or Computeshaders (this is the name of DX, but I think something similar in openGl). But in general, this only makes sense for algorithms that are easy to parallelize and more than your example.

+5
source

You are looking for a general purpose GPU (GPGPU).

Check out CUDA and OpenCL

+3
source

GPU, . GPU , .

.

+1

, 1 + 2 + 3 +.... + 100 =..?

:

: GPU ? : "1 + 2 + 3 +.. + 100 ==..", "101 + 102 +... + 200 =..", "201 + 202 +... + 300" =.. ' !

Thanks to advanced equipment, the graphics processor is able to perform calculations in parallel, within a few seconds. A GPU has hundreds of cores, and they can also be used for non-graphical functions. The advantage of this multi-core architecture can be taken to perform many scientific calculations and simulations. Read the concept of a general-purpose graphics programming module. GPGPU

+1
source

All Articles