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

JOCL eventCallback not called until another kernel starts

I'm trying to run a multithreaded Java application that executes OpenCL kernels. I wanted to notify one of the threads when a Kernel finishes, so I tried to use the clSetEventCallback method. For that I prepared a method void runKernel( …
Francesc Lordan
  • 519
  • 4
  • 24
0
votes
1 answer

time measurement execution and allocation in gpu

I am execution a parallel kernel on GPU using OpenCL and JOCL. I want to know: 1/ Is there any functions to know the kernel size in term of work-items and work groups and how it is executed in my Nvidia GPU platform? 2/ is there a possibility to…
0
votes
1 answer

how to know if the pixel color is black from a float 4

I ask my question how to know pixel color using t_sampler in jocl in a different way I want to konw if a pixel is black or white knowing that I am using t_sampler in my kernel const sampler_t smp = CLK_NORMALIZED_COORDS_FALSE | //Natural…
0
votes
0 answers

how to know pixel color using t_sampler in jocl

I want to detect peaks in a binary image using jocl. The definition of my peak is a combinition of colered pixels (shown in the image) how to use t_sampler to know pixel color? const sampler_t smp = CLK_NORMALIZED_COORDS_FALSE | //Natural…
0
votes
0 answers

CL_INVALID_KERNEL_ARGS error with image jocl

My goal is to write a code that takes an image (image) as entry variable and does an analysis and puts the result in an array (tab1) using java and jocl , as a beginning I wanted to see if the image is accepted so I wrote this program bellow and…
0
votes
1 answer

Pointer may not point to null objects java openCL

I am using a kernel that has an image as a parameter with java and JOCL input ="12.jpg"; image = createBufferedImage(input); image = createBufferedImage(input); DataBufferInt dataBufferSrc = (DataBufferInt)image.getRaster().getDataBuffer(); int…
0
votes
1 answer

Error CL_DEVICE_NOT_AVAILABLE in JOCL sampels

I need to use OpenCl with java So I have chosen JOCL when I wanted to try jocl samples ( http://www.jocl.org/samples/samples.html) I always find this error when compiling the samples. for example the sample (JOCLSample_1_2_KernelArgs.java) shows…
0
votes
0 answers

CL_PLATFORM_NOT_FOUND_KHR when calling JOCL.org from junit test

I've created a minimal example below, to demonstrate my problem. public class MinimalExample { public static void main(String[] args) { new MinimalExample().test(); } @Test public void test() { …
kd8azz
  • 613
  • 5
  • 21
0
votes
0 answers

Implementating Conway's Game of Life with JOCL

I'm having trouble with my assignment where I have to implement Conway's Game of Life using JOCL (http://jocl.org/), which is as you might've guessed OpenCL for Java Currently it compiles fine, but the output after the kernel execution is just zeros…
bla9x
  • 469
  • 7
  • 17
0
votes
0 answers

Am I overloading my opencl kernel? My screen goes blank while running the code

My kernel function has to store an intermediate private array with 7500 values. While running the code my screen goes blank for a second and when it resumes results are not displayed. Assuming that there is not enough private memory, I changed the…
0
votes
1 answer

Using a barrier causes a CL_INVALID_WORK_GROUP_SIZE error

If I use a barrier (no matter if CLK_LOCAL_MEM_FENCE or CLK_GLOBAL_MEM_FENCE) in my kernel, it causes a CL_INVALID_WORK_GROUP_SIZE error. The global work size is 512, the local work size is 128, 65536 items have to be computed, the max work group…
Michael Dorner
  • 17,587
  • 13
  • 87
  • 117
0
votes
0 answers

Float number with OpenCL in CPU, doesn't appear the decimal part

I have this code in OpenCL: __kernel void vector_add(__global float *C) { int i = get_global_id(0); float t =3.5f; C[i] = t; } When I run in GPU the return in variable C is 3.5, so it's ok. But when I run in CPU the return is 3.0. This…
0
votes
1 answer

Grayscale Image in OpenCL

I want to transform an RGB-Image to a grayscale image. My problem is, that the image is zoom, nonetheless the resolution stays the same. Here an example: Images. It seems the the OpenCL-Code seems correct: const sampler_t sampler = …
Link
  • 1,307
  • 1
  • 11
  • 23
0
votes
1 answer

OpenCL Start-End profiling time takes longer than actual duration time

I write an OpenCL Program and I execute my kernel like this Loop for MultipleGPU{ clEnqueueNDRangeKernel(commandQueues[i], kernel[i], 1, null, global_work_size, local_work_size, 0, new cl_event[]{userEvent}, events[i]); …
aelias
  • 37
  • 1
  • 6
0
votes
1 answer

HADOOP Map task failed: No protocol specified

I am using CDH4 and I am trying to access GPU from cleanup() method of mapper class using JOCL. (Note: My normal code(without map reduce) works fine on GPU). When I execute my map-reduce code, It throws an error (specified…