Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for our (0.23 sec)

  1. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.cc

      new_entry->lra_iterator = lra_list_.begin();
      new_entry->timestamp = timer_seconds_();
      block_map_.emplace(std::make_pair(key, new_entry));
      return new_entry;
    }
    
    // Remove blocks from the cache until we do not exceed our maximum size.
    void RamFileBlockCache::Trim() {
      while (!lru_list_.empty() && cache_size_ > max_bytes_) {
        RemoveBlock(block_map_.find(lru_list_.back()));
      }
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 16 01:39:09 GMT 2020
    - 11.1K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/filesystem/plugins/gcs/expiring_lru_cache_test.cc

      EXPECT_EQ(num_compute_calls, 2);
    
      // Define a new cache with max_age > 0 and verify correct behavior.
      tf_gcs_filesystem::ExpiringLRUCache<int> cache2(2, 4);
      num_compute_calls = 0;
      value = -1;
    
      // Read our first value
      cache2.LookupOrCompute("a", &value, compute_func, &status);
      TF_EXPECT_OK(status.status);
      EXPECT_EQ(value, 0);
      EXPECT_EQ(num_compute_calls, 1);
    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)
  3. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

                              char* buffer, TF_Status* status) -> int64_t {
        calls++;
        memset(buffer, 'x', n);
        TF_SetStatus(status, TF_OK, "");
        return n;
      };
      std::vector<char> out;
      // Our fake environment is initialized with the current timestamp.
      std::unique_ptr<NowSecondsEnv> env(new NowSecondsEnv);
      uint64 now = Env::Default()->NowSeconds();
      env->SetNowSeconds(now);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:57 GMT 2021
    - 23.2K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/filesystem/modular_filesystem_test.cc

      ModularFileSystemTest::SetTmpDir(tmp_dir_);
      return true;
    }
    
    }  // namespace
    }  // namespace tensorflow
    
    // Due to the usages of flags for this manual test, we need a special `main` to
    // ensure our flags are parsed properly as `testing::InitGoogleTest` silently
    // ignores other flags. Furthermore, we need this to ensure that the DSO is
    // loaded exactly once, if provided.
    GTEST_API_ int main(int argc, char** argv) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri May 27 20:25:58 GMT 2022
    - 71K bytes
    - Viewed (0)
Back to top