Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for buffer (0.15 sec)

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

    }
    
    TEST(RamFileBlockCacheTest, ValidateAndUpdateFileSignature) {
      int calls = 0;
      auto fetcher = [&calls](const string& filename, size_t offset, size_t n,
                              char* buffer, TF_Status* status) -> int64_t {
        calls++;
        memset(buffer, 'x', n);
        TF_SetStatus(status, TF_OK, "");
        return n;
      };
      string filename = "file";
      tf_gcs_filesystem::RamFileBlockCache cache(16, 32, 0, fetcher);
      std::vector<char> out;
    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)
  2. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.cc

                                    size_t n, char* buffer, TF_Status* status) {
      if (n == 0) {
        TF_SetStatus(status, TF_OK, "");
        return 0;
      }
      if (!IsCacheEnabled() || (n > max_bytes_)) {
        // The cache is effectively disabled, so we pass the read through to the
        // fetcher without breaking it up into blocks.
        return block_fetcher_(filename, offset, n, buffer, status);
      }
    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)
  3. tensorflow/c/experimental/filesystem/modular_filesystem.cc

      option_value.type_tag = TF_Filesystem_Option_Type_Buffer;
      option_value.num_values = values.size();
      std::vector<TF_Filesystem_Option_Value_Union> option_values(values.size());
      for (size_t i = 0; i < values.size(); i++) {
        memset(&option_values[i], 0, sizeof(option_values[i]));
        option_values[i].buffer_val.buf = const_cast<char*>(values[i].c_str());
        option_values[i].buffer_val.buf_length = values[i].size();
      }
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 23.1K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

          copy_size = (std::min)(n, static_cast<size_t>(buffer_end - offset));
          memcpy(buffer,
                 gcs_file->buffer.data() + (offset - gcs_file->buffer_start),
                 copy_size);
        }
        bool consumed_buffer_to_eof =
            offset + copy_size >= buffer_end && gcs_file->buffer_end_is_past_eof;
        if (copy_size < n && !consumed_buffer_to_eof) {
    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)
  5. tensorflow/c/c_test_util.cc

      TF_Status* s = TF_NewStatus();
      TF_Buffer* buffer = TF_NewBuffer();
      TF_GraphToGraphDef(graph, buffer, s);
      bool ret = TF_GetCode(s) == TF_OK;
      EXPECT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
      if (ret) ret = graph_def->ParseFromArray(buffer->data, buffer->length);
      TF_DeleteBuffer(buffer);
      TF_DeleteStatus(s);
      return ret;
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  6. tensorflow/c/eager/c_api_experimental_test.cc

      CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      auto* cell2 = TFE_MonitoringGetCellStringGauge2(gauge2, "foo", "bar");
      TFE_MonitoringStringGaugeCellSet(cell2, "str");
      auto* buf = new TF_Buffer;
      TFE_MonitoringStringGaugeCellValue(cell2, buf);
      string data(static_cast<const char*>(buf->data), buf->length);
      TF_DeleteBuffer(buf);
      EXPECT_EQ(data, "str");
      TFE_MonitoringDeleteStringGauge2(gauge2);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 03:14:26 GMT 2023
    - 31.5K bytes
    - Viewed (1)
  7. tensorflow/c/BUILD

            ],
        }),
    )
    
    cc_library(
        name = "tf_buffer_hdrs",
        hdrs = [
            "tf_buffer.h",
        ],
        visibility = ["//visibility:public"],
        deps = [
            ":c_api_macros_hdrs",
        ],
    )
    
    cc_library(
        name = "tf_buffer",
        srcs = [
            "tf_buffer.cc",
        ],
        hdrs = [
            "tf_buffer.h",
        ],
        copts = tf_copts(),
    Plain Text
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Mar 27 18:00:18 GMT 2024
    - 30.3K bytes
    - Viewed (0)
  8. tensorflow/c/experimental/grappler/grappler.h

      // by create_func. The second param is input graph. The third param is
      // GrapplerItem. The fourth param is output graph.
      void (*optimize_func)(void*, const TF_Buffer*, const TF_GrapplerItem*,
                            TF_Buffer*, TF_Status*);
    
      // [Optional]
      // Destroy function for optimizer. If Create function is provided, destroy
      // function is must.
      void (*destroy_func)(void*);
    } TP_Optimizer;
    C
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Aug 03 18:08:43 GMT 2022
    - 12.5K bytes
    - Viewed (0)
  9. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.h

      /// 4) `TF_OK` otherwise (i.e. the read succeeded, and at least one byte was
      /// placed
      ///    in `buffer`).
      ///
      /// Caller is responsible for allocating memory for `buffer`.
      /// `buffer` will be left unchanged in case of errors.
      int64_t Read(const std::string& filename, size_t offset, size_t n,
                   char* buffer, TF_Status* status);
    
      // Validate the given file signature with the existing file signature in the
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 04:46:34 GMT 2020
    - 10.6K bytes
    - Viewed (0)
  10. tensorflow/c/eager/c_api_experimental.h

    // Serialize `attrs` as a tensorflow::NameAttrList protocol buffer (into `buf`),
    // containing the op name and a map of its attributes.
    TF_CAPI_EXPORT extern void TFE_OpAttrsSerialize(const TFE_OpAttrs* attrs,
                                                    TF_Buffer* buf,
                                                    TF_Status* status);
    
    // Set an op's attribute from a serialized AttrValue protocol buffer.
    //
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Feb 21 22:37:46 GMT 2024
    - 39.5K bytes
    - Viewed (0)
Back to top