From f1aeb2ca0440dc3a77943200f2f699802036196b Mon Sep 17 00:00:00 2001
From: Michael Bien <mbien@fh-landshut.de>
Date: Wed, 20 Apr 2011 01:41:23 +0200
Subject: fixed compiler errors due to changes in public api.

---
 .../jogamp/opencl/demos/bandwidth/BandwidthBenchmark.java | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/com/jogamp/opencl/demos/bandwidth/BandwidthBenchmark.java b/src/com/jogamp/opencl/demos/bandwidth/BandwidthBenchmark.java
index ffbaea3..30de54e 100644
--- a/src/com/jogamp/opencl/demos/bandwidth/BandwidthBenchmark.java
+++ b/src/com/jogamp/opencl/demos/bandwidth/BandwidthBenchmark.java
@@ -257,8 +257,7 @@ public class BandwidthBenchmark {
             fill(h_data);
 
             // unmap and make data in the host buffer valid
-            cmPinnedData = cmPinnedData.cloneWith(h_data);
-            queue.putUnmapMemory(cmPinnedData);
+            queue.putUnmapMemory(cmPinnedData, h_data);
         } else { // PAGED
             // standard host alloc
             h_data = Buffers.newDirectByteBuffer(memSize);
@@ -299,8 +298,7 @@ public class BandwidthBenchmark {
                 h_data.put(dm_idata).rewind();
                 dm_idata.rewind();
             }
-            cmDevData = cmDevData.cloneWith(dm_idata);
-            queue.putUnmapMemory(cmDevData);
+            queue.putUnmapMemory(cmDevData, dm_idata);
         }
 
         //get the the elapsed time in seconds
@@ -310,8 +308,7 @@ public class BandwidthBenchmark {
         cmDevData.release();
 
         if (cmPinnedData != null) {
-            cmPinnedData = cmPinnedData.cloneWith(h_data);
-            queue.putUnmapMemory(cmPinnedData);
+            queue.putUnmapMemory(cmPinnedData, h_data);
             cmPinnedData.release();
         }
 
@@ -343,8 +340,7 @@ public class BandwidthBenchmark {
             fill(h_data);
 
             // unmap and make data in the host buffer valid
-            cmPinnedData = cmPinnedData.cloneWith(h_data);
-            queue.putUnmapMemory(cmPinnedData);
+            queue.putUnmapMemory(cmPinnedData, h_data);
         } else { // PAGED
             // standard host alloc
             h_data = Buffers.newDirectByteBuffer(memSize);
@@ -379,8 +375,7 @@ public class BandwidthBenchmark {
                 dm_idata.put(h_data).rewind();
                 h_data.rewind();
             }
-            cmDevData = cmDevData.cloneWith(dm_idata);
-            queue.putUnmapMemory(cmDevData);
+            queue.putUnmapMemory(cmDevData, dm_idata);
         }
 
         //get the the elapsed time in ms
-- 
cgit v1.2.3