"Fossies" - the Fresh Open Source Software Archive

Member "qt-everywhere-src-6.3.1/qtwebengine/src/3rdparty/chromium/third_party/tflite-support/patches/0001-Remove-use-of-banned-absl-any.patch" (8 Jun 2022, 2368 Bytes) of package /linux/misc/qt-everywhere-src-6.3.1.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 From 670dfffa386fd0ff28e66cfe1238af43b4e587ce Mon Sep 17 00:00:00 2001
    2 From: Daniel Rubery <drubery@chromium.org>
    3 Date: Thu, 6 May 2021 11:22:13 -0700
    4 Subject: [PATCH] Remove use of banned absl::any
    5 
    6 ---
    7  .../cc/task/vision/core/frame_buffer.h        | 27 -------------------
    8  1 file changed, 27 deletions(-)
    9 
   10 diff --git a/third_party/tflite-support/src/tensorflow_lite_support/cc/task/vision/core/frame_buffer.h b/third_party/tflite-support/src/tensorflow_lite_support/cc/task/vision/core/frame_buffer.h
   11 index 2bea92883c4d..1556b7dfabef 100644
   12 --- a/third_party/tflite-support/src/tensorflow_lite_support/cc/task/vision/core/frame_buffer.h
   13 +++ b/third_party/tflite-support/src/tensorflow_lite_support/cc/task/vision/core/frame_buffer.h
   14 @@ -27,7 +27,6 @@ limitations under the License.
   15  #include "absl/strings/str_cat.h"
   16  #include "absl/time/clock.h"
   17  #include "absl/time/time.h"
   18 -#include "absl/types/any.h"
   19  #include "absl/types/optional.h"
   20  #include "tensorflow_lite_support/cc/port/integral_types.h"
   21  #include "tensorflow_lite_support/cc/port/statusor.h"
   22 @@ -253,31 +252,6 @@ class FrameBuffer {
   23      return {};
   24    }
   25  
   26 -  // Returns the tag associated to the tag_key.
   27 -  absl::any GetTag(const std::string& tag_key) const {
   28 -    auto iter = tags_.find(tag_key);
   29 -    if (iter != tags_.end()) {
   30 -      return iter->second;
   31 -    }
   32 -    return absl::any();
   33 -  }
   34 -
   35 -  // Inserts or updates the tags map with key value pair (tag_key, tag_value).
   36 -  void InsertOrUpdateTag(const std::string& tag_key, absl::any tag_value) {
   37 -    tags_[tag_key] = std::move(tag_value);
   38 -  }
   39 -
   40 -  // Inserts the key value pair (tag_key, tag_value) into tags map. If the
   41 -  // tag_key already exists, an internal error will return.
   42 -  absl::Status InsertTag(const std::string& tag_key, absl::any tag_value) {
   43 -    auto iter = tags_.emplace(tag_key, tag_value);
   44 -    if (iter.second) {
   45 -      return absl::OkStatus();
   46 -    }
   47 -    return absl::InternalError(absl::StrCat(
   48 -        "tag_key already exists in tags.tag_key was not inserted: ", tag_key));
   49 -  }
   50 -
   51    // Returns FrameBuffer dimension.
   52    const Dimension dimension() const { return dimension_; }
   53  
   54 @@ -292,7 +266,6 @@ class FrameBuffer {
   55  
   56   private:
   57    std::vector<Plane> planes_;
   58 -  std::map<std::string, absl::any> tags_;
   59    Dimension dimension_;
   60    Format format_;
   61    Orientation orientation_;
   62 -- 
   63 2.31.1.607.g51e8a6a459-goog
   64