/** * Builds this program without additional arguments * @throws KernelCompilationException if the compilation fails * @see #build(java.lang.String) */ public void build() throws KernelCompilationException { build("", (Device[]) null); }
program.build(buildArgs, device); } catch (OpenCLException ex) { LOG.log(Level.FINE, "Unable to build program", ex);
ByteBuffer bb = BufferUtils.createByteBuffer(bytes); program = clContext.createProgramFromBinary(bb, device); program.build(); LOG.info("reuse program from cached binaries"); } catch (java.nio.file.NoSuchFileException ex) { + "}\n"; program = clContext.createProgramFromSourceCode(source); program.build();
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() {
program.build(); Kernel kernel = program.createKernel("Fill"); System.out.println("number of args: "+kernel.getArgCount());
+ "}\n"; Program program = clContext.createProgramFromSourceCodeWithDependencies(code, assetManager); program.build(); com.jme3.opencl.Buffer buffer = clContext.createBuffer(3);
program.build();
+ "}\n"; Program program = clContext.createProgramFromSourceCodeWithDependencies(code, assetManager); program.build(); com.jme3.opencl.Buffer buffer = clContext.createBuffer(1);
+ "}\n"; Program program = clContext.createProgramFromSourceCode(source); program.build(); program.register(); kernel = program.createKernel("Fill");
/** * Builds this program without additional arguments * @throws KernelCompilationException if the compilation fails * @see #build(java.lang.String) */ public void build() throws KernelCompilationException { build("", (Device[]) null); }
program.build(buildArgs, device); } catch (OpenCLException ex) { LOG.log(Level.FINE, "Unable to build program", ex);