Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for max_entries_ (0.36 sec)

  1. tensorflow/c/experimental/filesystem/plugins/gcs/expiring_lru_cache.h

        auto insert = cache_.insert(std::make_pair(key, entry));
        if (!insert.second) {
          lru_list_.erase(insert.first->second.lru_iterator);
          insert.first->second = entry;
        } else if (max_entries_ > 0 && cache_.size() > max_entries_) {
          cache_.erase(lru_list_.back());
          lru_list_.pop_back();
        }
      }
    
      bool DeleteLocked(const std::string& key) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) {
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 09 19:31:22 GMT 2020
    - 6.3K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

      if (stat_cache_max_age_env &&
          absl::SimpleAtoi(stat_cache_max_age_env, &value)) {
        stat_cache_max_age = value;
      }
      const char* stat_cache_max_entries_env = std::getenv(kStatCacheMaxEntries);
      if (stat_cache_max_entries_env &&
          absl::SimpleAtoi(stat_cache_max_entries_env, &value)) {
        stat_cache_max_entries = static_cast<size_t>(value);
      }
      stat_cache = std::make_unique<ExpiringLRUCache<GcsFileStat>>(
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Aug 23 06:55:53 GMT 2023
    - 46.9K bytes
    - Viewed (0)
  3. cmd/os_other.go

    	if err != nil {
    		return nil, osErrToFileErr(err)
    	}
    	defer d.Close()
    
    	maxEntries := 1000
    	if opts.count > 0 && opts.count < maxEntries {
    		maxEntries = opts.count
    	}
    
    	done := false
    	remaining := opts.count
    
    	for !done {
    		// Read up to max number of entries.
    		fis, err := d.Readdir(maxEntries)
    		if err != nil {
    			if err == io.EOF {
    				break
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Sep 13 15:14:36 GMT 2023
    - 4K bytes
    - Viewed (0)
  4. src/archive/tar/format.go

    type sparseArray []byte
    
    func (s sparseArray) entry(i int) sparseElem { return sparseElem(s[i*24:]) }
    func (s sparseArray) isExtended() []byte     { return s[24*s.maxEntries():][:1] }
    func (s sparseArray) maxEntries() int        { return len(s) / 24 }
    
    type sparseElem []byte
    
    func (s sparseElem) offset() []byte { return s[00:][:12] }
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/filesystem/plugins/gcs/expiring_lru_cache_test.cc

      EXPECT_EQ(value, 43);
      // ...but is no longer valid 2 seconds after the insertion.
      env->SetNowSeconds(6);
      EXPECT_FALSE(cache.Lookup(key, &value));
    }
    
    TEST(ExpiringLRUCacheTest, MaxEntries) {
      // max_age of 0 means nothing will be cached.
      tf_gcs_filesystem::ExpiringLRUCache<int> cache1(0, 4);
      cache1.Insert("a", 1);
      int value = 0;
      EXPECT_FALSE(cache1.Lookup("a", &value));
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 09 19:31:22 GMT 2020
    - 7.1K bytes
    - Viewed (0)
  6. src/archive/tar/reader.go

    	var p parser
    	hdr.Size = p.parseNumeric(blk.toGNU().realSize())
    	if p.err != nil {
    		return nil, p.err
    	}
    	s := blk.toGNU().sparse()
    	spd := make(sparseDatas, 0, s.maxEntries())
    	for {
    		for i := 0; i < s.maxEntries(); i++ {
    			// This termination condition is identical to GNU and BSD tar.
    			if s.entry(i).offset()[0] == 0x00 {
    				break // Don't return, need to process extended headers (even if empty)
    			}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  7. src/archive/tar/writer.go

    			spd = invertSparseEntries(sph, hdr.Size)
    
    			// Format the sparse map.
    			formatSPD := func(sp sparseDatas, sa sparseArray) sparseDatas {
    				for i := 0; len(sp) > 0 && i < sa.MaxEntries(); i++ {
    					f.formatNumeric(sa.Entry(i).Offset(), sp[0].Offset)
    					f.formatNumeric(sa.Entry(i).Length(), sp[0].Length)
    					sp = sp[1:]
    				}
    				if len(sp) > 0 {
    					sa.IsExtended()[0] = 1
    				}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  8. src/archive/tar/reader_test.go

    		}
    	}
    }
    
    func TestReadOldGNUSparseMap(t *testing.T) {
    	populateSparseMap := func(sa sparseArray, sps []string) []string {
    		for i := 0; len(sps) > 0 && i < sa.maxEntries(); i++ {
    			copy(sa.entry(i), sps[0])
    			sps = sps[1:]
    		}
    		if len(sps) > 0 {
    			copy(sa.isExtended(), "\x80")
    		}
    		return sps
    	}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Nov 21 21:14:38 GMT 2022
    - 47.1K bytes
    - Viewed (0)
Back to top