/** * Returns the jar file for the renderscript mode. * * This may return null if the SDK has not been loaded yet. * * @return the jar file, or null. * * @see #setTargetInfo(TargetInfo) */ @Nullable public File getRenderScriptSupportJar() { if (mTargetInfo != null) { return RenderScriptProcessor.getSupportJar( mTargetInfo.getBuildTools().getLocation().getAbsolutePath()); } return null; }
/** * Returns the native lib folder for the renderscript mode. * * This may return null if the SDK has not been loaded yet. * * @return the folder, or null. * * @see #setTargetInfo(TargetInfo) */ @Nullable public File getSupportNativeLibFolder() { if (mTargetInfo != null) { return RenderScriptProcessor.getSupportNativeLibFolder( mTargetInfo.getBuildTools().getLocation().getAbsolutePath()); } return null; }
private void createSupportFiles( @NonNull final ProcessExecutor processExecutor, @NonNull final ProcessOutputHandler processOutputHandler, @NonNull final Map<String, String> env) throws IOException, InterruptedException, LoggedErrorException, ProcessException { // get the generated BC files. int targetApi = mTargetApi < 11 ? 11 : mTargetApi; targetApi = (mSupportMode && targetApi < 18) ? 18 : targetApi; if (targetApi < 21) { File rawFolder = new File(mResOutputDir, SdkConstants.FD_RES_RAW); createSupportFilesHelper(rawFolder, ABIS_32, processExecutor, processOutputHandler, env); } else { File rawFolder32 = new File(mResOutputDir, SdkConstants.FD_RES_RAW + "/bc32"); createSupportFilesHelper(rawFolder32, ABIS_32, processExecutor, processOutputHandler, env); File rawFolder64 = new File(mResOutputDir, SdkConstants.FD_RES_RAW + "/bc64"); createSupportFilesHelper(rawFolder64, ABIS_64, processExecutor, processOutputHandler, env); } }
public void build( @NonNull ProcessExecutor processExecutor, @NonNull ProcessOutputHandler processOutputHandler) throws InterruptedException, ProcessException, LoggedErrorException, IOException { // gather the files to compile FileGatherer fileGatherer = new FileGatherer(); SourceSearcher searcher = new SourceSearcher(mSourceFolders, "rs", "fs"); searcher.setUseExecutor(false); searcher.search(fileGatherer); List<File> renderscriptFiles = fileGatherer.getFiles(); if (renderscriptFiles.isEmpty()) { return; } // get the env var Map<String, String> env = Maps.newHashMap(); if (SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_DARWIN) { env.put("DYLD_LIBRARY_PATH", mBuildToolInfo.getLocation().getAbsolutePath()); } else if (SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_LINUX) { env.put("LD_LIBRARY_PATH", mBuildToolInfo.getLocation().getAbsolutePath()); } doMainCompilation(renderscriptFiles, processExecutor, processOutputHandler, env); if (mSupportMode) { createSupportFiles(processExecutor, processOutputHandler, env); } }
RenderScriptProcessor processor = new RenderScriptProcessor( sourceFolders, importFolders, supportMode, abiFilters); processor.build(mProcessExecutor, mProcessOutputHandler);
/** * Returns the BLAS lib folder for renderscript support mode. * * This may return null if the SDK has not been loaded yet. * * @return the folder, or null. * * @see #setTargetInfo(TargetInfo) */ @Nullable public File getSupportBlasLibFolder() { if (mTargetInfo != null) { return RenderScriptProcessor.getSupportBlasLibFolder( mTargetInfo.getBuildTools().getLocation().getAbsolutePath()); } return null; }
public void build( @NonNull ProcessExecutor processExecutor, @NonNull ProcessOutputHandler processOutputHandler) throws InterruptedException, ProcessException, LoggedErrorException, IOException { // gather the files to compile FileGatherer fileGatherer = new FileGatherer(); SourceSearcher searcher = new SourceSearcher(mSourceFolders, "rs", "fs"); searcher.setUseExecutor(false); searcher.search(fileGatherer); List<File> renderscriptFiles = fileGatherer.getFiles(); if (renderscriptFiles.isEmpty()) { return; } // get the env var Map<String, String> env = Maps.newHashMap(); if (SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_DARWIN) { env.put("DYLD_LIBRARY_PATH", mBuildToolInfo.getLocation().getAbsolutePath()); } else if (SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_LINUX) { env.put("LD_LIBRARY_PATH", mBuildToolInfo.getLocation().getAbsolutePath()); } doMainCompilation(renderscriptFiles, processExecutor, processOutputHandler, env); if (mSupportMode) { createSupportFiles(processExecutor, processOutputHandler, env); } }
RenderScriptProcessor processor = new RenderScriptProcessor( sourceFolders, importFolders, abiFilters, mLogger); processor.build(mProcessExecutor, processOutputHandler);
/** * Returns the native lib folder for the renderscript mode. * * This may return null if the SDK has not been loaded yet. * * @return the folder, or null. * * @see #setTargetInfo(SdkInfo, TargetInfo, Collection) */ @Nullable public File getSupportNativeLibFolder() { if (mTargetInfo != null) { return RenderScriptProcessor.getSupportNativeLibFolder( mTargetInfo.getBuildTools().getLocation().getAbsolutePath()); } return null; }
/** * Returns the jar file for the renderscript mode. * * This may return null if the SDK has not been loaded yet. * * @return the jar file, or null. * * @see #setTargetInfo(SdkInfo, TargetInfo, Collection) */ @Nullable public File getRenderScriptSupportJar() { if (mTargetInfo != null) { return RenderScriptProcessor.getSupportJar( mTargetInfo.getBuildTools().getLocation().getAbsolutePath()); } return null; }