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
1
vote
1 answer

Java OpenCL: Passing scalar parameter to kernel in JOCL

Does there exist a way to pass scalar parameter to kernel in JOCL without creating a new array? In C++ one can simply cast the scalar parameter (for example, int) to void*
aaronqli
  • 790
  • 9
  • 26
1
vote
1 answer

Java: Cast or reference multidimensional array into single dimensional array

I have a program written in Java which involves massive amount of multidimensional array. I am trying to parallelize it using JOCL (OpenCL), but multidimensional array has to be converted to single dimensional array before being passed to OpenCL.…
aaronqli
  • 790
  • 9
  • 26
0
votes
1 answer

cannot run JOCL samples downloaded from jocl.org. (OPENCL for java)

I have downloaded the sample file from jocl.org and compiled it without problems (c:\javac -cp c:\jocl.jar JOCLSample.java) When I tried to run it (c:\java -cp c:\jocl.jar JOCLSample), some errors occurred: C:\Users\Ruoyu>java -cp C:\j.jar…
0
votes
1 answer

GPU programming via JOCL uses only 6 out of 80 shader cores?

I am trying to let a program run on my GPU and to start with an easy sample I modified the first sample on http://www.jocl.org/samples/samples.html and to run the following little script: I run n simultaneous "threads" (what's the correct name for…
user1111929
  • 6,050
  • 9
  • 43
  • 73
0
votes
0 answers

MVN is not letting me install JOCL

I'm currently trying to install the Java bindings of openCL through JOCL. I have followed the steps provided on their site from cloning the two git links to building the native libraries. I haven't followed the steps installing clBLAS and clBLAST…
Juan_Puthr
  • 11
  • 1
0
votes
0 answers

OpenCL: memory recovery and threading?

This is my first attempt at using OpenCL. It's being done using Java with the glue from jocl.org. I suspect that there's some fundamental issue about memory management or threads that I'm not aware of. As an initial trial, the OpenCL code takes a 1D…
Randall Fairman
  • 296
  • 3
  • 9
0
votes
0 answers

jogamp jocl native bind only for clEnqueueMapImage0 are missing

In my jogamp jocl program when i call (non static) CLCommandQueue.putMapImage() i get this error: Exception in thread "main" java.lang.UnsatisfiedLinkError:…
ZDibLO
  • 1
  • 1
0
votes
0 answers

Why would JOCL CL.clEnqueueReadBuffer never return?

Currently I have a kernel that is supposed to take a flattened array of bytes and transform render some image, I have all of this implemented, however, I have a line of code that never returns ret = CL.clEnqueueReadBuffer(this.commandQueue,…
0
votes
1 answer

JNCI/JCOL kernel optimization

I have a kernel running in open CL (via a jocl front end) that is running horrible slow compared to the other kernels, I'm trying to figure why and how to accelerate it. This kernel is very basic. it's sole job is to decimate the number of sample…
dsollen
  • 6,046
  • 6
  • 43
  • 84
0
votes
1 answer

Efficiently synchronously queue many small OpenCL kernels

TLDR: How can I run many small kernels, one at a time, without significant overhead? I'm working on a project that acts as a virtual green screen. It takes in an image feed, looks for pixels similar to a color key, and replaces those pixels with a…
Gabriel Pizarro
  • 400
  • 4
  • 15
0
votes
1 answer

copying an image onto another with JOCL/OpenCL

so my goal is to use the GPU for my brand new Java project which is to create a game and the game engine itself (I think it is a very good way to learn in deep how it works). I was using multi-threading on the CPU with java.awt.Graphics2D to display…
0
votes
0 answers

CL_INVALID_MEM_OBJECT error when calling clSetKernelArg in JOCL

EDIT: Realized that I was reinstantiating the cl_context on every iteration. It works now. Although this is a JOCL specific question, I believe it is applicable to OpenCL in general. I have a program that sends int arrays to an OpenCL kernel to be…
Daniel Williams
  • 635
  • 7
  • 14
0
votes
2 answers

JOCL Char not returning all chars

package parallelencode; import org.jocl.*; import static org.jocl.CL.*; public class ParallelEncode { /** * The source code of the OpenCL program to execute */ private static String programSource = "__kernel void "+ …
Alex Jone
  • 292
  • 2
  • 14
0
votes
0 answers

OpenCL double precision error on Surface 3 pro

I have created some benchmark program to test some characteristics of OpenCL. This has run on several platforms: core i7-920/nvidia 1060 and a double Xeon-2660/Radeon 480. This all worked fine. When I run it on a surface 3 pro I get the following…
Arnold
  • 4,578
  • 6
  • 52
  • 91
0
votes
1 answer

Does libGDX support the OpenCL wrapper built into LWJGL, which it is built off of?

I have been working on programming a convolutional back-propagation neural network recently and I have mainly been using Java to run the program and libGDX for the graphical visualizations. Through heavy research, I have found that to heavily…
Youseflapod
  • 132
  • 1
  • 10