Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for WriteToBuffer (0.09 sec)

  1. tensorflow/compiler/mlir/lite/utils/string_utils.h

      absl::Status AddString(const char* str, size_t len);
    
      // Fill content into a buffer and returns the number of bytes stored.
      // The function allocates space for the buffer but does NOT take ownership.
      int WriteToBuffer(char** buffer);
    
     private:
      // Data buffer to store contents of strings, not including headers.
      std::vector<char> data_;
      // Offset of the starting index of each string in data buffer.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/string_utils.cc

      data_.resize(data_.size() + len);
      memcpy(data_.data() + offset_.back(), str, len);
      offset_.push_back(offset_.back() + len);
      return absl::OkStatus();
    }
    
    int MiniDynamicBuffer::WriteToBuffer(char** buffer) {
      // Allocate sufficient memory to tensor buffer.
      int32_t num_strings = offset_.size() - 1;
      // Total bytes include:
      //   * size of content (data_.size)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top