summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLImage.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-01-25 19:43:11 +0100
committerMichael Bien <[email protected]>2010-01-25 19:43:11 +0100
commitb4ae8c794974e91878ca005bf2eaaa95781301a3 (patch)
treefe5ee3073f9d20a31c04709ee847057aa7741c81 /src/com/mbien/opencl/CLImage.java
parent8e2cfb1179a97f7ed1248132429e1e60663b0d42 (diff)
CLImage support for CLCommandQueue.
Diffstat (limited to 'src/com/mbien/opencl/CLImage.java')
-rw-r--r--src/com/mbien/opencl/CLImage.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/mbien/opencl/CLImage.java b/src/com/mbien/opencl/CLImage.java
index 448caeda..a5e44fc0 100644
--- a/src/com/mbien/opencl/CLImage.java
+++ b/src/com/mbien/opencl/CLImage.java
@@ -15,10 +15,15 @@ public abstract class CLImage<B extends Buffer> extends CLMemory<B> {
final CLInfoAccessor imageInfo;
- protected CLImage(CLContext context, B directBuffer, CLImageFormat format, long id) {
+ public final int width;
+ public final int height;
+
+ protected CLImage(CLContext context, B directBuffer, CLImageFormat format, int width, int height, long id) {
super(context, directBuffer, id);
this.imageInfo = new CLImageInfoAccessor();
this.format = format;
+ this.width = width;
+ this.height = height;
}
/**
@@ -47,14 +52,14 @@ public abstract class CLImage<B extends Buffer> extends CLMemory<B> {
* Returns width of this image in pixels.
*/
public int getWidth() {
- return (int)imageInfo.getLong(CL_IMAGE_WIDTH);
+ return width;
}
/**
* Returns the height of this image in pixels.
*/
public int getHeight() {
- return (int)imageInfo.getLong(CL_IMAGE_HEIGHT);
+ return height;
}