summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-02-16 17:04:35 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-02-16 17:04:35 +1000
commitad0a92e1300a7d934b3b21c90684e5ed4f6866f1 (patch)
treeeaeddc2760eb7661aedf79e8a635d95c0870cec2 /examples
parentf87e6d9f0a6cdc7f20f5ef5280bd01ff8de0443f (diff)
Add convenience functions for buffer read/write with zero offset.
Diffstat (limited to 'examples')
-rw-r--r--examples/opencl/mandelbrot/imagecl.cpp2
-rw-r--r--examples/opencl/vectoradd/vectoradd.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/opencl/mandelbrot/imagecl.cpp b/examples/opencl/mandelbrot/imagecl.cpp
index a0d591d..82ae2b7 100644
--- a/examples/opencl/mandelbrot/imagecl.cpp
+++ b/examples/opencl/mandelbrot/imagecl.cpp
@@ -175,7 +175,7 @@ void ImageCL::generateImage
floatColors.append(float(color.blueF()));
floatColors.append(float(color.alphaF()));
}
- colorBuffer.write(0, floatColors.constData(),
+ colorBuffer.write(floatColors.constData(),
maxIterations * sizeof(float) * 4);
if (!textureBuffer.textureId()) {
diff --git a/examples/opencl/vectoradd/vectoradd.cpp b/examples/opencl/vectoradd/vectoradd.cpp
index a2480d9..5082bd9 100644
--- a/examples/opencl/vectoradd/vectoradd.cpp
+++ b/examples/opencl/vectoradd/vectoradd.cpp
@@ -86,7 +86,7 @@ int main(int, char **)
// Execute the kernel and then read back the results.
kernel(buffer1, buffer2, buffer3);
- buffer3.read(0, output, sizeof(output));
+ buffer3.read(output, sizeof(output));
// Check the answer.
for (int index = 0; index < VECTOR_SIZE; ++index) {