Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for closure (0.31 sec)

  1. tensorflow/c/experimental/filesystem/modular_filesystem_test.cc

      if (!status.ok()) GTEST_SKIP() << "Append() not supported: " << status;
      status = new_file->Flush();
      if (!status.ok()) GTEST_SKIP() << "Flush() not supported: " << status;
      status = new_file->Close();
      if (!status.ok()) GTEST_SKIP() << "Close() not supported: " << status;
    
      std::unique_ptr<ReadOnlyMemoryRegion> region;
      status = env_->NewReadOnlyMemoryRegionFromFile(filepath, &region);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri May 27 20:25:58 GMT 2022
    - 71K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/filesystem/modular_filesystem.cc

      return StatusFromTF_Status(plugin_status.get());
    }
    
    Status ModularWritableFile::Close() {
      if (ops_->close == nullptr)
        return errors::Unimplemented(
            tensorflow::strings::StrCat("Close() not implemented for ", filename_));
    
      UniquePtrTo_TF_Status plugin_status(TF_NewStatus(), TF_DeleteStatus);
      ops_->close(file_.get(), plugin_status.get());
      return StatusFromTF_Status(plugin_status.get());
    }
    
    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)
  3. tensorflow/c/eager/tape.h

    // to allow their size to be computed and they need to be passable to a backward
    // function and deleted (as the backprop code creates lots of gradients the user
    // is not interested in).
    //
    // BackwardFunction needs to be a closure which stores intermediate activations
    // from the forward computation and calls a vector-jacobian product function
    // (also known as adjoint function) to compute, given downstream gradients,
    // upstream gradients.
    //
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Apr 02 12:40:29 GMT 2024
    - 47.2K bytes
    - Viewed (1)
  4. tensorflow/c/env_test.cc

                        << filepath << ": " << TF_Message(s);
    
        TF_CloseWritableFile(handle, s);
        ASSERT_TF_OK(s) << "TF_CloseWritableFile failed to close handle to "
                        << filepath << ": " << TF_Message(s);
    
        TF_StringStream* children = TF_GetChildren(dirpath.c_str(), s);
        ASSERT_TF_OK(s) << "TF_GetChildren failed for " << dirpath;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Dec 10 20:52:48 GMT 2018
    - 4.2K bytes
    - Viewed (0)
  5. tensorflow/c/env.cc

      auto* cc_file = reinterpret_cast<::tensorflow::WritableFile*>(handle);
      TF_SetStatus(status, TF_OK, "");
      ::tensorflow::Set_TF_Status_from_Status(status, cc_file->Close());
      delete cc_file;
    }
    
    void TF_SyncWritableFile(TF_WritableFileHandle* handle, TF_Status* status) {
      auto* cc_file = reinterpret_cast<::tensorflow::WritableFile*>(handle);
      TF_SetStatus(status, TF_OK, "");
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Aug 11 01:20:50 GMT 2021
    - 7K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem_helper.cc

      if (dst_fd < 0) {
        close(src_fd);
        return -1;
      }
    
      // Both files have been opened, do the transfer.
      // Since errno would be overridden by `close` below, save it here.
      int error_code = 0;
      if (CopyFileContents(dst_fd, src_fd, size) < 0) error_code = errno;
    
      close(src_fd);
      close(dst_fd);
      if (error_code != 0) {
        errno = error_code;
        return -1;
    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)
  7. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_helper.cc

    TempFile::TempFile(TempFile&& rhs)
        : std::fstream(std::move(rhs)), name_(std::move(rhs.name_)) {}
    
    TempFile::~TempFile() {
      std::fstream::close();
      std::remove(name_.c_str());
    }
    
    const std::string TempFile::getName() const { return name_; }
    
    bool TempFile::truncate() {
      std::fstream::close();
      std::fstream::open(name_, std::ios::binary | std::ios::out);
      return std::fstream::is_open();
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Jun 26 14:56:58 GMT 2020
    - 1.3K bytes
    - Viewed (0)
  8. tensorflow/c/c_api.cc

      } else {
        DCHECK_EQ(nullptr, session);
        return nullptr;
      }
    }
    
    void TF_CloseDeprecatedSession(TF_DeprecatedSession* s, TF_Status* status) {
      status->status = s->session->Close();
    }
    
    void TF_DeleteDeprecatedSession(TF_DeprecatedSession* s, TF_Status* status) {
      status->status = absl::OkStatus();
      if (s == nullptr) return;
      delete s->session;
      delete s;
    }
    
    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)
  9. tensorflow/c/experimental/filesystem/modular_filesystem.h

          : filename_(filename), file_(std::move(file)), ops_(ops) {}
    
      ~ModularWritableFile() override { ops_->cleanup(file_.get()); }
    
      Status Append(StringPiece data) override;
      Status Close() override;
      Status Flush() override;
      Status Sync() override;
      Status Name(StringPiece* result) const override;
      Status Tell(int64_t* position) override;
    
     private:
      std::string filename_;
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Oct 12 08:49:52 GMT 2023
    - 8.9K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

      Flush(file, status);
    }
    
    void Close(const TF_WritableFile* file, TF_Status* status) {
      auto gcs_file = static_cast<GCSFile*>(file->plugin_file);
      TF_VLog(3, "Close: gs://%s/%s", gcs_file->bucket.c_str(),
              gcs_file->object.c_str());
      if (gcs_file->sync_need) {
        Flush(file, status);
      }
      gcs_file->outfile.close();
    }
    
    }  // namespace tf_writable_file
    
    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