Re: jocl.CLProgram.create() line 74
Posted by Rick Lentz @ imagejdev.org on Jan 14, 2011; 3:35pm
URL: https://forum.jogamp.org/jocl-CLProgram-create-line-74-tp2250272p2256102.html
I tested on another Mac just to ensure that it was not a single case regarding APPLE. Here is the console output /results (Failed):
OS: Mac OS X
ARCH: x86_64
VM: Java HotSpot(TM) 64-Bit Server VM
lib path: /Users/hinerm/Documents/workspace/OpenCLIterative3DDeconvolution/lib:/Users/hinerm/Documents/workspace/OpenCLIterative3DDeconvolution/lib/APPLE
CLContext [id: 4296115824, platform: Apple, profile: FULL_PROFILE, devices: 2]
OpenCL 1.0 (Aug 22 2010 18:08:16)
please ignore [Ljava.lang.String;@29c56c60PointerBuffer:AbstractBuffer[capacity 1, position 1, elementSize 8, ByteBuffer.capacity 8]
src: __kernel vo
-> success
**JUnit reports the same error as above***
A third test was run on Ubuntu 9.10 x64. This test passed:
OS: Linux
ARCH: amd64
VM: Java HotSpot(TM) 64-Bit Server VM
lib path: /home/chrysalisbiosciencesadmin/workspace/OpenCLIterative3DDeconvolution/lib:/home/chrysalisbiosciencesadmin/workspace/OpenCLIterative3DDeconvolution/lib/LINUX64:/home/chrysalisbiosciencesadmin/workspace/OpenCLIterative3DDeconvolution/lib/LINUX64
CLContext [id: 1093557648, platform: NVIDIA CUDA, profile: FULL_PROFILE, devices: 3]
OpenCL 1.0 CUDA 3.2.1
please ignore [Ljava.lang.String;@509ced8ePointerBuffer:AbstractBuffer[capacity 1, position 1, elementSize 8, ByteBuffer.capacity 8]
src: __kernel void sobel( __global float* input, __global float* output, int width, int height ) {
int x = get_global_id(0);
int y = get_global_id(1);
int offset = y * width + x;
float p0, p1, p2, p3, p5, p6, p7, p8 = 0;
if( x < 1 || y < 1 || x > width - 2 || y > height - 2 )
{
output[offset] = 0;
}
else
{
p0 = input[offset - width - 1] ;
p1 = input[offset - width] ;
p2 = input[offset - width + 1] ;
p3 = input[offset - 1] ;
p5 = input[offset + 1] ;
p6 = input[offset + width - 1] ;
p7 = input[offset + width] ;
p8 = input[offset + width + 1] ;
float sum1 = p0 + 2*p1 + p2 - p6 - 2*p7 - p8; //GY
float sum2 = p0 + 2*p3 + p6 - p2 - 2*p5 - p8; //GX
output[offset] = sqrt( sum1*sum1 + sum2*sum2 );
}
}
-> success