我可以使用外部OpenCl库吗? [英] Can I use external OpenCl libraries?

查看:74
本文介绍了我可以使用外部OpenCl库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用一些外部库(http://trac.osgeo.org/geos/)对几何对象(GIS)执行一些分析任务.我想在Cuda上使用OpenCL执行这些任务,以便可以使用GPU的并行功能对大量数据并行执行这些任务.所以我的问题是:

I want to use some external libraries (http://trac.osgeo.org/geos/) to perform some analytical tasks on Geometry objects(GIS). I want to perform these task using OpenCL on Cuda so that I can use the paralel power of GPU to perform these tasks in parallel on large set of data.So my question is:

  1. 我可以使用这些库编写内核吗?

  1. Can I write kernel using these libraries?

还如何将这些库的复杂数据结构的对象作为参数传递给内核/(具体来说,如何创建这些复杂对象的缓冲区?

Also How can I pass the objects of complex data structures of these libraries as an argument to the kernel/(in specific How can I create buffer of these complex objects??

推荐答案

否,您不能在OpenCL内核中使用外部库.请记住,在运行OpenCl应用程序时,必须编译所有内核,因为它无法事先知道它在哪个平台上运行.

No, you can't use external libraries in OpenCL kernels. Remember, any kernels is required to be compiled when the OpenCl application runs because it can't know what platform it is running on beforehand.

这篇关于我可以使用外部OpenCl库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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