Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for WriteToBuffer (0.1 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)
  3. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

                      status.ToString()));
            return std::nullopt;
          }
        }
        char* tensor_buffer;
        int bytes = dynamic_buffer.WriteToBuffer(&tensor_buffer);
        if (use_buffer_offset_) {
          std::vector<uint8_t> buffer_data(tensor_buffer, tensor_buffer + bytes);
          free(tensor_buffer);
          buffer_data_map_[index] =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
Back to top