1

Me mother tongue is Java (I know I know, but you can't change who you are).

So I wanted to get a pros / cons of doing CUDA vs. JCUDA.

I just found out there is a jcuda.org

Thanks in advance.

user1172468
  • 5,306
  • 6
  • 35
  • 62
  • 3
    cuda represents language extensions to C or C++ (or Fortran). JCuda presents a binding API so that library calls and cuda functions written in C or C++ can be called from Java. If you want to write java kernel code that runs on the GPU, you may also be interested in [root beer](https://github.com/pcpratts/rootbeer1). – Robert Crovella Nov 13 '12 at 04:23
  • Oh wow, I'm glad I asked this question ... would never have discovered root beer on my own. – user1172468 Nov 13 '12 at 04:29
  • 1
    @RobertCrovella you may want to put your comment as an answer -- I'd then accept it. – user1172468 Nov 13 '12 at 04:38

1 Answers1

3

cuda represents language extensions to C or C++ (or Fortran). JCuda presents a binding API so that library calls (e.g. cublas for linear algebra, or cufft for fft's, etc.) and arbitrary cuda functions written in C or C++ can be called from Java. If you want to write java kernel code that runs on the GPU, you may also be interested in root beer. Root beer allows you to write kernel code that runs on the thread processors in a GPU directly, without any requirement for CUDA C. However, you'll still need to install the CUDA toolkit to enable the Root Beer "Java Compiler".

Robert Crovella
  • 143,785
  • 11
  • 213
  • 257