chromium/out/Default/gen/components/ml/mojom/web_platform_model.mojom-shared.h

// components/ml/mojom/web_platform_model.mojom-shared.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_ML_MOJOM_WEB_PLATFORM_MODEL_MOJOM_SHARED_H_
#define COMPONENTS_ML_MOJOM_WEB_PLATFORM_MODEL_MOJOM_SHARED_H_

#include <stdint.h>

#include <functional>
#include <iosfwd>
#include <type_traits>
#include <utility>
#include "mojo/public/cpp/bindings/array_data_view.h"
#include "mojo/public/cpp/bindings/enum_traits.h"
#include "mojo/public/cpp/bindings/interface_data_view.h"
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/map_data_view.h"
#include "mojo/public/cpp/bindings/string_data_view.h"

#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"

#include "components/ml/mojom/web_platform_model.mojom-shared-internal.h"
#include "mojo/public/mojom/base/big_buffer.mojom-shared.h"
#include "mojo/public/cpp/bindings/lib/interface_serialization.h"
#include "mojo/public/cpp/system/data_pipe.h"






namespace ml::model_loader::mojom {
class CreateModelLoaderOptionsDataView;

class TensorInfoDataView;

class ModelInfoDataView;



}  // ml::model_loader::mojom

namespace mojo {
namespace internal {

template <>
struct MojomTypeTraits<::ml::model_loader::mojom::CreateModelLoaderOptionsDataView> {};

template <>
struct MojomTypeTraits<::ml::model_loader::mojom::TensorInfoDataView> {};

template <>
struct MojomTypeTraits<::ml::model_loader::mojom::ModelInfoDataView> {};

}  // namespace internal
}  // namespace mojo


namespace ml::model_loader::mojom {


enum class ModelFormat : int32_t {};

 std::ostream& operator<<(std::ostream& os, ModelFormat value);
inline bool IsKnownEnumValue(ModelFormat value) {}
inline ModelFormat ToKnownEnumValue(ModelFormat value) {}


enum class DevicePreference : int32_t {};

 std::ostream& operator<<(std::ostream& os, DevicePreference value);
inline bool IsKnownEnumValue(DevicePreference value) {}
inline DevicePreference ToKnownEnumValue(DevicePreference value) {}


enum class DataType : int32_t {};

 std::ostream& operator<<(std::ostream& os, DataType value);
inline bool IsKnownEnumValue(DataType value) {}
inline DataType ToKnownEnumValue(DataType value) {}


enum class LoadModelResult : int32_t {};

 std::ostream& operator<<(std::ostream& os, LoadModelResult value);
inline bool IsKnownEnumValue(LoadModelResult value) {}


enum class CreateModelLoaderResult : int32_t {};

 std::ostream& operator<<(std::ostream& os, CreateModelLoaderResult value);
inline bool IsKnownEnumValue(CreateModelLoaderResult value) {}


enum class ComputeResult : int32_t {};

 std::ostream& operator<<(std::ostream& os, ComputeResult value);
inline bool IsKnownEnumValue(ComputeResult value) {}
// Interface base classes. They are used for type safety check.
class ModelLoaderInterfaceBase {};

ModelLoaderPtrDataView;
ModelLoaderRequestDataView;
ModelLoaderAssociatedPtrInfoDataView;
ModelLoaderAssociatedRequestDataView;
class ModelInterfaceBase {};

ModelPtrDataView;
ModelRequestDataView;
ModelAssociatedPtrInfoDataView;
ModelAssociatedRequestDataView;


class CreateModelLoaderOptionsDataView {};


class TensorInfoDataView {};


class ModelInfoDataView {};


}  // ml::model_loader::mojom

namespace std {

template <>
struct hash<::ml::model_loader::mojom::ModelFormat>
    : public mojo::internal::EnumHashImpl<::ml::model_loader::mojom::ModelFormat> {};

template <>
struct hash<::ml::model_loader::mojom::DevicePreference>
    : public mojo::internal::EnumHashImpl<::ml::model_loader::mojom::DevicePreference> {};

template <>
struct hash<::ml::model_loader::mojom::DataType>
    : public mojo::internal::EnumHashImpl<::ml::model_loader::mojom::DataType> {};

template <>
struct hash<::ml::model_loader::mojom::LoadModelResult>
    : public mojo::internal::EnumHashImpl<::ml::model_loader::mojom::LoadModelResult> {};

template <>
struct hash<::ml::model_loader::mojom::CreateModelLoaderResult>
    : public mojo::internal::EnumHashImpl<::ml::model_loader::mojom::CreateModelLoaderResult> {};

template <>
struct hash<::ml::model_loader::mojom::ComputeResult>
    : public mojo::internal::EnumHashImpl<::ml::model_loader::mojom::ComputeResult> {};

}  // namespace std

namespace mojo {


namespace internal {

Serializer< ::ml::model_loader::mojom::ModelFormat, MaybeConstUserType>;

}  // namespace internal


namespace internal {

Serializer< ::ml::model_loader::mojom::DevicePreference, MaybeConstUserType>;

}  // namespace internal


namespace internal {

Serializer< ::ml::model_loader::mojom::DataType, MaybeConstUserType>;

}  // namespace internal


namespace internal {

Serializer< ::ml::model_loader::mojom::LoadModelResult, MaybeConstUserType>;

}  // namespace internal


namespace internal {

Serializer< ::ml::model_loader::mojom::CreateModelLoaderResult, MaybeConstUserType>;

}  // namespace internal


namespace internal {

Serializer< ::ml::model_loader::mojom::ComputeResult, MaybeConstUserType>;

}  // namespace internal


namespace internal {

Serializer< ::ml::model_loader::mojom::CreateModelLoaderOptionsDataView, MaybeConstUserType>;

}  // namespace internal


namespace internal {

Serializer< ::ml::model_loader::mojom::TensorInfoDataView, MaybeConstUserType>;

}  // namespace internal


namespace internal {

Serializer< ::ml::model_loader::mojom::ModelInfoDataView, MaybeConstUserType>;

}  // namespace internal

}  // namespace mojo


namespace ml::model_loader::mojom {



inline void TensorInfoDataView::GetDimensionsDataView(
    mojo::ArrayDataView<uint32_t>* output) {}


inline void ModelInfoDataView::GetInputTensorInfoDataView(
    mojo::MapDataView<mojo::StringDataView, TensorInfoDataView>* output) {}
inline void ModelInfoDataView::GetOutputTensorInfoDataView(
    mojo::MapDataView<mojo::StringDataView, TensorInfoDataView>* output) {}



}  // ml::model_loader::mojom

// Declare TraceFormatTraits for enums, which should be defined in ::perfetto
// namespace.

namespace perfetto {

template <>
struct  TraceFormatTraits<::ml::model_loader::mojom::ModelFormat> {};

} // namespace perfetto

namespace perfetto {

template <>
struct  TraceFormatTraits<::ml::model_loader::mojom::DevicePreference> {};

} // namespace perfetto

namespace perfetto {

template <>
struct  TraceFormatTraits<::ml::model_loader::mojom::DataType> {};

} // namespace perfetto

namespace perfetto {

template <>
struct  TraceFormatTraits<::ml::model_loader::mojom::LoadModelResult> {};

} // namespace perfetto

namespace perfetto {

template <>
struct  TraceFormatTraits<::ml::model_loader::mojom::CreateModelLoaderResult> {};

} // namespace perfetto

namespace perfetto {

template <>
struct  TraceFormatTraits<::ml::model_loader::mojom::ComputeResult> {};

} // namespace perfetto

#endif  // COMPONENTS_ML_MOJOM_WEB_PLATFORM_MODEL_MOJOM_SHARED_H_