5
non-bin
5y

Why does all GPU functionality need a while new language? Libraries are a thing ya know?

Comments
  • 1
    What do you mean?
  • 2
    @Codex404 cuda has .cu files and a different compiler, for openCL you write the device code as a string (which is difficult to get syntax highlighting on) etc
  • 3
    Because bog standard C doesn't know how to cope with highly vectorized massively parallel computation without doing truly unholy things to its syntax. May as well be a new language at that point.
  • 1
    @greyfade ok that's fair, are there any standardised languages that can then?
  • 1
    @non-bin sure: Cg, Cuda, GLSL...

    And, I suppose, APL, K, J, Matlab, and a few others.
  • 1
    Of course you could do that with a library and call that from C. However, it makes more sense e.g. for NVidia to do something proprietary so that any application based on Cuda will be locked to NVidia forever.

    With a library, its implementation could be changed, and the application wouldn't notice, so it wouldn't be locked in.
Add Comment