- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for MiniDynamicBuffer (0.44 sec)
-
tensorflow/compiler/mlir/lite/utils/string_utils.h
#include <limits> #include <vector> #include "absl/status/status.h" namespace mlir::TFL { constexpr uint64_t kDefaultMaxLength = std::numeric_limits<int>::max(); class MiniDynamicBuffer { public: explicit MiniDynamicBuffer(size_t max_length = kDefaultMaxLength) : offset_({0}), max_length_(max_length) {} // Add string to dynamic buffer by resizing the buffer and copying the data.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Jun 12 21:41:49 UTC 2024 - 2.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/string_utils.cc
#include <cstddef> #include <cstdint> #include <cstdlib> #include <cstring> #include <vector> #include "absl/status/status.h" namespace mlir::TFL { absl::Status MiniDynamicBuffer::AddString(const char* str, size_t len) { // If `data_.size() + len` is greater than `SIZE_MAX` then the left hand side // will overflow to something less than max_length_. After checking `len <=
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Jun 12 21:41:49 UTC 2024 - 2.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/flatbuffer_export.cc
// TensorFlow and TensorFlow Lite use different string encoding formats. // Convert to TensorFlow Lite format is it's a constant string tensor. if (tensor.dtype() == tensorflow::DT_STRING) { ::mlir::TFL::MiniDynamicBuffer dynamic_buffer; auto flat = tensor.flat<::tensorflow::tstring>(); for (int i = 0; i < flat.size(); ++i) { const auto& str = flat(i); if (!dynamic_buffer.AddString(str.c_str(), str.length()).ok()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Jun 12 21:41:49 UTC 2024 - 164.5K bytes - Viewed (0)