Warning: session_start(): open(/var/lib/php/sessions/sess_el65si0io00qb5kpjlrc01g578, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
// OpenCL Java binding by Marco Hutter of jocl.org
// patched by Stefan to allow dynamic library loading
lib 1006673
import org.jocl.*;
import static org.jocl.CL.*;
/**
* A small JOCL sample.
*/
/**
* The source code of the OpenCL program to execute
*/
static S programSource =
"__kernel void "+
"sampleKernel(__global const float *a,"+
" __global const float *b,"+
" __global float *c)"+
"{"+
" int gid = get_global_id(0);"+
" c[gid] = a[gid] * b[gid];"+
"}";
// MAIN PROGRAM
p {
// Linux
// loadNative(1006670); // JOCL Native Parts
File libFile = prepareProgramFile("opencl.so");
copyFile(loadLibrary(#1006670), libFile);
System.load(libFile.getPath());
call(CL.class, "initNativeLibrary", libFile.getName());
// Create input- and output data
int n = 10;
float srcArrayA[] = new float[n];
float srcArrayB[] = new float[n];
float dstArray[] = new float[n];
for (int i=0; i