Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for src (0.16 sec)

  1. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem_helper.cc

    #include <unistd.h>
    
    #include "tensorflow/c/experimental/filesystem/plugins/posix/copy_file.h"
    
    namespace tf_posix_filesystem {
    
    int TransferFileContents(const char* src, const char* dst, mode_t mode,
                             off_t size) {
      int src_fd = open(src, O_RDONLY);
      if (src_fd < 0) return -1;
    
      // When creating file, use the same permissions as original
      mode_t open_mode = mode & (S_IRWXU | S_IRWXG | S_IRWXO);
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jan 16 05:36:52 GMT 2020
    - 2.1K bytes
    - Viewed (1)
  2. tensorflow/c/c_api.cc

      }
    
      // Store results in c_outputs[]
      for (int i = 0; i < noutputs; ++i) {
        const Tensor& src = outputs[i];
        if (!src.IsInitialized() || src.NumElements() == 0) {
          c_outputs[i] =
              EmptyTensor(static_cast<TF_DataType>(src.dtype()), src.shape());
          continue;
        }
        c_outputs[i] = TF_TensorFromTensor(src, &status->status);
        if (!status->status.ok()) return;
      }
    }
    
    extern "C" {
    
    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)
  3. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

      // We cannot copy directories yet, so prevent this.
      if (stat(src, &st) != 0) {
        TF_SetStatusFromIOError(status, errno, src);
        return;
      } else if (S_ISDIR(st.st_mode)) {
        TF_SetStatus(status, TF_FAILED_PRECONDITION, "source path is a directory");
        return;
      }
    
      // Both `src` and `dst` point to files here. Delegate to helper.
      if (TransferFileContents(src, dst, st.st_mode, st.st_size) < 0)
    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)
  4. tensorflow/c/c_api_experimental.cc

      for (int i = 0; i < num_items; ++i) {
        TF_DeleteShapeAndTypeList(shape_list_array[i]);
      }
      delete[] shape_list_array;
    }
    
    namespace tensorflow {
    Status TF_TensorToTensor(const TF_Tensor* src, Tensor* dst);
    
    // Helpers for loadding a TensorFlow PluggableDevice plugin (a .so file).
    Status LoadPluggableDeviceLibrary(const char* library_filename, void** result);
    }  // namespace tensorflow
    
    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)
  5. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem_test.cc

    TEST_F(GCSFilesystemTest, RenameFile) {
      tf_gcs_filesystem::Init(filesystem_, status_);
      ASSERT_TF_OK(status_);
      const std::string src = GetURIForPath("RenameFileSrc");
      const std::string dst = GetURIForPath("RenameFileDst");
      WriteString(src, "test");
      ASSERT_TF_OK(status_);
    
      tf_gcs_filesystem::RenameFile(filesystem_, src.c_str(), dst.c_str(), status_);
      EXPECT_TF_OK(status_);
      auto result = ReadAll(dst);
      EXPECT_TF_OK(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/copy_file_portable.cc

    #include "tensorflow/c/experimental/filesystem/plugins/posix/copy_file.h"
    
    namespace tf_posix_filesystem {
    
    // Transfers up to `size` bytes from `dst_fd` to `src_fd`.
    //
    // This method uses a temporary buffer to hold contents.
    int CopyFileContents(int dst_fd, int src_fd, off_t size) {
      // Use a copy buffer of 128KB but don't store it on the stack.
      constexpr static size_t kPosixCopyFileBufferSize = 128 * 1024;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Nov 22 21:23:55 GMT 2019
    - 1.9K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/filesystem/modular_filesystem.cc

      std::string translated_src = TranslateName(src);
      std::string translated_target = TranslateName(target);
      ops_->rename_file(filesystem_.get(), translated_src.c_str(),
                        translated_target.c_str(), plugin_status.get());
      return StatusFromTF_Status(plugin_status.get());
    }
    
    Status ModularFileSystem::CopyFile(const std::string& src,
                                       const std::string& target,
    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)
  8. tensorflow/c/c_api_test.cc

      // Check unused input mappings
      int num_unused_input_mappings;
      const char** src_names;
      int* src_indexes;
      TF_ImportGraphDefResultsMissingUnusedInputMappings(
          results, &num_unused_input_mappings, &src_names, &src_indexes);
      ASSERT_EQ(1, num_unused_input_mappings);
      EXPECT_EQ(string("fake"), string(src_names[0]));
      EXPECT_EQ(0, src_indexes[0]);
    
      TF_DeleteImportGraphDefResults(results);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
  9. tensorflow/c/experimental/filesystem/plugins/posix/copy_file_linux.cc

    #include "tensorflow/c/experimental/filesystem/plugins/posix/copy_file.h"
    
    namespace tf_posix_filesystem {
    
    // Transfers up to `size` bytes from `dst_fd` to `src_fd`.
    //
    // This method uses `sendfile` specific to linux after 2.6.33.
    int CopyFileContents(int dst_fd, int src_fd, off_t size) {
      off_t offset = 0;
      int bytes_transferred = 0;
      int rc = 1;
      // When `sendfile` returns 0 we stop copying and let callers handle this.
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Nov 22 21:23:55 GMT 2019
    - 1.5K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

    }
    
    static void RenameObject(const TF_Filesystem* filesystem,
                             const std::string& src, const std::string& dst,
                             TF_Status* status) {
      TF_VLog(3, "RenameObject: started %s to %s", src.c_str(), dst.c_str());
      std::string bucket_src, object_src;
      ParseGCSPath(src, false, &bucket_src, &object_src, status);
      if (TF_GetCode(status) != TF_OK) return;
    
      std::string bucket_dst, object_dst;
    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