Hi, is possible to make an asynchronous copy of CLImage2D in JavaCL ?
Someone have an example of that?
Looking at documentation I found a createImage2D in context class with a
boolean parameter copy
that returns a CLImage2D and a method write in CLImage that have a boolean
parameter blocking.
I try to use this two methods to make an asynchronous copy in the
following code:
CLImageFormat format = new CLImageFormat(CLImageFormat.ChannelOrder.BGRA
, CLImageFormat.ChannelDataType.UNormInt8);
CLImage2D inputImage = context.createImage2D(CLMem.Usage.Input, format,
width, height, 0, pixels.getBuffer(), false);
CLImageFormat imageFormat =new
CLImageFormat(CLImageFormat.ChannelOrder.BGRA,
CLImageFormat.ChannelDataType.UNormInt8);
inputImage.write(queue, image, false);
but i get this error:
Exception in thread "Thread-2" java.lang.IllegalArgumentException: Raster
has 3 data elements, should have only 1 !
at
com.nativelibs4java.opencl.ImageIOUtils.checkSinglePixelPackedSampleModel(ImageIOUtils.java:164)
at
com.nativelibs4java.opencl.ImageIOUtils$9.getData(ImageIOUtils.java:407)
at
com.nativelibs4java.opencl.ImageIOUtils$9.getData(ImageIOUtils.java:403)
at com.nativelibs4java.opencl.CLImage2D.write(CLImage2D.java:215)
thanks
--
You received this message because you are subscribed to the Google Groups
"NativeLibs4Java" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.