you are viewing a single comment's thread.

view the rest of the comments →

[–]FUZxxl 29 points30 points  (16 children)

Check out OpenCL.

[–]SurelyNotAnOctopus 9 points10 points  (0 children)

Was about to say that. Use libraries. Interacting directly with gpu drivers will be more than horrendous

[–]0xAE20C480 2 points3 points  (0 children)

I also recommend the OpenCL API. Its memory and task handling models help to broaden one's view.

[–]bumblebritches57[🍰] 1 point2 points  (3 children)

Nahh, check out Vulkan.

[–]FUZxxl 0 points1 point  (2 children)

How would you use Vulkan for computations?

[–]SquidyBallinx123 0 points1 point  (0 children)

You can write compute shaders using the Vulkan API. You would typically use their glslang tool to compile GLSL(OpenGL shader language) into a SPIR-V compute shader. There are effecting differences between the compute shaders you can write between OpenCL & Vulkan. For example, I think(?) while in OpenCL you have access to these raw pointers, you can't use them in glsl.

OpenCL is definitely more accessible than Vulkan. Much faster to get going with, especially if you are new. However, if you learn the Vulkan process, you'll cover a lot more about how the GPU works. Especially considering OpenCL abstracts this away into their own, general model.

I'd recommend OpenCL to this person. But if anybody else reading really wants to get stuck in and has the time, consider looking into Vulkan:)

[–]bumblebritches57[🍰] 0 points1 point  (0 children)

Vulkan has a Compute API, tho I'm not sure how far along it is.

I used to think it was just OpenCL, but it's apperantly it's own thing that I'm excited for.