/** * Creates a command queue sending commands to the specified device. * The device must be an entry of {@link #getDevices() }. * @param device the target device * @return the command queue */ public abstract CommandQueue createQueue(Device device);
private void initOpenCL1() { clContext = context.getOpenCLContext(); Device device = clContext.getDevices().get(0); clQueue = clContext.createQueue(device).register();
return; CommandQueue clQueue = clContext.createQueue(clContext.getDevices().get(0));
return; CommandQueue clQueue = clContext.createQueue();
private void initOpenCL1() { clContext = context.getOpenCLContext(); clQueue = clContext.createQueue().register(); programCache = new ProgramCache(clContext); //create kernel String cacheID = getClass().getName()+".Julia"; Program program = programCache.loadFromCache(cacheID); if (program == null) { LOG.info("Program not loaded from cache, create from sources instead"); program = clContext.createProgramFromSourceFiles(assetManager, "jme3test/opencl/JuliaSet.cl"); program.build(); programCache.saveToCache(cacheID, program); } program.register(); kernel = program.createKernel("JuliaSet").register(); C = new Vector2f(0.12f, -0.2f); } private void initOpenCL2() {
clQueue = clContext.createQueue(device); clQueue.register();
/** * Creates a command queue sending commands to the specified device. * The device must be an entry of {@link #getDevices() }. * @param device the target device * @return the command queue */ public abstract CommandQueue createQueue(Device device);