putUnmapMemory - compile error
Posted by suleman on Jun 28, 2011; 12:31pm
URL: https://forum.jogamp.org/putUnmapMemory-compile-error-tp3117568.html
Hi,
I am trying to use putMapBuffers, program work OK when i donot use "putUnmapMemory" calls, when i use those calls (as shown in following code) Java compiler complains:
memTest]$ javac *.java
MemTest.java:102: cannot find symbol
symbol : method putUnmapMemory(com.jogamp.opencl.CLBuffer<capture#107 of ?>)
location: class com.jogamp.opencl.CLCommandQueue
queue.putUnmapMemory(clBufferA);
^
MemTest.java:103: cannot find symbol
symbol : method putUnmapMemory(com.jogamp.opencl.CLBuffer<capture#645 of ?>)
location: class com.jogamp.opencl.CLCommandQueue
queue.putUnmapMemory(clBufferB);
^
MemTest.java:104: cannot find symbol
symbol : method putUnmapMemory(com.jogamp.opencl.CLBuffer<capture#65 of ?>)
location: class com.jogamp.opencl.CLCommandQueue
queue.putUnmapMemory(clBufferC);
^
3 errors
Program code
------------------------------------------
....
CLBuffer<?> clBufferA = context.createBuffer((globalWorkSize*4), Mem.READ_ONLY, ALLOCATE_BUFFER);
CLBuffer<?> clBufferB = context.createBuffer((globalWorkSize*4), Mem.READ_ONLY, ALLOCATE_BUFFER);
CLBuffer<?> clBufferC = context.createBuffer((globalWorkSize*4), Mem.WRITE_ONLY, ALLOCATE_BUFFER);
.....
ByteBuffer h_data1 = queue.putMapBuffer(clBufferA,WRITE,true);
ByteBuffer h_data2 = queue.putMapBuffer(clBufferB,WRITE,true);
queue.put1DRangeKernel(kernel, 0, globalWorkSize, localWorkSize);
ByteBuffer h_data3 = queue.putMapBuffer(clBufferC,READ,true);
queue.putUnmapMemory(clBufferA);
queue.putUnmapMemory(clBufferB);
queue.putUnmapMemory(clBufferC);