private void DefaultProperties() { MaxCachedBinaries = 50; FileSystem = new OCLManFileSystem(); RequireImageSupport = false; BuildOptions = ""; Defines = ""; SourcePath = "OpenCL" + FileSystem.GetDirectorySeparator() + "src"; BinaryPath = "OpenCL" + FileSystem.GetDirectorySeparator() + "bin"; AttemptUseBinaries = true; AttemptUseSource = true; }
/// <summary> /// Delete excess items in MetaFiles /// </summary> public void TrimBinaryCache(OCLManFileSystem fileSystem, int size) { if (size < 0) { return; } while (MetaFiles.Count > size && MetaFiles.Count > 0) { MetaFile mf = MetaFiles[0]; fileSystem.Delete(Root + Path.DirectorySeparatorChar + mf.BinaryName); MetaFiles.RemoveAt(0); } }
/// <summary> /// Delete excess items in MetaFiles /// </summary> public void TrimBinaryCache(OCLManFileSystem fileSystem, Int32 size) { if (size < 0) { return; } while (this.MetaFiles.Count > size && this.MetaFiles.Count > 0) { var mf = this.MetaFiles[0]; fileSystem.Delete(this.Root + Path.DirectorySeparatorChar + mf.BinaryName); this.MetaFiles.RemoveAt(0); } }
/// <summary> /// Delete excess items in MetaFiles /// </summary> public void TrimBinaryCache( OCLManFileSystem fileSystem, int size ) { if (size < 0) return; while (MetaFiles.Count > size && MetaFiles.Count>0) { MetaFile mf = MetaFiles[0]; fileSystem.Delete(Root + Path.DirectorySeparatorChar + mf.BinaryName); MetaFiles.RemoveAt(0); } }