/** * Calls {@link #loadFromCache(java.lang.String, java.lang.String) } * with the additional build arguments set to {@code ""}. * @param id a unique identifier of the program * @return the loaded and built program or {@code null} if this * program could not be loaded from the cache * @see #loadFromCache(java.lang.String, java.lang.String) */ public Program loadFromCache(String id) { return loadFromCache(id, ""); }
File file = new File(tmpFolder, getCleanFileName(id));
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() {
/** * Calls {@link #loadFromCache(java.lang.String, java.lang.String) } * with the additional build arguments set to {@code ""}. * @param id a unique identifier of the program * @return the loaded and built program or {@code null} if this * program could not be loaded from the cache * @see #loadFromCache(java.lang.String, java.lang.String) */ public Program loadFromCache(String id) { return loadFromCache(id, ""); }
File file = new File(tmpFolder, getCleanFileName(id)); if (!file.exists()) { if (LOG.isLoggable(Level.FINE)) {
File file = new File(tmpFolder, getCleanFileName(id));
File file = new File(tmpFolder, getCleanFileName(id)); if (!file.exists()) { if (LOG.isLoggable(Level.FINE)) {