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
0
votes
1 answer

Need help adding OpenCL(GPU Usage)

Well I decided I prefer to use GPU over CPU especially since I'm working on a game and FPS will increase I expect. The thing is i'm not sure where to start. I can easily implement JOCL or JCUDA but after that I wouldnt know where to replace it from…
stdio.h
  • 3
  • 1
0
votes
2 answers

OpenCL (JOCL) - 2D calculus over two arrays in Kernel

I'm asking this here because I thought I've understood how OpenCL works but... I think there are several things I don't get. What I want to do is to get the difference between all the values of two arrays, then calculate the hypot and finally get…
TomRacer
  • 13
  • 3
0
votes
0 answers

CPU opencl and occupancy with some device fission

I am doing trials with device fission used on FX8150 7-cores device and 1 core for hosting. Then put some workload of array of 51200 floats. Calculation is done on O(N*N)(trigonometric) basis. When run first time, it uses only 3 cores then second…
huseyin tugrul buyukisik
  • 11,469
  • 4
  • 45
  • 97
0
votes
0 answers

Opencl with jocl: same computation rules for cpu and gpu

I'm using jocl to apply some trigonometric functions on elements of a float-array. While doing same code on both cpu and gpu at the same time, results vary minorly on the 0.000x digits and it is rarely. This must be origineated from the differecies…
huseyin tugrul buyukisik
  • 11,469
  • 4
  • 45
  • 97
0
votes
1 answer

OpenCL: struct field initialization from inline function does not work

I have an OpenCL kernel code, which does not behave as expected. The similar C code compiled with gcc works fine. struct data { short* a; }; typedef struct data Data; inline void foo(Data* d) { short b[1] = {99}; d->a = b; } __kernel…
catdog
  • 87
  • 2
  • 3
  • 9
0
votes
1 answer

Timing data transfer and execution in JOCL

I am using the JOCL library (by JOGAMP) and I was wondering if it was possible to measure the time it took to transfer data from host to device, the time the kernel took and the time it took to get the results back separately? Currently I am…
Veles
  • 1,512
  • 4
  • 14
  • 28
0
votes
2 answers

OpenCL script giving unexpected results

I have this simple block of OpenCL code, and I am getting unexpected results. The parameters image is an array of floats and value is a number from -255 to +255. Using java I use a JSlider to change the value. The default value is 0 and the problem…
Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338
0
votes
2 answers

Java OpenCL with JOCL: What is a direct buffer?

When I was experimenting on clEnqueueReadBuffer, I got an exception: Exception in thread "main" java.lang.IllegalArgumentException: Non-blocking read operations may only be performed using pointers to direct buffers On this line: …
aaronqli
  • 790
  • 9
  • 26
0
votes
1 answer

best way to do large number of vector computations with gpgpu?

I have a matrix of 1 million columns x 1 million rows. My algoritm needs to do: Matrix m = Matrix(rows,cols) for (colB: cols){ vector currColA = m.getcolumn(colA) for (colB: cols){ vector currColB = m.getcolumn(colB) result =…
seinecle
  • 10,118
  • 14
  • 61
  • 120
-1
votes
2 answers

What is the right global_work_size and local_work_size in Matrix Multiplication in OpenCL?

I'm doing matrix multiplication in JOCL a Java bindings to OpenCL. The problem, I got an error Exception in thread "main" org.jocl.CLException: CL_INVALID_WORK_ITEM_SIZE at org.jocl.CL.checkResult(CL.java:787) at…
Renée
  • 31
  • 5
-1
votes
1 answer

How to read txt file in OpenCL

I'm new to OpenCL. Does anybody know how to read a text file through OpenCL? Because I want to be able to read the file and split the content into some arrays. For the example, I have txt file consists: 1010101 1 1010111. I want to get 1010101 as…
user3698011
  • 167
  • 3
  • 14
-2
votes
1 answer

GPGPU performance in high-level languages

For my science fair project I have to write a computationally-intensive algorithm that is well suited to parallelization. I have read about OpenCL and CUDA and it seems they are mainly used from C/C++. While it would not be that difficult for me to…
Elliot Gorokhovsky
  • 3,610
  • 2
  • 31
  • 56
1 2 3 4
5