Jcuda 0.3.0 and texture

Hi, All! I have simple code which work fine with JCuda 0.2.3

JCudaDriver.cuModuleGetTexRef(texture, module, name); 
JCudaDriver.cuTexRefSetFormat(texture, CUarray_format.CU_AD_FORMAT_FLOAT, 1);

final int[] txOffset = new int[1];
JCudaDriver.cuTexRefSetAddress(txOffset, texture, device.getDevice(), device.getHost().length * TYPE_SIZE));

if (txOffset[0] > 0)             throw new IllegalArgumentException("Must be zero! "); 

But with JCuda 0.3.0. I get not null value in txOffset[0]. I always get 5. I use cuMemAlloc for memory allocation.

I test this on Windows 7 64 bit and Gentoo 64 bit. I use Java 64 bit and cuda api 3.0.

Please help.


I found the reason for this bug. An updated version will be uploaded tomorrow.


Actually, this bug was also the reason why the new Graphics Interoperability did not work properly yet… Thanks for pointing this out! :slight_smile:

The updated version has been uploaded, and the bug should be fixed now. Any feedback will be appreciated.