{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}
{-# OPTIONS_GHC -Wno-unused-imports#-}
{-# OPTIONS_GHC -Wno-duplicate-exports#-}
{-# OPTIONS_GHC -Wno-dodgy-exports#-}
module Proto.Tensorflow.Core.Framework.KernelDef (
KernelDef(), KernelDef'AttrConstraint(), KernelList()
) where
import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism
import qualified Data.ProtoLens.Runtime.Prelude as Prelude
import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int
import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid
import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word
import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types
import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2
import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked
import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text
import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map
import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString
import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8
import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding
import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector
import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic
import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed
import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read
import qualified Proto.Tensorflow.Core.Framework.AttrValue
data KernelDef
= KernelDef'_constructor {KernelDef -> Text
_KernelDef'op :: !Data.Text.Text,
KernelDef -> Text
_KernelDef'deviceType :: !Data.Text.Text,
KernelDef -> Vector KernelDef'AttrConstraint
_KernelDef'constraint :: !(Data.Vector.Vector KernelDef'AttrConstraint),
KernelDef -> Vector Text
_KernelDef'hostMemoryArg :: !(Data.Vector.Vector Data.Text.Text),
KernelDef -> Text
_KernelDef'label :: !Data.Text.Text,
KernelDef -> Int32
_KernelDef'priority :: !Data.Int.Int32,
KernelDef -> FieldSet
_KernelDef'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (KernelDef -> KernelDef -> Bool
(KernelDef -> KernelDef -> Bool)
-> (KernelDef -> KernelDef -> Bool) -> Eq KernelDef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KernelDef -> KernelDef -> Bool
$c/= :: KernelDef -> KernelDef -> Bool
== :: KernelDef -> KernelDef -> Bool
$c== :: KernelDef -> KernelDef -> Bool
Prelude.Eq, Eq KernelDef
Eq KernelDef =>
(KernelDef -> KernelDef -> Ordering)
-> (KernelDef -> KernelDef -> Bool)
-> (KernelDef -> KernelDef -> Bool)
-> (KernelDef -> KernelDef -> Bool)
-> (KernelDef -> KernelDef -> Bool)
-> (KernelDef -> KernelDef -> KernelDef)
-> (KernelDef -> KernelDef -> KernelDef)
-> Ord KernelDef
KernelDef -> KernelDef -> Bool
KernelDef -> KernelDef -> Ordering
KernelDef -> KernelDef -> KernelDef
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: KernelDef -> KernelDef -> KernelDef
$cmin :: KernelDef -> KernelDef -> KernelDef
max :: KernelDef -> KernelDef -> KernelDef
$cmax :: KernelDef -> KernelDef -> KernelDef
>= :: KernelDef -> KernelDef -> Bool
$c>= :: KernelDef -> KernelDef -> Bool
> :: KernelDef -> KernelDef -> Bool
$c> :: KernelDef -> KernelDef -> Bool
<= :: KernelDef -> KernelDef -> Bool
$c<= :: KernelDef -> KernelDef -> Bool
< :: KernelDef -> KernelDef -> Bool
$c< :: KernelDef -> KernelDef -> Bool
compare :: KernelDef -> KernelDef -> Ordering
$ccompare :: KernelDef -> KernelDef -> Ordering
$cp1Ord :: Eq KernelDef
Prelude.Ord)
instance Prelude.Show KernelDef where
showsPrec :: Int -> KernelDef -> ShowS
showsPrec _ __x :: KernelDef
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(KernelDef -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort KernelDef
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField KernelDef "op" Data.Text.Text where
fieldOf :: Proxy# "op" -> (Text -> f Text) -> KernelDef -> f KernelDef
fieldOf _
= ((Text -> f Text) -> KernelDef -> f KernelDef)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> KernelDef
-> f KernelDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelDef -> Text)
-> (KernelDef -> Text -> KernelDef)
-> Lens KernelDef KernelDef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef -> Text
_KernelDef'op (\ x__ :: KernelDef
x__ y__ :: Text
y__ -> KernelDef
x__ {_KernelDef'op :: Text
_KernelDef'op = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField KernelDef "deviceType" Data.Text.Text where
fieldOf :: Proxy# "deviceType" -> (Text -> f Text) -> KernelDef -> f KernelDef
fieldOf _
= ((Text -> f Text) -> KernelDef -> f KernelDef)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> KernelDef
-> f KernelDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelDef -> Text)
-> (KernelDef -> Text -> KernelDef)
-> Lens KernelDef KernelDef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef -> Text
_KernelDef'deviceType
(\ x__ :: KernelDef
x__ y__ :: Text
y__ -> KernelDef
x__ {_KernelDef'deviceType :: Text
_KernelDef'deviceType = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField KernelDef "constraint" [KernelDef'AttrConstraint] where
fieldOf :: Proxy# "constraint"
-> ([KernelDef'AttrConstraint] -> f [KernelDef'AttrConstraint])
-> KernelDef
-> f KernelDef
fieldOf _
= ((Vector KernelDef'AttrConstraint
-> f (Vector KernelDef'AttrConstraint))
-> KernelDef -> f KernelDef)
-> (([KernelDef'AttrConstraint] -> f [KernelDef'AttrConstraint])
-> Vector KernelDef'AttrConstraint
-> f (Vector KernelDef'AttrConstraint))
-> ([KernelDef'AttrConstraint] -> f [KernelDef'AttrConstraint])
-> KernelDef
-> f KernelDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelDef -> Vector KernelDef'AttrConstraint)
-> (KernelDef -> Vector KernelDef'AttrConstraint -> KernelDef)
-> Lens
KernelDef
KernelDef
(Vector KernelDef'AttrConstraint)
(Vector KernelDef'AttrConstraint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef -> Vector KernelDef'AttrConstraint
_KernelDef'constraint
(\ x__ :: KernelDef
x__ y__ :: Vector KernelDef'AttrConstraint
y__ -> KernelDef
x__ {_KernelDef'constraint :: Vector KernelDef'AttrConstraint
_KernelDef'constraint = Vector KernelDef'AttrConstraint
y__}))
((Vector KernelDef'AttrConstraint -> [KernelDef'AttrConstraint])
-> (Vector KernelDef'AttrConstraint
-> [KernelDef'AttrConstraint] -> Vector KernelDef'AttrConstraint)
-> Lens
(Vector KernelDef'AttrConstraint)
(Vector KernelDef'AttrConstraint)
[KernelDef'AttrConstraint]
[KernelDef'AttrConstraint]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector KernelDef'AttrConstraint -> [KernelDef'AttrConstraint]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [KernelDef'AttrConstraint]
y__ -> [KernelDef'AttrConstraint] -> Vector KernelDef'AttrConstraint
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [KernelDef'AttrConstraint]
y__))
instance Data.ProtoLens.Field.HasField KernelDef "vec'constraint" (Data.Vector.Vector KernelDef'AttrConstraint) where
fieldOf :: Proxy# "vec'constraint"
-> (Vector KernelDef'AttrConstraint
-> f (Vector KernelDef'AttrConstraint))
-> KernelDef
-> f KernelDef
fieldOf _
= ((Vector KernelDef'AttrConstraint
-> f (Vector KernelDef'AttrConstraint))
-> KernelDef -> f KernelDef)
-> ((Vector KernelDef'AttrConstraint
-> f (Vector KernelDef'AttrConstraint))
-> Vector KernelDef'AttrConstraint
-> f (Vector KernelDef'AttrConstraint))
-> (Vector KernelDef'AttrConstraint
-> f (Vector KernelDef'AttrConstraint))
-> KernelDef
-> f KernelDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelDef -> Vector KernelDef'AttrConstraint)
-> (KernelDef -> Vector KernelDef'AttrConstraint -> KernelDef)
-> Lens
KernelDef
KernelDef
(Vector KernelDef'AttrConstraint)
(Vector KernelDef'AttrConstraint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef -> Vector KernelDef'AttrConstraint
_KernelDef'constraint
(\ x__ :: KernelDef
x__ y__ :: Vector KernelDef'AttrConstraint
y__ -> KernelDef
x__ {_KernelDef'constraint :: Vector KernelDef'AttrConstraint
_KernelDef'constraint = Vector KernelDef'AttrConstraint
y__}))
(Vector KernelDef'AttrConstraint
-> f (Vector KernelDef'AttrConstraint))
-> Vector KernelDef'AttrConstraint
-> f (Vector KernelDef'AttrConstraint)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField KernelDef "hostMemoryArg" [Data.Text.Text] where
fieldOf :: Proxy# "hostMemoryArg"
-> ([Text] -> f [Text]) -> KernelDef -> f KernelDef
fieldOf _
= ((Vector Text -> f (Vector Text)) -> KernelDef -> f KernelDef)
-> (([Text] -> f [Text]) -> Vector Text -> f (Vector Text))
-> ([Text] -> f [Text])
-> KernelDef
-> f KernelDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelDef -> Vector Text)
-> (KernelDef -> Vector Text -> KernelDef)
-> Lens KernelDef KernelDef (Vector Text) (Vector Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef -> Vector Text
_KernelDef'hostMemoryArg
(\ x__ :: KernelDef
x__ y__ :: Vector Text
y__ -> KernelDef
x__ {_KernelDef'hostMemoryArg :: Vector Text
_KernelDef'hostMemoryArg = Vector Text
y__}))
((Vector Text -> [Text])
-> (Vector Text -> [Text] -> Vector Text)
-> Lens (Vector Text) (Vector Text) [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector Text -> [Text]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [Text]
y__ -> [Text] -> Vector Text
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Text]
y__))
instance Data.ProtoLens.Field.HasField KernelDef "vec'hostMemoryArg" (Data.Vector.Vector Data.Text.Text) where
fieldOf :: Proxy# "vec'hostMemoryArg"
-> (Vector Text -> f (Vector Text)) -> KernelDef -> f KernelDef
fieldOf _
= ((Vector Text -> f (Vector Text)) -> KernelDef -> f KernelDef)
-> ((Vector Text -> f (Vector Text))
-> Vector Text -> f (Vector Text))
-> (Vector Text -> f (Vector Text))
-> KernelDef
-> f KernelDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelDef -> Vector Text)
-> (KernelDef -> Vector Text -> KernelDef)
-> Lens KernelDef KernelDef (Vector Text) (Vector Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef -> Vector Text
_KernelDef'hostMemoryArg
(\ x__ :: KernelDef
x__ y__ :: Vector Text
y__ -> KernelDef
x__ {_KernelDef'hostMemoryArg :: Vector Text
_KernelDef'hostMemoryArg = Vector Text
y__}))
(Vector Text -> f (Vector Text)) -> Vector Text -> f (Vector Text)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField KernelDef "label" Data.Text.Text where
fieldOf :: Proxy# "label" -> (Text -> f Text) -> KernelDef -> f KernelDef
fieldOf _
= ((Text -> f Text) -> KernelDef -> f KernelDef)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> KernelDef
-> f KernelDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelDef -> Text)
-> (KernelDef -> Text -> KernelDef)
-> Lens KernelDef KernelDef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef -> Text
_KernelDef'label (\ x__ :: KernelDef
x__ y__ :: Text
y__ -> KernelDef
x__ {_KernelDef'label :: Text
_KernelDef'label = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField KernelDef "priority" Data.Int.Int32 where
fieldOf :: Proxy# "priority" -> (Int32 -> f Int32) -> KernelDef -> f KernelDef
fieldOf _
= ((Int32 -> f Int32) -> KernelDef -> f KernelDef)
-> ((Int32 -> f Int32) -> Int32 -> f Int32)
-> (Int32 -> f Int32)
-> KernelDef
-> f KernelDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelDef -> Int32)
-> (KernelDef -> Int32 -> KernelDef)
-> Lens KernelDef KernelDef Int32 Int32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef -> Int32
_KernelDef'priority (\ x__ :: KernelDef
x__ y__ :: Int32
y__ -> KernelDef
x__ {_KernelDef'priority :: Int32
_KernelDef'priority = Int32
y__}))
(Int32 -> f Int32) -> Int32 -> f Int32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message KernelDef where
messageName :: Proxy KernelDef -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.KernelDef"
packedMessageDescriptor :: Proxy KernelDef -> ByteString
packedMessageDescriptor _
= "\n\
\\tKernelDef\DC2\SO\n\
\\STXop\CAN\SOH \SOH(\tR\STXop\DC2\US\n\
\\vdevice_type\CAN\STX \SOH(\tR\n\
\deviceType\DC2D\n\
\\n\
\constraint\CAN\ETX \ETX(\v2$.tensorflow.KernelDef.AttrConstraintR\n\
\constraint\DC2&\n\
\\SIhost_memory_arg\CAN\EOT \ETX(\tR\rhostMemoryArg\DC2\DC4\n\
\\ENQlabel\CAN\ENQ \SOH(\tR\ENQlabel\DC2\SUB\n\
\\bpriority\CAN\ACK \SOH(\ENQR\bpriority\SUBb\n\
\\SOAttrConstraint\DC2\DC2\n\
\\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2<\n\
\\SOallowed_values\CAN\STX \SOH(\v2\NAK.tensorflow.AttrValueR\rallowedValues"
packedFileDescriptor :: Proxy KernelDef -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor KernelDef)
fieldsByTag
= let
op__field_descriptor :: FieldDescriptor KernelDef
op__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor KernelDef Text
-> FieldDescriptor KernelDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"op"
(ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
(WireDefault Text
-> Lens KernelDef KernelDef Text Text
-> FieldAccessor KernelDef Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "op" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"op")) ::
Data.ProtoLens.FieldDescriptor KernelDef
deviceType__field_descriptor :: FieldDescriptor KernelDef
deviceType__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor KernelDef Text
-> FieldDescriptor KernelDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"device_type"
(ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
(WireDefault Text
-> Lens KernelDef KernelDef Text Text
-> FieldAccessor KernelDef Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "deviceType" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"deviceType")) ::
Data.ProtoLens.FieldDescriptor KernelDef
constraint__field_descriptor :: FieldDescriptor KernelDef
constraint__field_descriptor
= String
-> FieldTypeDescriptor KernelDef'AttrConstraint
-> FieldAccessor KernelDef KernelDef'AttrConstraint
-> FieldDescriptor KernelDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"constraint"
(MessageOrGroup -> FieldTypeDescriptor KernelDef'AttrConstraint
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor KernelDef'AttrConstraint)
(Packing
-> Lens' KernelDef [KernelDef'AttrConstraint]
-> FieldAccessor KernelDef KernelDef'AttrConstraint
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked
(forall s a (f :: * -> *).
(HasField s "constraint" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"constraint")) ::
Data.ProtoLens.FieldDescriptor KernelDef
hostMemoryArg__field_descriptor :: FieldDescriptor KernelDef
hostMemoryArg__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor KernelDef Text
-> FieldDescriptor KernelDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"host_memory_arg"
(ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
(Packing -> Lens' KernelDef [Text] -> FieldAccessor KernelDef Text
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked
(forall s a (f :: * -> *).
(HasField s "hostMemoryArg" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"hostMemoryArg")) ::
Data.ProtoLens.FieldDescriptor KernelDef
label__field_descriptor :: FieldDescriptor KernelDef
label__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor KernelDef Text
-> FieldDescriptor KernelDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"label"
(ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
(WireDefault Text
-> Lens KernelDef KernelDef Text Text
-> FieldAccessor KernelDef Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "label" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"label")) ::
Data.ProtoLens.FieldDescriptor KernelDef
priority__field_descriptor :: FieldDescriptor KernelDef
priority__field_descriptor
= String
-> FieldTypeDescriptor Int32
-> FieldAccessor KernelDef Int32
-> FieldDescriptor KernelDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"priority"
(ScalarField Int32 -> FieldTypeDescriptor Int32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int32
Data.ProtoLens.Int32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
(WireDefault Int32
-> Lens KernelDef KernelDef Int32 Int32
-> FieldAccessor KernelDef Int32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "priority" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"priority")) ::
Data.ProtoLens.FieldDescriptor KernelDef
in
[(Tag, FieldDescriptor KernelDef)]
-> Map Tag (FieldDescriptor KernelDef)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor KernelDef
op__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor KernelDef
deviceType__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor KernelDef
constraint__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor KernelDef
hostMemoryArg__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor KernelDef
label__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 6, FieldDescriptor KernelDef
priority__field_descriptor)]
unknownFields :: LensLike' f KernelDef FieldSet
unknownFields
= (KernelDef -> FieldSet)
-> (KernelDef -> FieldSet -> KernelDef) -> Lens' KernelDef FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef -> FieldSet
_KernelDef'_unknownFields
(\ x__ :: KernelDef
x__ y__ :: FieldSet
y__ -> KernelDef
x__ {_KernelDef'_unknownFields :: FieldSet
_KernelDef'_unknownFields = FieldSet
y__})
defMessage :: KernelDef
defMessage
= $WKernelDef'_constructor :: Text
-> Text
-> Vector KernelDef'AttrConstraint
-> Vector Text
-> Text
-> Int32
-> FieldSet
-> KernelDef
KernelDef'_constructor
{_KernelDef'op :: Text
_KernelDef'op = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_KernelDef'deviceType :: Text
_KernelDef'deviceType = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_KernelDef'constraint :: Vector KernelDef'AttrConstraint
_KernelDef'constraint = Vector KernelDef'AttrConstraint
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_KernelDef'hostMemoryArg :: Vector Text
_KernelDef'hostMemoryArg = Vector Text
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_KernelDef'label :: Text
_KernelDef'label = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_KernelDef'priority :: Int32
_KernelDef'priority = Int32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_KernelDef'_unknownFields :: FieldSet
_KernelDef'_unknownFields = []}
parseMessage :: Parser KernelDef
parseMessage
= let
loop ::
KernelDef
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld KernelDef'AttrConstraint
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Text.Text
-> Data.ProtoLens.Encoding.Bytes.Parser KernelDef
loop :: KernelDef
-> Growing Vector RealWorld KernelDef'AttrConstraint
-> Growing Vector RealWorld Text
-> Parser KernelDef
loop x :: KernelDef
x mutable'constraint :: Growing Vector RealWorld KernelDef'AttrConstraint
mutable'constraint mutable'hostMemoryArg :: Growing Vector RealWorld Text
mutable'hostMemoryArg
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector KernelDef'AttrConstraint
frozen'constraint <- IO (Vector KernelDef'AttrConstraint)
-> Parser (Vector KernelDef'AttrConstraint)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) KernelDef'AttrConstraint
-> IO (Vector KernelDef'AttrConstraint)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze
Growing Vector RealWorld KernelDef'AttrConstraint
Growing Vector (PrimState IO) KernelDef'AttrConstraint
mutable'constraint)
Vector Text
frozen'hostMemoryArg <- IO (Vector Text) -> Parser (Vector Text)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Text -> IO (Vector Text)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze
Growing Vector RealWorld Text
Growing Vector (PrimState IO) Text
mutable'hostMemoryArg)
(let missing :: [a]
missing = []
in
if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
() -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
else
String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
(String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
"Missing required fields: "
([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
KernelDef -> Parser KernelDef
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter KernelDef KernelDef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> KernelDef -> KernelDef
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
forall msg. Message msg => Lens' msg FieldSet
Setter KernelDef KernelDef FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
KernelDef
KernelDef
(Vector KernelDef'AttrConstraint)
(Vector KernelDef'AttrConstraint)
-> Vector KernelDef'AttrConstraint -> KernelDef -> KernelDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'constraint" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'constraint")
Vector KernelDef'AttrConstraint
frozen'constraint
(Setter KernelDef KernelDef (Vector Text) (Vector Text)
-> Vector Text -> KernelDef -> KernelDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'hostMemoryArg" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'hostMemoryArg")
Vector Text
frozen'hostMemoryArg
KernelDef
x)))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
(case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
(Prelude.Left err :: UnicodeException
err)
-> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
(Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
"op"
KernelDef
-> Growing Vector RealWorld KernelDef'AttrConstraint
-> Growing Vector RealWorld Text
-> Parser KernelDef
loop
(Setter KernelDef KernelDef Text Text
-> Text -> KernelDef -> KernelDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "op" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"op") Text
y KernelDef
x)
Growing Vector RealWorld KernelDef'AttrConstraint
mutable'constraint
Growing Vector RealWorld Text
mutable'hostMemoryArg
18
-> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
(case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
(Prelude.Left err :: UnicodeException
err)
-> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
(Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
"device_type"
KernelDef
-> Growing Vector RealWorld KernelDef'AttrConstraint
-> Growing Vector RealWorld Text
-> Parser KernelDef
loop
(Setter KernelDef KernelDef Text Text
-> Text -> KernelDef -> KernelDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "deviceType" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"deviceType") Text
y KernelDef
x)
Growing Vector RealWorld KernelDef'AttrConstraint
mutable'constraint
Growing Vector RealWorld Text
mutable'hostMemoryArg
26
-> do !KernelDef'AttrConstraint
y <- Parser KernelDef'AttrConstraint
-> String -> Parser KernelDef'AttrConstraint
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int
-> Parser KernelDef'AttrConstraint
-> Parser KernelDef'AttrConstraint
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Parser KernelDef'AttrConstraint
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"constraint"
Growing Vector RealWorld KernelDef'AttrConstraint
v <- IO (Growing Vector RealWorld KernelDef'AttrConstraint)
-> Parser (Growing Vector RealWorld KernelDef'AttrConstraint)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) KernelDef'AttrConstraint
-> KernelDef'AttrConstraint
-> IO (Growing Vector (PrimState IO) KernelDef'AttrConstraint)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append Growing Vector RealWorld KernelDef'AttrConstraint
Growing Vector (PrimState IO) KernelDef'AttrConstraint
mutable'constraint KernelDef'AttrConstraint
y)
KernelDef
-> Growing Vector RealWorld KernelDef'AttrConstraint
-> Growing Vector RealWorld Text
-> Parser KernelDef
loop KernelDef
x Growing Vector RealWorld KernelDef'AttrConstraint
v Growing Vector RealWorld Text
mutable'hostMemoryArg
34
-> do !Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
(case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
(Prelude.Left err :: UnicodeException
err)
-> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
(Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
"host_memory_arg"
Growing Vector RealWorld Text
v <- IO (Growing Vector RealWorld Text)
-> Parser (Growing Vector RealWorld Text)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Text
-> Text -> IO (Growing Vector (PrimState IO) Text)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append
Growing Vector RealWorld Text
Growing Vector (PrimState IO) Text
mutable'hostMemoryArg Text
y)
KernelDef
-> Growing Vector RealWorld KernelDef'AttrConstraint
-> Growing Vector RealWorld Text
-> Parser KernelDef
loop KernelDef
x Growing Vector RealWorld KernelDef'AttrConstraint
mutable'constraint Growing Vector RealWorld Text
v
42
-> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
(case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
(Prelude.Left err :: UnicodeException
err)
-> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
(Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
"label"
KernelDef
-> Growing Vector RealWorld KernelDef'AttrConstraint
-> Growing Vector RealWorld Text
-> Parser KernelDef
loop
(Setter KernelDef KernelDef Text Text
-> Text -> KernelDef -> KernelDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "label" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"label") Text
y KernelDef
x)
Growing Vector RealWorld KernelDef'AttrConstraint
mutable'constraint
Growing Vector RealWorld Text
mutable'hostMemoryArg
48
-> do Int32
y <- Parser Int32 -> String -> Parser Int32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int32) -> Parser Word64 -> Parser Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"priority"
KernelDef
-> Growing Vector RealWorld KernelDef'AttrConstraint
-> Growing Vector RealWorld Text
-> Parser KernelDef
loop
(Setter KernelDef KernelDef Int32 Int32
-> Int32 -> KernelDef -> KernelDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "priority" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"priority") Int32
y KernelDef
x)
Growing Vector RealWorld KernelDef'AttrConstraint
mutable'constraint
Growing Vector RealWorld Text
mutable'hostMemoryArg
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
KernelDef
-> Growing Vector RealWorld KernelDef'AttrConstraint
-> Growing Vector RealWorld Text
-> Parser KernelDef
loop
(Setter KernelDef KernelDef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> KernelDef -> KernelDef
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
forall msg. Message msg => Lens' msg FieldSet
Setter KernelDef KernelDef FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) KernelDef
x)
Growing Vector RealWorld KernelDef'AttrConstraint
mutable'constraint
Growing Vector RealWorld Text
mutable'hostMemoryArg
in
Parser KernelDef -> String -> Parser KernelDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld KernelDef'AttrConstraint
mutable'constraint <- IO (Growing Vector RealWorld KernelDef'AttrConstraint)
-> Parser (Growing Vector RealWorld KernelDef'AttrConstraint)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld KernelDef'AttrConstraint)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
Growing Vector RealWorld Text
mutable'hostMemoryArg <- IO (Growing Vector RealWorld Text)
-> Parser (Growing Vector RealWorld Text)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld Text)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
KernelDef
-> Growing Vector RealWorld KernelDef'AttrConstraint
-> Growing Vector RealWorld Text
-> Parser KernelDef
loop
KernelDef
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld KernelDef'AttrConstraint
mutable'constraint Growing Vector RealWorld Text
mutable'hostMemoryArg)
"KernelDef"
buildMessage :: KernelDef -> Builder
buildMessage
= \ _x :: KernelDef
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text KernelDef KernelDef Text Text -> KernelDef -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "op" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"op") KernelDef
_x
in
if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
Text -> ByteString
Data.Text.Encoding.encodeUtf8
Text
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v
= FoldLike Text KernelDef KernelDef Text Text -> KernelDef -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "deviceType" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"deviceType") KernelDef
_x
in
if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
Text -> ByteString
Data.Text.Encoding.encodeUtf8
Text
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((KernelDef'AttrConstraint -> Builder)
-> Vector KernelDef'AttrConstraint -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: KernelDef'AttrConstraint
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
((ByteString -> Builder)
-> (KernelDef'AttrConstraint -> ByteString)
-> KernelDef'AttrConstraint
-> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
KernelDef'AttrConstraint -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
KernelDef'AttrConstraint
_v))
(FoldLike
(Vector KernelDef'AttrConstraint)
KernelDef
KernelDef
(Vector KernelDef'AttrConstraint)
(Vector KernelDef'AttrConstraint)
-> KernelDef -> Vector KernelDef'AttrConstraint
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "vec'constraint" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'constraint") KernelDef
_x))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((Text -> Builder) -> Vector Text -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: Text
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 34)
((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
Text -> ByteString
Data.Text.Encoding.encodeUtf8
Text
_v))
(FoldLike
(Vector Text) KernelDef KernelDef (Vector Text) (Vector Text)
-> KernelDef -> Vector Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "vec'hostMemoryArg" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'hostMemoryArg") KernelDef
_x))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text KernelDef KernelDef Text Text -> KernelDef -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "label" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"label") KernelDef
_x
in
if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 42)
((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
Text -> ByteString
Data.Text.Encoding.encodeUtf8
Text
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int32
_v = FoldLike Int32 KernelDef KernelDef Int32 Int32
-> KernelDef -> Int32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "priority" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"priority") KernelDef
_x
in
if Int32 -> Int32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int32
_v Int32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 48)
((Word64 -> Builder) -> (Int32 -> Word64) -> Int32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
Int32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Int32
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet KernelDef KernelDef FieldSet FieldSet
-> KernelDef -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet KernelDef KernelDef FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields KernelDef
_x)))))))
instance Control.DeepSeq.NFData KernelDef where
rnf :: KernelDef -> ()
rnf
= \ x__ :: KernelDef
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(KernelDef -> FieldSet
_KernelDef'_unknownFields KernelDef
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(KernelDef -> Text
_KernelDef'op KernelDef
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(KernelDef -> Text
_KernelDef'deviceType KernelDef
x__)
(Vector KernelDef'AttrConstraint -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(KernelDef -> Vector KernelDef'AttrConstraint
_KernelDef'constraint KernelDef
x__)
(Vector Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(KernelDef -> Vector Text
_KernelDef'hostMemoryArg KernelDef
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(KernelDef -> Text
_KernelDef'label KernelDef
x__)
(Int32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (KernelDef -> Int32
_KernelDef'priority KernelDef
x__) ()))))))
data KernelDef'AttrConstraint
= KernelDef'AttrConstraint'_constructor {KernelDef'AttrConstraint -> Text
_KernelDef'AttrConstraint'name :: !Data.Text.Text,
KernelDef'AttrConstraint -> Maybe AttrValue
_KernelDef'AttrConstraint'allowedValues :: !(Prelude.Maybe Proto.Tensorflow.Core.Framework.AttrValue.AttrValue),
KernelDef'AttrConstraint -> FieldSet
_KernelDef'AttrConstraint'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
(KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool)
-> (KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool)
-> Eq KernelDef'AttrConstraint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
$c/= :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
== :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
$c== :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
Prelude.Eq, Eq KernelDef'AttrConstraint
Eq KernelDef'AttrConstraint =>
(KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Ordering)
-> (KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool)
-> (KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool)
-> (KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool)
-> (KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool)
-> (KernelDef'AttrConstraint
-> KernelDef'AttrConstraint -> KernelDef'AttrConstraint)
-> (KernelDef'AttrConstraint
-> KernelDef'AttrConstraint -> KernelDef'AttrConstraint)
-> Ord KernelDef'AttrConstraint
KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Ordering
KernelDef'AttrConstraint
-> KernelDef'AttrConstraint -> KernelDef'AttrConstraint
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: KernelDef'AttrConstraint
-> KernelDef'AttrConstraint -> KernelDef'AttrConstraint
$cmin :: KernelDef'AttrConstraint
-> KernelDef'AttrConstraint -> KernelDef'AttrConstraint
max :: KernelDef'AttrConstraint
-> KernelDef'AttrConstraint -> KernelDef'AttrConstraint
$cmax :: KernelDef'AttrConstraint
-> KernelDef'AttrConstraint -> KernelDef'AttrConstraint
>= :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
$c>= :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
> :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
$c> :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
<= :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
$c<= :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
< :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
$c< :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Bool
compare :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Ordering
$ccompare :: KernelDef'AttrConstraint -> KernelDef'AttrConstraint -> Ordering
$cp1Ord :: Eq KernelDef'AttrConstraint
Prelude.Ord)
instance Prelude.Show KernelDef'AttrConstraint where
showsPrec :: Int -> KernelDef'AttrConstraint -> ShowS
showsPrec _ __x :: KernelDef'AttrConstraint
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(KernelDef'AttrConstraint -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort KernelDef'AttrConstraint
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField KernelDef'AttrConstraint "name" Data.Text.Text where
fieldOf :: Proxy# "name"
-> (Text -> f Text)
-> KernelDef'AttrConstraint
-> f KernelDef'AttrConstraint
fieldOf _
= ((Text -> f Text)
-> KernelDef'AttrConstraint -> f KernelDef'AttrConstraint)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> KernelDef'AttrConstraint
-> f KernelDef'AttrConstraint
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelDef'AttrConstraint -> Text)
-> (KernelDef'AttrConstraint -> Text -> KernelDef'AttrConstraint)
-> Lens KernelDef'AttrConstraint KernelDef'AttrConstraint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef'AttrConstraint -> Text
_KernelDef'AttrConstraint'name
(\ x__ :: KernelDef'AttrConstraint
x__ y__ :: Text
y__ -> KernelDef'AttrConstraint
x__ {_KernelDef'AttrConstraint'name :: Text
_KernelDef'AttrConstraint'name = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField KernelDef'AttrConstraint "allowedValues" Proto.Tensorflow.Core.Framework.AttrValue.AttrValue where
fieldOf :: Proxy# "allowedValues"
-> (AttrValue -> f AttrValue)
-> KernelDef'AttrConstraint
-> f KernelDef'AttrConstraint
fieldOf _
= ((Maybe AttrValue -> f (Maybe AttrValue))
-> KernelDef'AttrConstraint -> f KernelDef'AttrConstraint)
-> ((AttrValue -> f AttrValue)
-> Maybe AttrValue -> f (Maybe AttrValue))
-> (AttrValue -> f AttrValue)
-> KernelDef'AttrConstraint
-> f KernelDef'AttrConstraint
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelDef'AttrConstraint -> Maybe AttrValue)
-> (KernelDef'AttrConstraint
-> Maybe AttrValue -> KernelDef'AttrConstraint)
-> Lens
KernelDef'AttrConstraint
KernelDef'AttrConstraint
(Maybe AttrValue)
(Maybe AttrValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef'AttrConstraint -> Maybe AttrValue
_KernelDef'AttrConstraint'allowedValues
(\ x__ :: KernelDef'AttrConstraint
x__ y__ :: Maybe AttrValue
y__ -> KernelDef'AttrConstraint
x__ {_KernelDef'AttrConstraint'allowedValues :: Maybe AttrValue
_KernelDef'AttrConstraint'allowedValues = Maybe AttrValue
y__}))
(AttrValue -> Lens' (Maybe AttrValue) AttrValue
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens AttrValue
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField KernelDef'AttrConstraint "maybe'allowedValues" (Prelude.Maybe Proto.Tensorflow.Core.Framework.AttrValue.AttrValue) where
fieldOf :: Proxy# "maybe'allowedValues"
-> (Maybe AttrValue -> f (Maybe AttrValue))
-> KernelDef'AttrConstraint
-> f KernelDef'AttrConstraint
fieldOf _
= ((Maybe AttrValue -> f (Maybe AttrValue))
-> KernelDef'AttrConstraint -> f KernelDef'AttrConstraint)
-> ((Maybe AttrValue -> f (Maybe AttrValue))
-> Maybe AttrValue -> f (Maybe AttrValue))
-> (Maybe AttrValue -> f (Maybe AttrValue))
-> KernelDef'AttrConstraint
-> f KernelDef'AttrConstraint
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelDef'AttrConstraint -> Maybe AttrValue)
-> (KernelDef'AttrConstraint
-> Maybe AttrValue -> KernelDef'AttrConstraint)
-> Lens
KernelDef'AttrConstraint
KernelDef'AttrConstraint
(Maybe AttrValue)
(Maybe AttrValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef'AttrConstraint -> Maybe AttrValue
_KernelDef'AttrConstraint'allowedValues
(\ x__ :: KernelDef'AttrConstraint
x__ y__ :: Maybe AttrValue
y__ -> KernelDef'AttrConstraint
x__ {_KernelDef'AttrConstraint'allowedValues :: Maybe AttrValue
_KernelDef'AttrConstraint'allowedValues = Maybe AttrValue
y__}))
(Maybe AttrValue -> f (Maybe AttrValue))
-> Maybe AttrValue -> f (Maybe AttrValue)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message KernelDef'AttrConstraint where
messageName :: Proxy KernelDef'AttrConstraint -> Text
messageName _
= String -> Text
Data.Text.pack "tensorflow.KernelDef.AttrConstraint"
packedMessageDescriptor :: Proxy KernelDef'AttrConstraint -> ByteString
packedMessageDescriptor _
= "\n\
\\SOAttrConstraint\DC2\DC2\n\
\\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2<\n\
\\SOallowed_values\CAN\STX \SOH(\v2\NAK.tensorflow.AttrValueR\rallowedValues"
packedFileDescriptor :: Proxy KernelDef'AttrConstraint -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor KernelDef'AttrConstraint)
fieldsByTag
= let
name__field_descriptor :: FieldDescriptor KernelDef'AttrConstraint
name__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor KernelDef'AttrConstraint Text
-> FieldDescriptor KernelDef'AttrConstraint
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"name"
(ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
(WireDefault Text
-> Lens KernelDef'AttrConstraint KernelDef'AttrConstraint Text Text
-> FieldAccessor KernelDef'AttrConstraint Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "name" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"name")) ::
Data.ProtoLens.FieldDescriptor KernelDef'AttrConstraint
allowedValues__field_descriptor :: FieldDescriptor KernelDef'AttrConstraint
allowedValues__field_descriptor
= String
-> FieldTypeDescriptor AttrValue
-> FieldAccessor KernelDef'AttrConstraint AttrValue
-> FieldDescriptor KernelDef'AttrConstraint
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"allowed_values"
(MessageOrGroup -> FieldTypeDescriptor AttrValue
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.AttrValue.AttrValue)
(Lens
KernelDef'AttrConstraint
KernelDef'AttrConstraint
(Maybe AttrValue)
(Maybe AttrValue)
-> FieldAccessor KernelDef'AttrConstraint AttrValue
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'allowedValues" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'allowedValues")) ::
Data.ProtoLens.FieldDescriptor KernelDef'AttrConstraint
in
[(Tag, FieldDescriptor KernelDef'AttrConstraint)]
-> Map Tag (FieldDescriptor KernelDef'AttrConstraint)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor KernelDef'AttrConstraint
name__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor KernelDef'AttrConstraint
allowedValues__field_descriptor)]
unknownFields :: LensLike' f KernelDef'AttrConstraint FieldSet
unknownFields
= (KernelDef'AttrConstraint -> FieldSet)
-> (KernelDef'AttrConstraint
-> FieldSet -> KernelDef'AttrConstraint)
-> Lens' KernelDef'AttrConstraint FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelDef'AttrConstraint -> FieldSet
_KernelDef'AttrConstraint'_unknownFields
(\ x__ :: KernelDef'AttrConstraint
x__ y__ :: FieldSet
y__ -> KernelDef'AttrConstraint
x__ {_KernelDef'AttrConstraint'_unknownFields :: FieldSet
_KernelDef'AttrConstraint'_unknownFields = FieldSet
y__})
defMessage :: KernelDef'AttrConstraint
defMessage
= $WKernelDef'AttrConstraint'_constructor :: Text -> Maybe AttrValue -> FieldSet -> KernelDef'AttrConstraint
KernelDef'AttrConstraint'_constructor
{_KernelDef'AttrConstraint'name :: Text
_KernelDef'AttrConstraint'name = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_KernelDef'AttrConstraint'allowedValues :: Maybe AttrValue
_KernelDef'AttrConstraint'allowedValues = Maybe AttrValue
forall a. Maybe a
Prelude.Nothing,
_KernelDef'AttrConstraint'_unknownFields :: FieldSet
_KernelDef'AttrConstraint'_unknownFields = []}
parseMessage :: Parser KernelDef'AttrConstraint
parseMessage
= let
loop ::
KernelDef'AttrConstraint
-> Data.ProtoLens.Encoding.Bytes.Parser KernelDef'AttrConstraint
loop :: KernelDef'AttrConstraint -> Parser KernelDef'AttrConstraint
loop x :: KernelDef'AttrConstraint
x
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do (let missing :: [a]
missing = []
in
if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
() -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
else
String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
(String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
"Missing required fields: "
([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
KernelDef'AttrConstraint -> Parser KernelDef'AttrConstraint
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter
KernelDef'AttrConstraint KernelDef'AttrConstraint FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> KernelDef'AttrConstraint
-> KernelDef'AttrConstraint
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
forall msg. Message msg => Lens' msg FieldSet
Setter
KernelDef'AttrConstraint KernelDef'AttrConstraint FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) KernelDef'AttrConstraint
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
(case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
(Prelude.Left err :: UnicodeException
err)
-> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
(Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
"name"
KernelDef'AttrConstraint -> Parser KernelDef'AttrConstraint
loop (Setter KernelDef'AttrConstraint KernelDef'AttrConstraint Text Text
-> Text -> KernelDef'AttrConstraint -> KernelDef'AttrConstraint
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "name" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"name") Text
y KernelDef'AttrConstraint
x)
18
-> do AttrValue
y <- Parser AttrValue -> String -> Parser AttrValue
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser AttrValue -> Parser AttrValue
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser AttrValue
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"allowed_values"
KernelDef'AttrConstraint -> Parser KernelDef'AttrConstraint
loop
(Setter
KernelDef'AttrConstraint
KernelDef'AttrConstraint
AttrValue
AttrValue
-> AttrValue
-> KernelDef'AttrConstraint
-> KernelDef'AttrConstraint
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "allowedValues" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"allowedValues") AttrValue
y KernelDef'AttrConstraint
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
KernelDef'AttrConstraint -> Parser KernelDef'AttrConstraint
loop
(Setter
KernelDef'AttrConstraint KernelDef'AttrConstraint FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> KernelDef'AttrConstraint
-> KernelDef'AttrConstraint
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
forall msg. Message msg => Lens' msg FieldSet
Setter
KernelDef'AttrConstraint KernelDef'AttrConstraint FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) KernelDef'AttrConstraint
x)
in
Parser KernelDef'AttrConstraint
-> String -> Parser KernelDef'AttrConstraint
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do KernelDef'AttrConstraint -> Parser KernelDef'AttrConstraint
loop KernelDef'AttrConstraint
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "AttrConstraint"
buildMessage :: KernelDef'AttrConstraint -> Builder
buildMessage
= \ _x :: KernelDef'AttrConstraint
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike
Text KernelDef'AttrConstraint KernelDef'AttrConstraint Text Text
-> KernelDef'AttrConstraint -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "name" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"name") KernelDef'AttrConstraint
_x
in
if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
Text -> ByteString
Data.Text.Encoding.encodeUtf8
Text
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe AttrValue)
KernelDef'AttrConstraint
KernelDef'AttrConstraint
(Maybe AttrValue)
(Maybe AttrValue)
-> KernelDef'AttrConstraint -> Maybe AttrValue
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'allowedValues" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'allowedValues") KernelDef'AttrConstraint
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: AttrValue
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (AttrValue -> ByteString) -> AttrValue -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
AttrValue -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
AttrValue
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet
KernelDef'AttrConstraint
KernelDef'AttrConstraint
FieldSet
FieldSet
-> KernelDef'AttrConstraint -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet
KernelDef'AttrConstraint
KernelDef'AttrConstraint
FieldSet
FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields KernelDef'AttrConstraint
_x)))
instance Control.DeepSeq.NFData KernelDef'AttrConstraint where
rnf :: KernelDef'AttrConstraint -> ()
rnf
= \ x__ :: KernelDef'AttrConstraint
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(KernelDef'AttrConstraint -> FieldSet
_KernelDef'AttrConstraint'_unknownFields KernelDef'AttrConstraint
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(KernelDef'AttrConstraint -> Text
_KernelDef'AttrConstraint'name KernelDef'AttrConstraint
x__)
(Maybe AttrValue -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(KernelDef'AttrConstraint -> Maybe AttrValue
_KernelDef'AttrConstraint'allowedValues KernelDef'AttrConstraint
x__) ()))
data KernelList
= KernelList'_constructor {KernelList -> Vector KernelDef
_KernelList'kernel :: !(Data.Vector.Vector KernelDef),
KernelList -> FieldSet
_KernelList'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (KernelList -> KernelList -> Bool
(KernelList -> KernelList -> Bool)
-> (KernelList -> KernelList -> Bool) -> Eq KernelList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KernelList -> KernelList -> Bool
$c/= :: KernelList -> KernelList -> Bool
== :: KernelList -> KernelList -> Bool
$c== :: KernelList -> KernelList -> Bool
Prelude.Eq, Eq KernelList
Eq KernelList =>
(KernelList -> KernelList -> Ordering)
-> (KernelList -> KernelList -> Bool)
-> (KernelList -> KernelList -> Bool)
-> (KernelList -> KernelList -> Bool)
-> (KernelList -> KernelList -> Bool)
-> (KernelList -> KernelList -> KernelList)
-> (KernelList -> KernelList -> KernelList)
-> Ord KernelList
KernelList -> KernelList -> Bool
KernelList -> KernelList -> Ordering
KernelList -> KernelList -> KernelList
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: KernelList -> KernelList -> KernelList
$cmin :: KernelList -> KernelList -> KernelList
max :: KernelList -> KernelList -> KernelList
$cmax :: KernelList -> KernelList -> KernelList
>= :: KernelList -> KernelList -> Bool
$c>= :: KernelList -> KernelList -> Bool
> :: KernelList -> KernelList -> Bool
$c> :: KernelList -> KernelList -> Bool
<= :: KernelList -> KernelList -> Bool
$c<= :: KernelList -> KernelList -> Bool
< :: KernelList -> KernelList -> Bool
$c< :: KernelList -> KernelList -> Bool
compare :: KernelList -> KernelList -> Ordering
$ccompare :: KernelList -> KernelList -> Ordering
$cp1Ord :: Eq KernelList
Prelude.Ord)
instance Prelude.Show KernelList where
showsPrec :: Int -> KernelList -> ShowS
showsPrec _ __x :: KernelList
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(KernelList -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort KernelList
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField KernelList "kernel" [KernelDef] where
fieldOf :: Proxy# "kernel"
-> ([KernelDef] -> f [KernelDef]) -> KernelList -> f KernelList
fieldOf _
= ((Vector KernelDef -> f (Vector KernelDef))
-> KernelList -> f KernelList)
-> (([KernelDef] -> f [KernelDef])
-> Vector KernelDef -> f (Vector KernelDef))
-> ([KernelDef] -> f [KernelDef])
-> KernelList
-> f KernelList
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelList -> Vector KernelDef)
-> (KernelList -> Vector KernelDef -> KernelList)
-> Lens KernelList KernelList (Vector KernelDef) (Vector KernelDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelList -> Vector KernelDef
_KernelList'kernel (\ x__ :: KernelList
x__ y__ :: Vector KernelDef
y__ -> KernelList
x__ {_KernelList'kernel :: Vector KernelDef
_KernelList'kernel = Vector KernelDef
y__}))
((Vector KernelDef -> [KernelDef])
-> (Vector KernelDef -> [KernelDef] -> Vector KernelDef)
-> Lens
(Vector KernelDef) (Vector KernelDef) [KernelDef] [KernelDef]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector KernelDef -> [KernelDef]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [KernelDef]
y__ -> [KernelDef] -> Vector KernelDef
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [KernelDef]
y__))
instance Data.ProtoLens.Field.HasField KernelList "vec'kernel" (Data.Vector.Vector KernelDef) where
fieldOf :: Proxy# "vec'kernel"
-> (Vector KernelDef -> f (Vector KernelDef))
-> KernelList
-> f KernelList
fieldOf _
= ((Vector KernelDef -> f (Vector KernelDef))
-> KernelList -> f KernelList)
-> ((Vector KernelDef -> f (Vector KernelDef))
-> Vector KernelDef -> f (Vector KernelDef))
-> (Vector KernelDef -> f (Vector KernelDef))
-> KernelList
-> f KernelList
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((KernelList -> Vector KernelDef)
-> (KernelList -> Vector KernelDef -> KernelList)
-> Lens KernelList KernelList (Vector KernelDef) (Vector KernelDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelList -> Vector KernelDef
_KernelList'kernel (\ x__ :: KernelList
x__ y__ :: Vector KernelDef
y__ -> KernelList
x__ {_KernelList'kernel :: Vector KernelDef
_KernelList'kernel = Vector KernelDef
y__}))
(Vector KernelDef -> f (Vector KernelDef))
-> Vector KernelDef -> f (Vector KernelDef)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message KernelList where
messageName :: Proxy KernelList -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.KernelList"
packedMessageDescriptor :: Proxy KernelList -> ByteString
packedMessageDescriptor _
= "\n\
\\n\
\KernelList\DC2-\n\
\\ACKkernel\CAN\SOH \ETX(\v2\NAK.tensorflow.KernelDefR\ACKkernel"
packedFileDescriptor :: Proxy KernelList -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor KernelList)
fieldsByTag
= let
kernel__field_descriptor :: FieldDescriptor KernelList
kernel__field_descriptor
= String
-> FieldTypeDescriptor KernelDef
-> FieldAccessor KernelList KernelDef
-> FieldDescriptor KernelList
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"kernel"
(MessageOrGroup -> FieldTypeDescriptor KernelDef
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor KernelDef)
(Packing
-> Lens' KernelList [KernelDef]
-> FieldAccessor KernelList KernelDef
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "kernel" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"kernel")) ::
Data.ProtoLens.FieldDescriptor KernelList
in
[(Tag, FieldDescriptor KernelList)]
-> Map Tag (FieldDescriptor KernelList)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor KernelList
kernel__field_descriptor)]
unknownFields :: LensLike' f KernelList FieldSet
unknownFields
= (KernelList -> FieldSet)
-> (KernelList -> FieldSet -> KernelList)
-> Lens' KernelList FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
KernelList -> FieldSet
_KernelList'_unknownFields
(\ x__ :: KernelList
x__ y__ :: FieldSet
y__ -> KernelList
x__ {_KernelList'_unknownFields :: FieldSet
_KernelList'_unknownFields = FieldSet
y__})
defMessage :: KernelList
defMessage
= $WKernelList'_constructor :: Vector KernelDef -> FieldSet -> KernelList
KernelList'_constructor
{_KernelList'kernel :: Vector KernelDef
_KernelList'kernel = Vector KernelDef
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_KernelList'_unknownFields :: FieldSet
_KernelList'_unknownFields = []}
parseMessage :: Parser KernelList
parseMessage
= let
loop ::
KernelList
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld KernelDef
-> Data.ProtoLens.Encoding.Bytes.Parser KernelList
loop :: KernelList
-> Growing Vector RealWorld KernelDef -> Parser KernelList
loop x :: KernelList
x mutable'kernel :: Growing Vector RealWorld KernelDef
mutable'kernel
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector KernelDef
frozen'kernel <- IO (Vector KernelDef) -> Parser (Vector KernelDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) KernelDef -> IO (Vector KernelDef)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze
Growing Vector RealWorld KernelDef
Growing Vector (PrimState IO) KernelDef
mutable'kernel)
(let missing :: [a]
missing = []
in
if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
() -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
else
String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
(String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
"Missing required fields: "
([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
KernelList -> Parser KernelList
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter KernelList KernelList FieldSet FieldSet
-> (FieldSet -> FieldSet) -> KernelList -> KernelList
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
forall msg. Message msg => Lens' msg FieldSet
Setter KernelList KernelList FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter KernelList KernelList (Vector KernelDef) (Vector KernelDef)
-> Vector KernelDef -> KernelList -> KernelList
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'kernel" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'kernel") Vector KernelDef
frozen'kernel KernelList
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do !KernelDef
y <- Parser KernelDef -> String -> Parser KernelDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser KernelDef -> Parser KernelDef
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Parser KernelDef
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"kernel"
Growing Vector RealWorld KernelDef
v <- IO (Growing Vector RealWorld KernelDef)
-> Parser (Growing Vector RealWorld KernelDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) KernelDef
-> KernelDef -> IO (Growing Vector (PrimState IO) KernelDef)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append Growing Vector RealWorld KernelDef
Growing Vector (PrimState IO) KernelDef
mutable'kernel KernelDef
y)
KernelList
-> Growing Vector RealWorld KernelDef -> Parser KernelList
loop KernelList
x Growing Vector RealWorld KernelDef
v
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
KernelList
-> Growing Vector RealWorld KernelDef -> Parser KernelList
loop
(Setter KernelList KernelList FieldSet FieldSet
-> (FieldSet -> FieldSet) -> KernelList -> KernelList
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
forall msg. Message msg => Lens' msg FieldSet
Setter KernelList KernelList FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) KernelList
x)
Growing Vector RealWorld KernelDef
mutable'kernel
in
Parser KernelList -> String -> Parser KernelList
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld KernelDef
mutable'kernel <- IO (Growing Vector RealWorld KernelDef)
-> Parser (Growing Vector RealWorld KernelDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld KernelDef)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
KernelList
-> Growing Vector RealWorld KernelDef -> Parser KernelList
loop KernelList
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld KernelDef
mutable'kernel)
"KernelList"
buildMessage :: KernelList -> Builder
buildMessage
= \ _x :: KernelList
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((KernelDef -> Builder) -> Vector KernelDef -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: KernelDef
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (KernelDef -> ByteString) -> KernelDef -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
KernelDef -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
KernelDef
_v))
(FoldLike
(Vector KernelDef)
KernelList
KernelList
(Vector KernelDef)
(Vector KernelDef)
-> KernelList -> Vector KernelDef
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'kernel" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'kernel") KernelList
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet KernelList KernelList FieldSet FieldSet
-> KernelList -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet KernelList KernelList FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields KernelList
_x))
instance Control.DeepSeq.NFData KernelList where
rnf :: KernelList -> ()
rnf
= \ x__ :: KernelList
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(KernelList -> FieldSet
_KernelList'_unknownFields KernelList
x__)
(Vector KernelDef -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (KernelList -> Vector KernelDef
_KernelList'kernel KernelList
x__) ())
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
= "\n\
\*tensorflow/core/framework/kernel_def.proto\DC2\n\
\tensorflow\SUB*tensorflow/core/framework/attr_value.proto\"\192\STX\n\
\\tKernelDef\DC2\SO\n\
\\STXop\CAN\SOH \SOH(\tR\STXop\DC2\US\n\
\\vdevice_type\CAN\STX \SOH(\tR\n\
\deviceType\DC2D\n\
\\n\
\constraint\CAN\ETX \ETX(\v2$.tensorflow.KernelDef.AttrConstraintR\n\
\constraint\DC2&\n\
\\SIhost_memory_arg\CAN\EOT \ETX(\tR\rhostMemoryArg\DC2\DC4\n\
\\ENQlabel\CAN\ENQ \SOH(\tR\ENQlabel\DC2\SUB\n\
\\bpriority\CAN\ACK \SOH(\ENQR\bpriority\SUBb\n\
\\SOAttrConstraint\DC2\DC2\n\
\\EOTname\CAN\SOH \SOH(\tR\EOTname\DC2<\n\
\\SOallowed_values\CAN\STX \SOH(\v2\NAK.tensorflow.AttrValueR\rallowedValues\";\n\
\\n\
\KernelList\DC2-\n\
\\ACKkernel\CAN\SOH \ETX(\v2\NAK.tensorflow.KernelDefR\ACKkernelB\131\SOH\n\
\\CANorg.tensorflow.frameworkB\SIKernelDefProtosP\SOHZQgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/kernel_def_go_proto\248\SOH\SOHJ\211\v\n\
\\ACK\DC2\EOT\NUL\NUL/\SOH\n\
\\b\n\
\\SOH\f\DC2\ETX\NUL\NUL\DC2\n\
\\b\n\
\\SOH\STX\DC2\ETX\STX\NUL\DC3\n\
\\t\n\
\\STX\ETX\NUL\DC2\ETX\EOT\NUL4\n\
\\b\n\
\\SOH\b\DC2\ETX\ACK\NUL\US\n\
\\t\n\
\\STX\b\US\DC2\ETX\ACK\NUL\US\n\
\\b\n\
\\SOH\b\DC2\ETX\a\NUL0\n\
\\t\n\
\\STX\b\b\DC2\ETX\a\NUL0\n\
\\b\n\
\\SOH\b\DC2\ETX\b\NUL\"\n\
\\t\n\
\\STX\b\n\
\\DC2\ETX\b\NUL\"\n\
\\b\n\
\\SOH\b\DC2\ETX\t\NUL1\n\
\\t\n\
\\STX\b\SOH\DC2\ETX\t\NUL1\n\
\\b\n\
\\SOH\b\DC2\ETX\n\
\\NULh\n\
\\t\n\
\\STX\b\v\DC2\ETX\n\
\\NULh\n\
\\n\
\\n\
\\STX\EOT\NUL\DC2\EOT\f\NUL*\SOH\n\
\\n\
\\n\
\\ETX\EOT\NUL\SOH\DC2\ETX\f\b\DC1\n\
\,\n\
\\EOT\EOT\NUL\STX\NUL\DC2\ETX\SO\STX\DLE\SUB\US Must match the name of an Op.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\SO\STX\b\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\SO\t\v\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\SO\SO\SI\n\
\2\n\
\\EOT\EOT\NUL\STX\SOH\DC2\ETX\DC1\STX\EM\SUB% Type of device this kernel runs on.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\DC1\STX\b\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\DC1\t\DC4\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\DC1\ETB\CAN\n\
\\f\n\
\\EOT\EOT\NUL\ETX\NUL\DC2\EOT\DC3\STX\SUB\ETX\n\
\\f\n\
\\ENQ\EOT\NUL\ETX\NUL\SOH\DC2\ETX\DC3\n\
\\CAN\n\
\-\n\
\\ACK\EOT\NUL\ETX\NUL\STX\NUL\DC2\ETX\NAK\EOT\DC4\SUB\RS Name of an attr from the Op.\n\
\\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\NUL\ENQ\DC2\ETX\NAK\EOT\n\
\\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\NUL\SOH\DC2\ETX\NAK\v\SI\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\NUL\ETX\DC2\ETX\NAK\DC2\DC3\n\
\\146\SOH\n\
\\ACK\EOT\NUL\ETX\NUL\STX\SOH\DC2\ETX\EM\EOT!\SUB\130\SOH A list of values that this kernel supports for this attr.\n\
\ Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.\n\
\\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\SOH\ACK\DC2\ETX\EM\EOT\r\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\SOH\SOH\DC2\ETX\EM\SO\FS\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\SOH\ETX\DC2\ETX\EM\US \n\
\\v\n\
\\EOT\EOT\NUL\STX\STX\DC2\ETX\ESC\STX)\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\EOT\DC2\ETX\ESC\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\ACK\DC2\ETX\ESC\v\EM\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\SOH\DC2\ETX\ESC\SUB$\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX\ESC'(\n\
\i\n\
\\EOT\EOT\NUL\STX\ETX\DC2\ETX\US\STX&\SUB\\ Names of the Op's input_/output_args that reside in host memory\n\
\ instead of device memory.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ETX\EOT\DC2\ETX\US\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ETX\ENQ\DC2\ETX\US\v\DC1\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ETX\SOH\DC2\ETX\US\DC2!\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ETX\ETX\DC2\ETX\US$%\n\
\\165\SOH\n\
\\EOT\EOT\NUL\STX\EOT\DC2\ETX$\STX\DC3\SUB\151\SOH This allows experimental kernels to be registered for an op that\n\
\ won't be used unless the user specifies a \"_kernel\" attr with\n\
\ value matching this.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\EOT\ENQ\DC2\ETX$\STX\b\n\
\\f\n\
\\ENQ\EOT\NUL\STX\EOT\SOH\DC2\ETX$\t\SO\n\
\\f\n\
\\ENQ\EOT\NUL\STX\EOT\ETX\DC2\ETX$\DC1\DC2\n\
\\211\SOH\n\
\\EOT\EOT\NUL\STX\ENQ\DC2\ETX)\STX\NAK\SUB\197\SOH Prioritization of kernel amongst different devices. By default we assume\n\
\ priority is 0. The higher the priority the better. By default (i.e. if\n\
\ this is not set), we prefer GPU kernels over CPU.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ENQ\ENQ\DC2\ETX)\STX\a\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ENQ\SOH\DC2\ETX)\b\DLE\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ENQ\ETX\DC2\ETX)\DC3\DC4\n\
\(\n\
\\STX\EOT\SOH\DC2\EOT-\NUL/\SOH\SUB\FS A collection of KernelDefs\n\
\\n\
\\n\
\\n\
\\ETX\EOT\SOH\SOH\DC2\ETX-\b\DC2\n\
\\v\n\
\\EOT\EOT\SOH\STX\NUL\DC2\ETX.\STX \n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\EOT\DC2\ETX.\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\ACK\DC2\ETX.\v\DC4\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX.\NAK\ESC\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX.\RS\USb\ACKproto3"