/** * Calls <a href="http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clCreateCommandQueue.html">clCreateCommandQueue</a>.<br> * Create an OpenCL execution queue on this device for the specified context. * @param context context of the queue to create * @return new OpenCL queue object */ @SuppressWarnings("deprecation") public CLQueue createQueue(CLContext context, QueueProperties... queueProperties) { ReusablePointers ptrs = ReusablePointers.get(); Pointer<Integer> pErr = ptrs.pErr; long flags = 0; for (QueueProperties prop : queueProperties) flags |= prop.value(); long queue = CL.clCreateCommandQueue(context.getEntity(), getEntity(), flags, getPeer(pErr)); error(pErr.getInt()); return new CLQueue(context, queue, this); }
/** * Calls <a href="http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clCreateCommandQueue.html">clCreateCommandQueue</a>.<br> * Create an OpenCL execution queue on this device for the specified context. * @param context context of the queue to create * @return new OpenCL queue object */ @SuppressWarnings("deprecation") public CLQueue createQueue(CLContext context, QueueProperties... queueProperties) { ReusablePointers ptrs = ReusablePointers.get(); Pointer<Integer> pErr = ptrs.pErr; long flags = 0; for (QueueProperties prop : queueProperties) flags |= prop.value(); long queue = CL.clCreateCommandQueue(context.getEntity(), getEntity(), flags, getPeer(pErr)); error(pErr.getInt()); return new CLQueue(context, queue, this); }
@SuppressWarnings("deprecation") public void setProperty(CLDevice.QueueProperties property, boolean enabled) { context.getPlatform().requireMinVersionValue("clSetCommandQueueProperty", 1.0, 1.1); error(CL.clSetCommandQueueProperty(getEntity(), property.value(), enabled ? CL_TRUE : CL_FALSE, 0)); }
@SuppressWarnings("deprecation") public void setProperty(CLDevice.QueueProperties property, boolean enabled) { context.getPlatform().requireMinVersionValue("clSetCommandQueueProperty", 1.0, 1.1); error(CL.clSetCommandQueueProperty(getEntity(), property.value(), enabled ? CL_TRUE : CL_FALSE, 0)); }