Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for size_t (0.2 sec)

  1. tensorflow/c/eager/dlpack_test.cc

                              std::vector<int64_t> shape,
                              std::vector<int64_t> strides) {
      size_t num_elements = 1;
      for (int i = 0; i < static_cast<int32_t>(shape.size()); ++i) {
        num_elements *= shape[i];
      }
      std::vector<float> data(num_elements);
      for (size_t j = 0; j < num_elements; ++j) {
        data[j] = j;
      }
      DLManagedTensor dlm_in = {};
      DLTensor* dltensor_in = &dlm_in.dl_tensor;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Jun 30 03:04:46 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/filesystem/plugins/windows/windows_filesystem.cc

    #include "tensorflow/c/tf_status.h"
    
    // Implementation of a filesystem for POSIX environments.
    // This filesystem will support `file://` and empty (local) URI schemes.
    
    static void* plugin_memory_allocate(size_t size) { return calloc(1, size); }
    static void plugin_memory_free(void* ptr) { free(ptr); }
    
    // SECTION 1. Implementation for `TF_RandomAccessFile`
    // ----------------------------------------------------------------------------
    C++
    - Registered: Tue Apr 09 12:39:09 GMT 2024
    - Last Modified: Fri May 27 20:21:15 GMT 2022
    - 2.6K bytes
    - Viewed (0)
  3. tensorflow/c/c_api.cc

      const auto& s = attr->s();
      std::memcpy(value, s.data(), std::min<size_t>(s.length(), max_length));
    }
    
    void TF_OperationGetAttrStringList(TF_Operation* oper, const char* attr_name,
                                       void** values, size_t* lengths,
                                       int max_values, void* storage,
                                       size_t storage_size, TF_Status* status) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/grappler/grappler_test.cc

      std::unique_ptr<size_t[]> lens(new size_t[item.fetch.size()]);
      std::unique_ptr<char[]> storage(new char[storage_size]);
      TF_GetFetchNodesList(c_item, values.get(), lens.get(), item.fetch.size(),
                           storage.get(), storage_size, status);
      EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    
      for (size_t i = 0; i < item.fetch.size(); ++i) {
        EXPECT_EQ(item.fetch[i].size(), lens[i]) << i;
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Thu Apr 13 22:30:58 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem_test.cc

    };
    
    ::testing::AssertionResult WriteToServer(const std::string& path, size_t offset,
                                             size_t length, gcs::Client* gcs_client,
                                             TF_Status* status) {
      std::string bucket, object;
      ParseGCSPath(path, false, &bucket, &object, status);
      if (TF_GetCode(status) != TF_OK)
        return ::testing::AssertionFailure() << TF_Message(status);
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 12:04:23 GMT 2020
    - 24.9K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

    static int64_t Read(const TF_RandomAccessFile* file, uint64_t offset, size_t n,
                        char* buffer, TF_Status* status) {
      auto posix_file = static_cast<PosixFile*>(file->plugin_file);
      char* dst = buffer;
      int64_t read = 0;
    
      while (n > 0) {
        // Some platforms, notably macs, throw `EINVAL` if `pread` is asked to read
        // more than fits in a 32-bit integer.
        size_t requested_read_length;
        if (n > INT32_MAX)
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sun Mar 24 20:08:23 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  7. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

    // Passed to `TF_NewTensor` to indicate how an array of floats should be
    // deleted.
    static void FloatDeallocator(void* data, size_t, void* arg) {
      delete[] static_cast<float*>(data);
    }
    
    // Creates a TFE_TensorHandle with value `v`.
    TensorHandlePtr FloatTensorHandle(float v, TF_Status* status) {
      const int num_bytes = sizeof(float);
      float* values = new float[1];
      values[0] = v;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Jun 15 15:44:44 GMT 2021
    - 12.5K bytes
    - Viewed (0)
  8. tensorflow/c/c_api_experimental.cc

    }
    
    const char* TF_GraphDebugString(TF_Graph* graph, size_t* len) {
      tensorflow::mutex_lock c(graph->mu);
      const auto& debug_str = graph->graph.ToGraphDefDebug().DebugString();
      *len = debug_str.size();
      char* ret = static_cast<char*>(malloc(*len + 1));
      memcpy(ret, debug_str.c_str(), *len + 1);
      return ret;
    }
    
    char* TF_FunctionDebugString(TF_Function* func, size_t* len) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  9. tensorflow/c/c_api_function.cc

                                  TF_Status* status) {
      status->status = MessageToBuffer(func->record->fdef(), output_func_def);
    }
    
    TF_Function* TF_FunctionImportFunctionDef(const void* proto, size_t proto_len,
                                              TF_Status* status) {
      tensorflow::FunctionDef fdef;
      bool success = fdef.ParseFromArray(proto, proto_len);
      if (!success) {
        status->status = InvalidArgument(
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 13.6K bytes
    - Viewed (2)
  10. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

    }
    
    TEST(RamFileBlockCacheTest, PassThrough) {
      const string want_filename = "foo/bar";
      const size_t want_offset = 42;
      const size_t want_n = 1024;
      int calls = 0;
      auto fetcher = [&calls, want_filename, want_offset, want_n](
                         const string& got_filename, size_t got_offset,
                         size_t got_n, char* buffer, TF_Status* status) -> int64_t {
        EXPECT_EQ(got_filename, want_filename);
    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)
Back to top