Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ComputeFunc (0.18 sec)

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

      /// Look up the entry with key `key` and copy it to `value` if found. If not
      /// found, call `compute_func`. If `compute_func` set `status` to `TF_OK`,
      /// store a copy of the output parameter in the cache, and another copy in
      /// `value`.
      void LookupOrCompute(const std::string& key, T* value,
                           const ComputeFunc& compute_func, TF_Status* status) {
    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/expiring_lru_cache_test.cc

      EXPECT_EQ(value, 5);
    }
    
    TEST(ExpiringLRUCacheTest, LookupOrCompute) {
      // max_age of 0 means we should always compute.
      uint64 num_compute_calls = 0;
      tf_gcs_filesystem::ExpiringLRUCache<int>::ComputeFunc compute_func =
          [&num_compute_calls](const string& key, int* value, TF_Status* status) {
            *value = num_compute_calls;
            num_compute_calls++;
            return TF_SetStatus(status, TF_OK, "");
          };
    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/gcs_filesystem.cc

        }
        ++count;
      }
    
      return result;
    }
    
    static bool FolderExists(GCSFile* gcs_file, std::string dir,
                             TF_Status* status) {
      ExpiringLRUCache<GcsFileStat>::ComputeFunc compute_func =
          [gcs_file](const std::string& dir, GcsFileStat* stat, TF_Status* status) {
            auto children =
                GetChildrenBounded(gcs_file, dir, 1, true, true, status);
    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)
Back to top