在GPGPU / CUDA / OpenCL的最佳方法? [英] Best approach for GPGPU/CUDA/OpenCL in Java?

查看:242
本文介绍了在GPGPU / CUDA / OpenCL的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

图形处理单元的通用计算( GPGPU )是一个非常有吸引力的概念,利用GPU的力量为任何种类的计算。



我想要使用GPGPU进行图像处理,粒子和快速几何操作。



,似乎这个空间中的两个竞争者是CUDA和OpenCL。我想知道:




  • Windows / Mac上的OpenCL是否可以使用Java?


  • 是否直接使用JNA?

  • 我忘记了什么?
  • >


任何现实世界的体验/示例/战争故事都会感激。

解决方案

AFAIK, JavaCL / OpenCL4Java 是由于使用了 JNA )。

Java Web Start至少在Mac和Windows上(为了避免Linux上的随机崩溃,请参阅此维基页,例如此 Particles Demo



它还有一些实用程序(GPGPU随机数生成,基本并行缩减,线性代数) =http://ochafik.free.fr/blog/?p=207 =nofollow noreferrertitle =Scala DSL> Scala DSL 。



最后,它是最早的绑定(自2009年6月)和它有一个活跃的用户社区



(免责声明:我 JavaCL 的作者: - ))


General-purpose computing on graphics processing units (GPGPU) is a very attractive concept to harness the power of the GPU for any kind of computing.

I'd love to use GPGPU for image processing, particles, and fast geometric operations.

Right now, it seems the two contenders in this space are CUDA and OpenCL. I'd like to know:

  • Is OpenCL usable yet from Java on Windows/Mac?
  • What are the libraries ways to interface to OpenCL/CUDA?
  • Is using JNA directly an option?
  • Am I forgetting something?

Any real-world experience/examples/war stories are appreciated.

解决方案

AFAIK, JavaCL / OpenCL4Java is the only OpenCL binding that is available on all platforms right now (including MacOS X, FreeBSD, Linux, Windows, Solaris, all in Intel 32, 64 bits and ppc variants, thanks to its use of JNA).

It has demos that actually run fine from Java Web Start at least on Mac and Windows (to avoid random crashes on Linux, please see this wiki page, such as this Particles Demo.

It also comes with a few utilities (GPGPU random number generation, basic parallel reduction, linear algebra) and a Scala DSL.

Finally, it's the oldest bindings available (since june 2009) and it has an active user community.

(Disclaimer: I'm JavaCL's author :-))

这篇关于在GPGPU / CUDA / OpenCL的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆