Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for StringPiece (0.2 sec)

  1. tensorflow/c/experimental/filesystem/modular_filesystem.h

          : filename_(filename), file_(std::move(file)), ops_(ops) {}
    
      ~ModularRandomAccessFile() override { ops_->cleanup(file_.get()); }
    
      Status Read(uint64 offset, size_t n, StringPiece* result,
                  char* scratch) const override;
      Status Name(StringPiece* result) const override;
    
     private:
      std::string filename_;
      std::unique_ptr<TF_RandomAccessFile> file_;
      const TF_RandomAccessFileOps* ops_;  // not owned
    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)
  2. tensorflow/c/experimental/gradients/tape/tape_operation.cc

                                            const void* const* values,
                                            const size_t* lengths, int num_values) {
      std::vector<StringPiece> v(num_values);
      for (int i = 0; i < num_values; ++i) {
        v[i] = StringPiece(static_cast<const char*>(values[i]), lengths[i]);
      }
      forward_op_.attrs.Set(attr_name, v);
      return parent_op_->SetAttrStringList(attr_name, values, lengths, num_values);
    }
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jun 07 01:53:35 GMT 2022
    - 9K bytes
    - Viewed (1)
  3. tensorflow/c/experimental/filesystem/modular_filesystem_registration.cc

      return OkStatus();
    }
    
    // Checks if the plugin and core ABI numbers match.
    //
    // If the numbers don't match, plugin cannot be loaded.
    static Status CheckABI(int pluginABI, int coreABI, StringPiece where) {
      if (pluginABI != coreABI)
        return errors::FailedPrecondition(
            strings::StrCat("Plugin ABI (", pluginABI, ") for ", where,
                            " operations doesn't match expected core ABI (",
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 07 22:08:43 GMT 2023
    - 12.8K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/filesystem/modular_filesystem.cc

          ops_->read(file_.get(), offset, n, scratch, plugin_status.get());
      if (read > 0) *result = StringPiece(scratch, read);
      return StatusFromTF_Status(plugin_status.get());
    }
    
    Status ModularRandomAccessFile::Name(StringPiece* result) const {
      *result = filename_;
      return OkStatus();
    }
    
    Status ModularWritableFile::Append(StringPiece data) {
      if (ops_->append == nullptr)
    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)
  5. tensorflow/c/eager/gradients.cc

                             const void* const* values, const size_t* lengths,
                             int num_values, ForwardOperation* forward_op_) {
      std::vector<StringPiece> v(num_values);
      for (int i = 0; i < num_values; ++i) {
        v[i] = StringPiece(static_cast<const char*>(values[i]), lengths[i]);
      }
      forward_op_->attrs.Set(attr_name, v);
      return op_->SetAttrStringList(attr_name, values, lengths, num_values);
    }
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  6. tensorflow/c/checkpoint_reader.cc

    #include "tensorflow/c/checkpoint_reader.h"
    
    #include <unordered_set>
    #include <utility>
    
    #include "tensorflow/core/platform/env.h"
    #include "tensorflow/core/platform/status.h"
    #include "tensorflow/core/platform/stringpiece.h"
    #include "tensorflow/core/platform/types.h"
    #include "tensorflow/core/util/saved_tensor_slice_util.h"
    #include "tensorflow/core/util/tensor_bundle/naming.h"
    #include "tensorflow/core/util/tensor_bundle/tensor_bundle.h"
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Aug 25 21:29:12 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  7. 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->Append(::tensorflow::StringPiece{data, length}));
    }
    
    void TF_DeleteFile(const char* filename, TF_Status* status) {
      TF_SetStatus(status, TF_OK, "");
      ::tensorflow::Set_TF_Status_from_Status(
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Aug 11 01:20:50 GMT 2021
    - 7K bytes
    - Viewed (0)
  8. tensorflow/c/eager/c_api_unified_experimental_graph.cc

        }
        return absl::OkStatus();
      }
    
      Status SetAttrString(const char* attr_name, const char* data,
                           size_t length) override {
        tensorflow::StringPiece s(data, length);
        op_->node_builder.Attr(attr_name, s);
        return absl::OkStatus();
      }
      Status SetAttrInt(const char* attr_name, int64_t value) override {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 15.4K bytes
    - Viewed (1)
  9. tensorflow/c/experimental/filesystem/modular_filesystem_test.cc

        // if it isn't empty.
        return translated_name;
      }
    
      // Converts absolute paths to paths relative to root_dir_.
      StringPiece GetRelativePath(StringPiece absolute_path) {
        return tensorflow::str_util::StripPrefix(absolute_path, root_dir_);
      }
    
      // Initializes the randomness used to ensure test isolation.
      static void InitializeTestRNG() {
        std::random_device rd;
        std::mt19937 gen(rd());
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri May 27 20:25:58 GMT 2022
    - 71K bytes
    - Viewed (0)
  10. tensorflow/c/c_api.cc

    #include "tensorflow/core/platform/protobuf.h"
    #include "tensorflow/core/platform/status.h"
    #include "tensorflow/core/platform/str_util.h"
    #include "tensorflow/core/platform/strcat.h"
    #include "tensorflow/core/platform/stringpiece.h"
    #include "tensorflow/core/platform/thread_annotations.h"
    #include "tensorflow/core/platform/types.h"
    #include "tensorflow/core/public/session.h"
    #include "tensorflow/core/public/version.h"
    
    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)
Back to top