没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > libclcalc |
libclcalc
|
0 | 0 | 51 |
贡献者 | 讨论 | 代码提交 |
libCLcalc is an interface library to OpenCLThis project aims to build a library to simplify the usage of OpenCL. It will include an API for the following languages:
C C++ Java Fortran IDL
To use this APIs you don't need to know details of OpenCL. The library will do most of the work for you.
PlatformsOpenCL is an open platform independent standard and libCLcalc will also be platform independent, but until now the only stable implementation of OpenCL is the one from Apple. Because of that libCLcalc will also only be available for Mac OS X 10.6 (Snow Leopard).
Special features that are not part of the OpenCL standardC++ style function templates An Example using the Java API of libCLcalc//The Kernel you want to execute:
String kernel = "\n"+
"__kernel void sqrt1d (__global float* input, __global float* output) {\n" +
" int index = get_global_id(0); \n" +
" output[index] = sqrt(input[index]); \n" +
"}";
//create some sample data
int size = 10000000;
float[] input = new float[size];
float[] output = new float[size];
for (int i=0;iUseful LinksOfficial site: Khronos OpenCL at the NVIDIA site OpenCL at the Apple site