简体   繁体   English

使用Delphi利用GPGPU技术?

[英]Using Delphi to take advantage of GPGPU technology?

GPGPU is the principle of using the parallel processors on video cards for massive increases in performance. GPGPU是在视频卡上使用并行处理器以大幅提高性能的原则。

Does anyone have any ideas about using GPGPU in Delphi, using either OpenCL or CUDA? 有没有人对使用OpenCL或CUDA在Delphi中使用GPGPU有任何想法? CUDA was/is NVidia only, but they have also adopted the OpenCL "standard". CUDA只是NVidia,但他们也采用了OpenCL“标准”。

I found a few Delphi samples from Google searches but they either crash or don't compile/run. 我从Google搜索中找到了一些Delphi样本,但它们要么崩溃,要么不编译/运行。

The ultimate instruction sample would be: 最终的指导样本将是:

  1. Download and install the OpenCL DLLs from here. 从这里下载并安装OpenCL DLL。
  2. Download the OpenCL SDK from from here. 从这里下载OpenCL SDK。
  3. Download this sample Delphi project from here. 从这里下载此示例Delphi项目。
  4. Open and compile the Delphi project. 打开并编译Delphi项目。 If all goes to plan it will do "whatever it is supposed to do" 如果一切按计划进行,它将做“无论它应该做什么”

At that stage I can then start researching the OpenCL SDK and writing/compiling DLLs to call from any Delphi app. 在那个阶段,我可以开始研究OpenCL SDK并编写/编译DLL来从任何Delphi应用程序调用。

This sort of stuff is really starting to take off. 这种东西真的开始起飞了。 Embarcadero do not have to do anything themselves at this stage (unless they want to), but if there were a tutorial and samples for Delphi available it would be great. Embarcadero在这个阶段不需要做任何事情(除非他们想要),但是如果有一个Delphi的教程和样本可用,那就太棒了。 Many samples are available for other languages, but we do also need a good and simple Delphi example to show how easy it is to use Delphi for GPGPU apps. 许多样本可用于其他语言,但我们还需要一个简单的Delphi示例来说明将Delphi用于GPGPU应用程序是多么容易。

You could be interested in GPGPUonDelphi2007 . 您可能对GPGPUonDelphi2007感兴趣。

GPGPU example plus needed OpenGL and CG libraries for Delphi 2007 now available ! 现在可以使用 GPGPU示例以及Delphi 2007所需的OpenGL和CG库!

I created the necessary OpenGL and CG (delphi) packages yesterday and finished converting/translating/porting a C GPGPU OpenGL/CG example to Delphi today, and I would like to share it with you so that maybe some more (Delphi) people will look into GPGPU programming, especially with OpenGL 3.0 for (older) DX9 graphics cards. 我昨天创建了必要的OpenGL和CG(delphi)软件包,并且今天完成了将C GPGPU OpenGL / CG示例转换/转换/移植到Delphi的程序,我想和你分享它,以便可能会有更多(Delphi)人看起来进入GPGPU编程,特别是使用OpenGL 3.0(旧版)DX9显卡。

CUDA is still nVidia only, and that won't change. CUDA仍然只是nVidia,而且不会改变。 OpenCL is a true standard in this case, not only limited to GPGPU. 在这种情况下,OpenCL是一个真正的标准,不仅限于GPGPU。

As for using it in Delphi, all I know of is how to use it in Free Pascal. 至于在Delphi中使用它,我所知道的是如何在Free Pascal中使用它。 However, there's quite some chance that the code will be portable, here's a link to updated headers: 但是,代码很可能是可移植的,这里是更新标头的链接:

FreePascal Mantis RFE OpenCL FreePascal Mantis RFE OpenCL

As for DLL's, if you use nVidia, they can be found here . 至于DLL,如果你使用nVidia,可以在这里找到它们。

Here however we have a sample project in Delphi. 这里然而,我们在Delphi中的示例项目。

我前段时间使用OpenCL和Delphi进行了浮点测试: https//plus.google.com/110131086673878874356/posts/eWcipK16MV7 (包含演示和源代码的链接)

You should use CUDA DELPHI 你应该使用CUDA DELPHI

In native pascal code you can run CUDA kernels 在本机pascal代码中,您可以运行CUDA内核

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM