Questions tagged [jocl]

JOCL provides an easy to use Java binding for the OpenCL API.

JOCL exposes the OpenCL API in two levels: A automatically generated low level JNI based binding and a hand written high level binding on top of the generated interfaces. The high level bindings provide a convenient interface and reduce verbosity to a minimum.

project home:

community:

friends:

  • Java binding to OpenGL (JOGL)
  • Java binding to OpenAL (JOAL)
72 questions
15
votes
1 answer

"UnsatisfiedLinkError: Native Library already loaded in another classloader" in multimodule project

I have a project which uses JOCL library (http://www.jocl.org/) and has multiple modules. When I run "./activator test" from command line, or run "test" command in SBT console I'm getting errors like the following: [info] Exception encountered when…
Wibowit
  • 371
  • 2
  • 11
5
votes
1 answer

Releasing Memory Allocated by Native Libraries in Java

If you are running code that makes calls to a native library in Java, what is the usual way of freeing memory allocated by these libraries when the memory allocation should last for the lifetime of the object? In C++, I would use destructors, but…
charleslparker
  • 1,904
  • 1
  • 21
  • 31
5
votes
1 answer

Java applet: jocl operations stop java3d

Jocl(opencl wrapper) kernel running makes java3d output disabled. When opencl finishes, java3d continus working. How can I let Opencl(jocl) and opengl(java3d) work together? I need some kind of command that tells "its opencl time" and when it…
huseyin tugrul buyukisik
  • 11,469
  • 4
  • 45
  • 97
4
votes
2 answers

Speedup sum of intensities calculation by using JOCL/OPENCL

Hi I'm new to JOCL (opencl). I wrote this code to take the sum of the intensities per image. The kernel takes a 1D array of all the pixels of all the images put behind eachother. An image is 300x300 , so that's 90000 pixels per image. At the moment…
Olivier_s_j
  • 5,490
  • 24
  • 80
  • 126
3
votes
2 answers

Very odd OpenCL CL_OUT_OF_RESOURCES behavior

I am writing a rather large OpenCL program with lots of function calls. I've been having problems with CL_OUT_OF_RESOURCES errors, but I managed to fix the problem with a simple printf statement. This is the code fragment in question: ... const…
Daniel Williams
  • 635
  • 7
  • 14
3
votes
1 answer

OpenCL & Java - Weird Performance Results

I'm trying to look into using OpenCL to improve the performance of some Java code using JOCL. I've been going through the samples provided on their website and used them to throw together a quick program to compare its performance to running things…
Hersfold
  • 91
  • 7
3
votes
1 answer

OpenCL How to reconstruct buffers when using multiple devices?

I am learning myself openCL in Java using the jogamp jocl libraries. One of my tests is ceating a Mandelbrot map. I have four tests: simple serial, parallel using the Java executor interface, openCL for a single device and openCL for multiple…
Arnold
  • 4,578
  • 6
  • 52
  • 91
3
votes
1 answer

How to use cl_khr_gl_sharing in Jocl?

I'm trying to write real-time raytracer. I use Java and Jogamp bindings of OpenGL and OpenCL for it (calls Jogl and Jocl). I already have raytracing code in my .cl kernel and its works well. I get output as FloatBuffer and pass it to the OpenGL…
Crabonog
  • 423
  • 3
  • 12
3
votes
0 answers

GPU computing on Mac OSX Marvericks with Intel Iris Pro 1024 MB

I have a Mac OS X Marvericks with Intel Iris Pro 1024 MB and have been doing some graphics/simulation work in Processing. I have ran into performance issues with the built in perlin noise function of processing. I plan to use GPU for computing the…
Dhruv Kapur
  • 726
  • 1
  • 8
  • 24
3
votes
0 answers

jocl neural network

I wrote a neural network in java and it looked like a good idea to take the computation on the gpu for performance issue. The problem I have is that its too slow... I have used jocl to do so. I dont now if its the kernel here is some code: private…
2
votes
0 answers

How to pass an array of structs to kernel with JOCL

I'm writing an OpenCL raytracer using JOCL (OpenCL bindings for Java). I want to pass an array of structs to my kernel. The struct looks like this: struct Sphere { float3 center; float radius; int materialIndex; }; and the kernel takes…
adrian
  • 1,439
  • 1
  • 15
  • 23
2
votes
1 answer

Issue in OpenCL Kernel function

I am new to Open-cl and I am trying to write kernel code for the following matrix operation: A is a 2X2 matrix: A = [1 2] ----> row1 [3 4] ----->row2 I need to compute: 1) s1 = transpose(row1) X row1 2) s1 = transpose(row2) X row2 3) Sum =…
2
votes
2 answers

Using OpenCL for multiple devices (multiple GPU)

Hello fellow StackOverflow Users, I have this problem : I have one very big image which i want to work on. My first idea is to divide the big image to couple of sub-images and then send this sub-images to different GPUs. I don't use the…
aelias
  • 37
  • 1
  • 6
2
votes
1 answer

Pass int as kernel argument in JOCL

So I have a kernel that looks like to this: __kernel void my_kernel( __global const uchar *array, const uint number, __global const uchar *result) { ... } I have figured out how to pass the arrays (byte arrays in Java) by creating a buffer: cl_mem…
Veles
  • 1,512
  • 4
  • 14
  • 28
1
vote
2 answers

OpenCL: how to use local memory in JOCL

Assume that I want to perform parallel computations on a large fixed object, e.g. a fixed large sparse (directed) graph, or any similar kind of object. To do any reasonable computations on this graph or object, such as random walks in the graph,…
user1111929
  • 6,050
  • 9
  • 43
  • 73
1
2 3 4 5