summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLContext.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-02-21 08:37:26 +0100
committerSven Gothel <[email protected]>2014-02-21 08:37:26 +0100
commitd4f04ddd3ef3b65b7c31d3504cf55489153c60c1 (patch)
treee72294205d659cb1484c72a612f72f043634a648 /src/com/jogamp/opencl/CLContext.java
parent84e5e16a4aaa206c39b04b980d8d63ffacb97dbb (diff)
Bug 979: Add 'CL_DEVICE_MEM_BASE_ADDR_ALIGN' to CLDevice and overal maximum to CLContext - Split CLBufferTest and use alignment.
See Bug 979 for remaining issues and discussion.
Diffstat (limited to 'src/com/jogamp/opencl/CLContext.java')
-rw-r--r--src/com/jogamp/opencl/CLContext.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/jogamp/opencl/CLContext.java b/src/com/jogamp/opencl/CLContext.java
index 163375eb..378f42f9 100644
--- a/src/com/jogamp/opencl/CLContext.java
+++ b/src/com/jogamp/opencl/CLContext.java
@@ -628,6 +628,17 @@ public class CLContext extends CLObjectResource {
}
/**
+ * Returns the maximum {@link CLDevice#getMemBaseAddrAlign()} of all devices.
+ */
+ public long getMaxMemBaseAddrAlign() {
+ long maxAlignment = 0;
+ for (CLDevice device : getDevices()) {
+ maxAlignment = Math.max(maxAlignment, device.getMemBaseAddrAlign());
+ }
+ return maxAlignment;
+ }
+
+ /**
* Returns all devices associated with this CLContext.
*/
public CLDevice[] getDevices() {