1 /* 2 * Copyright (c) Meta Platforms, Inc. and affiliates. 3 * All rights reserved. 4 * 5 * This source code is licensed under the BSD-style license found in the 6 * LICENSE file in the root directory of this source tree. 7 */ 8 9 // A simple image struct. 10 11 #pragma once 12 #include <executorch/runtime/platform/compiler.h> 13 #include <cstdint> 14 #include <vector> 15 16 namespace executorch { 17 namespace extension { 18 namespace llm { 19 20 struct ET_EXPERIMENTAL Image { 21 // Assuming NCHW format 22 std::vector<uint8_t> data; 23 int32_t width; 24 int32_t height; 25 int32_t channels; 26 }; 27 28 } // namespace llm 29 } // namespace extension 30 } // namespace executorch 31 32 namespace torch { 33 namespace executor { 34 // TODO(T197294990): Remove these deprecated aliases once all users have moved 35 // to the new `::executorch` namespaces. 36 using ::executorch::extension::llm::Image; 37 } // namespace executor 38 } // namespace torch 39