{-# 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.TensorSlice (
TensorSliceProto(), TensorSliceProto'Extent(),
TensorSliceProto'Extent'HasLength(..),
_TensorSliceProto'Extent'Length
) 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
data TensorSliceProto
= TensorSliceProto'_constructor {TensorSliceProto -> Vector TensorSliceProto'Extent
_TensorSliceProto'extent :: !(Data.Vector.Vector TensorSliceProto'Extent),
TensorSliceProto -> FieldSet
_TensorSliceProto'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (TensorSliceProto -> TensorSliceProto -> Bool
(TensorSliceProto -> TensorSliceProto -> Bool)
-> (TensorSliceProto -> TensorSliceProto -> Bool)
-> Eq TensorSliceProto
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TensorSliceProto -> TensorSliceProto -> Bool
$c/= :: TensorSliceProto -> TensorSliceProto -> Bool
== :: TensorSliceProto -> TensorSliceProto -> Bool
$c== :: TensorSliceProto -> TensorSliceProto -> Bool
Prelude.Eq, Eq TensorSliceProto
Eq TensorSliceProto =>
(TensorSliceProto -> TensorSliceProto -> Ordering)
-> (TensorSliceProto -> TensorSliceProto -> Bool)
-> (TensorSliceProto -> TensorSliceProto -> Bool)
-> (TensorSliceProto -> TensorSliceProto -> Bool)
-> (TensorSliceProto -> TensorSliceProto -> Bool)
-> (TensorSliceProto -> TensorSliceProto -> TensorSliceProto)
-> (TensorSliceProto -> TensorSliceProto -> TensorSliceProto)
-> Ord TensorSliceProto
TensorSliceProto -> TensorSliceProto -> Bool
TensorSliceProto -> TensorSliceProto -> Ordering
TensorSliceProto -> TensorSliceProto -> TensorSliceProto
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 :: TensorSliceProto -> TensorSliceProto -> TensorSliceProto
$cmin :: TensorSliceProto -> TensorSliceProto -> TensorSliceProto
max :: TensorSliceProto -> TensorSliceProto -> TensorSliceProto
$cmax :: TensorSliceProto -> TensorSliceProto -> TensorSliceProto
>= :: TensorSliceProto -> TensorSliceProto -> Bool
$c>= :: TensorSliceProto -> TensorSliceProto -> Bool
> :: TensorSliceProto -> TensorSliceProto -> Bool
$c> :: TensorSliceProto -> TensorSliceProto -> Bool
<= :: TensorSliceProto -> TensorSliceProto -> Bool
$c<= :: TensorSliceProto -> TensorSliceProto -> Bool
< :: TensorSliceProto -> TensorSliceProto -> Bool
$c< :: TensorSliceProto -> TensorSliceProto -> Bool
compare :: TensorSliceProto -> TensorSliceProto -> Ordering
$ccompare :: TensorSliceProto -> TensorSliceProto -> Ordering
$cp1Ord :: Eq TensorSliceProto
Prelude.Ord)
instance Prelude.Show TensorSliceProto where
showsPrec :: Int -> TensorSliceProto -> ShowS
showsPrec _ __x :: TensorSliceProto
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(TensorSliceProto -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort TensorSliceProto
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField TensorSliceProto "extent" [TensorSliceProto'Extent] where
fieldOf :: Proxy# "extent"
-> ([TensorSliceProto'Extent] -> f [TensorSliceProto'Extent])
-> TensorSliceProto
-> f TensorSliceProto
fieldOf _
= ((Vector TensorSliceProto'Extent
-> f (Vector TensorSliceProto'Extent))
-> TensorSliceProto -> f TensorSliceProto)
-> (([TensorSliceProto'Extent] -> f [TensorSliceProto'Extent])
-> Vector TensorSliceProto'Extent
-> f (Vector TensorSliceProto'Extent))
-> ([TensorSliceProto'Extent] -> f [TensorSliceProto'Extent])
-> TensorSliceProto
-> f TensorSliceProto
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((TensorSliceProto -> Vector TensorSliceProto'Extent)
-> (TensorSliceProto
-> Vector TensorSliceProto'Extent -> TensorSliceProto)
-> Lens
TensorSliceProto
TensorSliceProto
(Vector TensorSliceProto'Extent)
(Vector TensorSliceProto'Extent)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TensorSliceProto -> Vector TensorSliceProto'Extent
_TensorSliceProto'extent
(\ x__ :: TensorSliceProto
x__ y__ :: Vector TensorSliceProto'Extent
y__ -> TensorSliceProto
x__ {_TensorSliceProto'extent :: Vector TensorSliceProto'Extent
_TensorSliceProto'extent = Vector TensorSliceProto'Extent
y__}))
((Vector TensorSliceProto'Extent -> [TensorSliceProto'Extent])
-> (Vector TensorSliceProto'Extent
-> [TensorSliceProto'Extent] -> Vector TensorSliceProto'Extent)
-> Lens
(Vector TensorSliceProto'Extent)
(Vector TensorSliceProto'Extent)
[TensorSliceProto'Extent]
[TensorSliceProto'Extent]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector TensorSliceProto'Extent -> [TensorSliceProto'Extent]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [TensorSliceProto'Extent]
y__ -> [TensorSliceProto'Extent] -> Vector TensorSliceProto'Extent
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [TensorSliceProto'Extent]
y__))
instance Data.ProtoLens.Field.HasField TensorSliceProto "vec'extent" (Data.Vector.Vector TensorSliceProto'Extent) where
fieldOf :: Proxy# "vec'extent"
-> (Vector TensorSliceProto'Extent
-> f (Vector TensorSliceProto'Extent))
-> TensorSliceProto
-> f TensorSliceProto
fieldOf _
= ((Vector TensorSliceProto'Extent
-> f (Vector TensorSliceProto'Extent))
-> TensorSliceProto -> f TensorSliceProto)
-> ((Vector TensorSliceProto'Extent
-> f (Vector TensorSliceProto'Extent))
-> Vector TensorSliceProto'Extent
-> f (Vector TensorSliceProto'Extent))
-> (Vector TensorSliceProto'Extent
-> f (Vector TensorSliceProto'Extent))
-> TensorSliceProto
-> f TensorSliceProto
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((TensorSliceProto -> Vector TensorSliceProto'Extent)
-> (TensorSliceProto
-> Vector TensorSliceProto'Extent -> TensorSliceProto)
-> Lens
TensorSliceProto
TensorSliceProto
(Vector TensorSliceProto'Extent)
(Vector TensorSliceProto'Extent)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TensorSliceProto -> Vector TensorSliceProto'Extent
_TensorSliceProto'extent
(\ x__ :: TensorSliceProto
x__ y__ :: Vector TensorSliceProto'Extent
y__ -> TensorSliceProto
x__ {_TensorSliceProto'extent :: Vector TensorSliceProto'Extent
_TensorSliceProto'extent = Vector TensorSliceProto'Extent
y__}))
(Vector TensorSliceProto'Extent
-> f (Vector TensorSliceProto'Extent))
-> Vector TensorSliceProto'Extent
-> f (Vector TensorSliceProto'Extent)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message TensorSliceProto where
messageName :: Proxy TensorSliceProto -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.TensorSliceProto"
packedMessageDescriptor :: Proxy TensorSliceProto -> ByteString
packedMessageDescriptor _
= "\n\
\\DLETensorSliceProto\DC2;\n\
\\ACKextent\CAN\SOH \ETX(\v2#.tensorflow.TensorSliceProto.ExtentR\ACKextent\SUBF\n\
\\ACKExtent\DC2\DC4\n\
\\ENQstart\CAN\SOH \SOH(\ETXR\ENQstart\DC2\CAN\n\
\\ACKlength\CAN\STX \SOH(\ETXH\NULR\ACKlengthB\f\n\
\\n\
\has_length"
packedFileDescriptor :: Proxy TensorSliceProto -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor TensorSliceProto)
fieldsByTag
= let
extent__field_descriptor :: FieldDescriptor TensorSliceProto
extent__field_descriptor
= String
-> FieldTypeDescriptor TensorSliceProto'Extent
-> FieldAccessor TensorSliceProto TensorSliceProto'Extent
-> FieldDescriptor TensorSliceProto
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"extent"
(MessageOrGroup -> FieldTypeDescriptor TensorSliceProto'Extent
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor TensorSliceProto'Extent)
(Packing
-> Lens' TensorSliceProto [TensorSliceProto'Extent]
-> FieldAccessor TensorSliceProto TensorSliceProto'Extent
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "extent" 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 @"extent")) ::
Data.ProtoLens.FieldDescriptor TensorSliceProto
in
[(Tag, FieldDescriptor TensorSliceProto)]
-> Map Tag (FieldDescriptor TensorSliceProto)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor TensorSliceProto
extent__field_descriptor)]
unknownFields :: LensLike' f TensorSliceProto FieldSet
unknownFields
= (TensorSliceProto -> FieldSet)
-> (TensorSliceProto -> FieldSet -> TensorSliceProto)
-> Lens' TensorSliceProto FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TensorSliceProto -> FieldSet
_TensorSliceProto'_unknownFields
(\ x__ :: TensorSliceProto
x__ y__ :: FieldSet
y__ -> TensorSliceProto
x__ {_TensorSliceProto'_unknownFields :: FieldSet
_TensorSliceProto'_unknownFields = FieldSet
y__})
defMessage :: TensorSliceProto
defMessage
= $WTensorSliceProto'_constructor :: Vector TensorSliceProto'Extent -> FieldSet -> TensorSliceProto
TensorSliceProto'_constructor
{_TensorSliceProto'extent :: Vector TensorSliceProto'Extent
_TensorSliceProto'extent = Vector TensorSliceProto'Extent
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_TensorSliceProto'_unknownFields :: FieldSet
_TensorSliceProto'_unknownFields = []}
parseMessage :: Parser TensorSliceProto
parseMessage
= let
loop ::
TensorSliceProto
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld TensorSliceProto'Extent
-> Data.ProtoLens.Encoding.Bytes.Parser TensorSliceProto
loop :: TensorSliceProto
-> Growing Vector RealWorld TensorSliceProto'Extent
-> Parser TensorSliceProto
loop x :: TensorSliceProto
x mutable'extent :: Growing Vector RealWorld TensorSliceProto'Extent
mutable'extent
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector TensorSliceProto'Extent
frozen'extent <- IO (Vector TensorSliceProto'Extent)
-> Parser (Vector TensorSliceProto'Extent)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) TensorSliceProto'Extent
-> IO (Vector TensorSliceProto'Extent)
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 TensorSliceProto'Extent
Growing Vector (PrimState IO) TensorSliceProto'Extent
mutable'extent)
(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]))))
TensorSliceProto -> Parser TensorSliceProto
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter TensorSliceProto TensorSliceProto FieldSet FieldSet
-> (FieldSet -> FieldSet) -> TensorSliceProto -> TensorSliceProto
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 TensorSliceProto TensorSliceProto FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
TensorSliceProto
TensorSliceProto
(Vector TensorSliceProto'Extent)
(Vector TensorSliceProto'Extent)
-> Vector TensorSliceProto'Extent
-> TensorSliceProto
-> TensorSliceProto
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'extent" 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'extent") Vector TensorSliceProto'Extent
frozen'extent TensorSliceProto
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do !TensorSliceProto'Extent
y <- Parser TensorSliceProto'Extent
-> String -> Parser TensorSliceProto'Extent
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int
-> Parser TensorSliceProto'Extent -> Parser TensorSliceProto'Extent
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 TensorSliceProto'Extent
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"extent"
Growing Vector RealWorld TensorSliceProto'Extent
v <- IO (Growing Vector RealWorld TensorSliceProto'Extent)
-> Parser (Growing Vector RealWorld TensorSliceProto'Extent)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) TensorSliceProto'Extent
-> TensorSliceProto'Extent
-> IO (Growing Vector (PrimState IO) TensorSliceProto'Extent)
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 TensorSliceProto'Extent
Growing Vector (PrimState IO) TensorSliceProto'Extent
mutable'extent TensorSliceProto'Extent
y)
TensorSliceProto
-> Growing Vector RealWorld TensorSliceProto'Extent
-> Parser TensorSliceProto
loop TensorSliceProto
x Growing Vector RealWorld TensorSliceProto'Extent
v
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
TensorSliceProto
-> Growing Vector RealWorld TensorSliceProto'Extent
-> Parser TensorSliceProto
loop
(Setter TensorSliceProto TensorSliceProto FieldSet FieldSet
-> (FieldSet -> FieldSet) -> TensorSliceProto -> TensorSliceProto
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 TensorSliceProto TensorSliceProto FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) TensorSliceProto
x)
Growing Vector RealWorld TensorSliceProto'Extent
mutable'extent
in
Parser TensorSliceProto -> String -> Parser TensorSliceProto
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld TensorSliceProto'Extent
mutable'extent <- IO (Growing Vector RealWorld TensorSliceProto'Extent)
-> Parser (Growing Vector RealWorld TensorSliceProto'Extent)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld TensorSliceProto'Extent)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
TensorSliceProto
-> Growing Vector RealWorld TensorSliceProto'Extent
-> Parser TensorSliceProto
loop TensorSliceProto
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld TensorSliceProto'Extent
mutable'extent)
"TensorSliceProto"
buildMessage :: TensorSliceProto -> Builder
buildMessage
= \ _x :: TensorSliceProto
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((TensorSliceProto'Extent -> Builder)
-> Vector TensorSliceProto'Extent -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: TensorSliceProto'Extent
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (TensorSliceProto'Extent -> ByteString)
-> TensorSliceProto'Extent
-> 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))
TensorSliceProto'Extent -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
TensorSliceProto'Extent
_v))
(FoldLike
(Vector TensorSliceProto'Extent)
TensorSliceProto
TensorSliceProto
(Vector TensorSliceProto'Extent)
(Vector TensorSliceProto'Extent)
-> TensorSliceProto -> Vector TensorSliceProto'Extent
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'extent" 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'extent") TensorSliceProto
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet TensorSliceProto TensorSliceProto FieldSet FieldSet
-> TensorSliceProto -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet TensorSliceProto TensorSliceProto FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields TensorSliceProto
_x))
instance Control.DeepSeq.NFData TensorSliceProto where
rnf :: TensorSliceProto -> ()
rnf
= \ x__ :: TensorSliceProto
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(TensorSliceProto -> FieldSet
_TensorSliceProto'_unknownFields TensorSliceProto
x__)
(Vector TensorSliceProto'Extent -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (TensorSliceProto -> Vector TensorSliceProto'Extent
_TensorSliceProto'extent TensorSliceProto
x__) ())
data TensorSliceProto'Extent
= TensorSliceProto'Extent'_constructor {TensorSliceProto'Extent -> Int64
_TensorSliceProto'Extent'start :: !Data.Int.Int64,
TensorSliceProto'Extent -> Maybe TensorSliceProto'Extent'HasLength
_TensorSliceProto'Extent'hasLength :: !(Prelude.Maybe TensorSliceProto'Extent'HasLength),
TensorSliceProto'Extent -> FieldSet
_TensorSliceProto'Extent'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
(TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool)
-> (TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool)
-> Eq TensorSliceProto'Extent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
$c/= :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
== :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
$c== :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
Prelude.Eq, Eq TensorSliceProto'Extent
Eq TensorSliceProto'Extent =>
(TensorSliceProto'Extent -> TensorSliceProto'Extent -> Ordering)
-> (TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool)
-> (TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool)
-> (TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool)
-> (TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool)
-> (TensorSliceProto'Extent
-> TensorSliceProto'Extent -> TensorSliceProto'Extent)
-> (TensorSliceProto'Extent
-> TensorSliceProto'Extent -> TensorSliceProto'Extent)
-> Ord TensorSliceProto'Extent
TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
TensorSliceProto'Extent -> TensorSliceProto'Extent -> Ordering
TensorSliceProto'Extent
-> TensorSliceProto'Extent -> TensorSliceProto'Extent
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 :: TensorSliceProto'Extent
-> TensorSliceProto'Extent -> TensorSliceProto'Extent
$cmin :: TensorSliceProto'Extent
-> TensorSliceProto'Extent -> TensorSliceProto'Extent
max :: TensorSliceProto'Extent
-> TensorSliceProto'Extent -> TensorSliceProto'Extent
$cmax :: TensorSliceProto'Extent
-> TensorSliceProto'Extent -> TensorSliceProto'Extent
>= :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
$c>= :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
> :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
$c> :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
<= :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
$c<= :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
< :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
$c< :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Bool
compare :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Ordering
$ccompare :: TensorSliceProto'Extent -> TensorSliceProto'Extent -> Ordering
$cp1Ord :: Eq TensorSliceProto'Extent
Prelude.Ord)
instance Prelude.Show TensorSliceProto'Extent where
showsPrec :: Int -> TensorSliceProto'Extent -> ShowS
showsPrec _ __x :: TensorSliceProto'Extent
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(TensorSliceProto'Extent -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort TensorSliceProto'Extent
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
data TensorSliceProto'Extent'HasLength
= TensorSliceProto'Extent'Length !Data.Int.Int64
deriving stock (Int -> TensorSliceProto'Extent'HasLength -> ShowS
[TensorSliceProto'Extent'HasLength] -> ShowS
TensorSliceProto'Extent'HasLength -> String
(Int -> TensorSliceProto'Extent'HasLength -> ShowS)
-> (TensorSliceProto'Extent'HasLength -> String)
-> ([TensorSliceProto'Extent'HasLength] -> ShowS)
-> Show TensorSliceProto'Extent'HasLength
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TensorSliceProto'Extent'HasLength] -> ShowS
$cshowList :: [TensorSliceProto'Extent'HasLength] -> ShowS
show :: TensorSliceProto'Extent'HasLength -> String
$cshow :: TensorSliceProto'Extent'HasLength -> String
showsPrec :: Int -> TensorSliceProto'Extent'HasLength -> ShowS
$cshowsPrec :: Int -> TensorSliceProto'Extent'HasLength -> ShowS
Prelude.Show, TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
(TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool)
-> (TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool)
-> Eq TensorSliceProto'Extent'HasLength
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
$c/= :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
== :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
$c== :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
Prelude.Eq, Eq TensorSliceProto'Extent'HasLength
Eq TensorSliceProto'Extent'HasLength =>
(TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Ordering)
-> (TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool)
-> (TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool)
-> (TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool)
-> (TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool)
-> (TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength)
-> (TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength)
-> Ord TensorSliceProto'Extent'HasLength
TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Ordering
TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
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 :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
$cmin :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
max :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
$cmax :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength
>= :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
$c>= :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
> :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
$c> :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
<= :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
$c<= :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
< :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
$c< :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Bool
compare :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Ordering
$ccompare :: TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent'HasLength -> Ordering
$cp1Ord :: Eq TensorSliceProto'Extent'HasLength
Prelude.Ord)
instance Data.ProtoLens.Field.HasField TensorSliceProto'Extent "start" Data.Int.Int64 where
fieldOf :: Proxy# "start"
-> (Int64 -> f Int64)
-> TensorSliceProto'Extent
-> f TensorSliceProto'Extent
fieldOf _
= ((Int64 -> f Int64)
-> TensorSliceProto'Extent -> f TensorSliceProto'Extent)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> TensorSliceProto'Extent
-> f TensorSliceProto'Extent
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((TensorSliceProto'Extent -> Int64)
-> (TensorSliceProto'Extent -> Int64 -> TensorSliceProto'Extent)
-> Lens TensorSliceProto'Extent TensorSliceProto'Extent Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TensorSliceProto'Extent -> Int64
_TensorSliceProto'Extent'start
(\ x__ :: TensorSliceProto'Extent
x__ y__ :: Int64
y__ -> TensorSliceProto'Extent
x__ {_TensorSliceProto'Extent'start :: Int64
_TensorSliceProto'Extent'start = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField TensorSliceProto'Extent "maybe'hasLength" (Prelude.Maybe TensorSliceProto'Extent'HasLength) where
fieldOf :: Proxy# "maybe'hasLength"
-> (Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength))
-> TensorSliceProto'Extent
-> f TensorSliceProto'Extent
fieldOf _
= ((Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength))
-> TensorSliceProto'Extent -> f TensorSliceProto'Extent)
-> ((Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength))
-> Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength))
-> (Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength))
-> TensorSliceProto'Extent
-> f TensorSliceProto'Extent
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((TensorSliceProto'Extent
-> Maybe TensorSliceProto'Extent'HasLength)
-> (TensorSliceProto'Extent
-> Maybe TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent)
-> Lens
TensorSliceProto'Extent
TensorSliceProto'Extent
(Maybe TensorSliceProto'Extent'HasLength)
(Maybe TensorSliceProto'Extent'HasLength)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TensorSliceProto'Extent -> Maybe TensorSliceProto'Extent'HasLength
_TensorSliceProto'Extent'hasLength
(\ x__ :: TensorSliceProto'Extent
x__ y__ :: Maybe TensorSliceProto'Extent'HasLength
y__ -> TensorSliceProto'Extent
x__ {_TensorSliceProto'Extent'hasLength :: Maybe TensorSliceProto'Extent'HasLength
_TensorSliceProto'Extent'hasLength = Maybe TensorSliceProto'Extent'HasLength
y__}))
(Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength))
-> Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField TensorSliceProto'Extent "maybe'length" (Prelude.Maybe Data.Int.Int64) where
fieldOf :: Proxy# "maybe'length"
-> (Maybe Int64 -> f (Maybe Int64))
-> TensorSliceProto'Extent
-> f TensorSliceProto'Extent
fieldOf _
= ((Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength))
-> TensorSliceProto'Extent -> f TensorSliceProto'Extent)
-> ((Maybe Int64 -> f (Maybe Int64))
-> Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength))
-> (Maybe Int64 -> f (Maybe Int64))
-> TensorSliceProto'Extent
-> f TensorSliceProto'Extent
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((TensorSliceProto'Extent
-> Maybe TensorSliceProto'Extent'HasLength)
-> (TensorSliceProto'Extent
-> Maybe TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent)
-> Lens
TensorSliceProto'Extent
TensorSliceProto'Extent
(Maybe TensorSliceProto'Extent'HasLength)
(Maybe TensorSliceProto'Extent'HasLength)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TensorSliceProto'Extent -> Maybe TensorSliceProto'Extent'HasLength
_TensorSliceProto'Extent'hasLength
(\ x__ :: TensorSliceProto'Extent
x__ y__ :: Maybe TensorSliceProto'Extent'HasLength
y__ -> TensorSliceProto'Extent
x__ {_TensorSliceProto'Extent'hasLength :: Maybe TensorSliceProto'Extent'HasLength
_TensorSliceProto'Extent'hasLength = Maybe TensorSliceProto'Extent'HasLength
y__}))
((Maybe TensorSliceProto'Extent'HasLength -> Maybe Int64)
-> (Maybe TensorSliceProto'Extent'HasLength
-> Maybe Int64 -> Maybe TensorSliceProto'Extent'HasLength)
-> Lens
(Maybe TensorSliceProto'Extent'HasLength)
(Maybe TensorSliceProto'Extent'HasLength)
(Maybe Int64)
(Maybe Int64)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe TensorSliceProto'Extent'HasLength
x__
-> case Maybe TensorSliceProto'Extent'HasLength
x__ of
(Prelude.Just (TensorSliceProto'Extent'Length x__val :: Int64
x__val))
-> Int64 -> Maybe Int64
forall a. a -> Maybe a
Prelude.Just Int64
x__val
_otherwise :: Maybe TensorSliceProto'Extent'HasLength
_otherwise -> Maybe Int64
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe Int64
y__ -> (Int64 -> TensorSliceProto'Extent'HasLength)
-> Maybe Int64 -> Maybe TensorSliceProto'Extent'HasLength
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap Int64 -> TensorSliceProto'Extent'HasLength
TensorSliceProto'Extent'Length Maybe Int64
y__))
instance Data.ProtoLens.Field.HasField TensorSliceProto'Extent "length" Data.Int.Int64 where
fieldOf :: Proxy# "length"
-> (Int64 -> f Int64)
-> TensorSliceProto'Extent
-> f TensorSliceProto'Extent
fieldOf _
= ((Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength))
-> TensorSliceProto'Extent -> f TensorSliceProto'Extent)
-> ((Int64 -> f Int64)
-> Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength))
-> (Int64 -> f Int64)
-> TensorSliceProto'Extent
-> f TensorSliceProto'Extent
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((TensorSliceProto'Extent
-> Maybe TensorSliceProto'Extent'HasLength)
-> (TensorSliceProto'Extent
-> Maybe TensorSliceProto'Extent'HasLength
-> TensorSliceProto'Extent)
-> Lens
TensorSliceProto'Extent
TensorSliceProto'Extent
(Maybe TensorSliceProto'Extent'HasLength)
(Maybe TensorSliceProto'Extent'HasLength)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TensorSliceProto'Extent -> Maybe TensorSliceProto'Extent'HasLength
_TensorSliceProto'Extent'hasLength
(\ x__ :: TensorSliceProto'Extent
x__ y__ :: Maybe TensorSliceProto'Extent'HasLength
y__ -> TensorSliceProto'Extent
x__ {_TensorSliceProto'Extent'hasLength :: Maybe TensorSliceProto'Extent'HasLength
_TensorSliceProto'Extent'hasLength = Maybe TensorSliceProto'Extent'HasLength
y__}))
(((Maybe Int64 -> f (Maybe Int64))
-> Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength))
-> ((Int64 -> f Int64) -> Maybe Int64 -> f (Maybe Int64))
-> (Int64 -> f Int64)
-> Maybe TensorSliceProto'Extent'HasLength
-> f (Maybe TensorSliceProto'Extent'HasLength)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe TensorSliceProto'Extent'HasLength -> Maybe Int64)
-> (Maybe TensorSliceProto'Extent'HasLength
-> Maybe Int64 -> Maybe TensorSliceProto'Extent'HasLength)
-> Lens
(Maybe TensorSliceProto'Extent'HasLength)
(Maybe TensorSliceProto'Extent'HasLength)
(Maybe Int64)
(Maybe Int64)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe TensorSliceProto'Extent'HasLength
x__
-> case Maybe TensorSliceProto'Extent'HasLength
x__ of
(Prelude.Just (TensorSliceProto'Extent'Length x__val :: Int64
x__val))
-> Int64 -> Maybe Int64
forall a. a -> Maybe a
Prelude.Just Int64
x__val
_otherwise :: Maybe TensorSliceProto'Extent'HasLength
_otherwise -> Maybe Int64
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe Int64
y__ -> (Int64 -> TensorSliceProto'Extent'HasLength)
-> Maybe Int64 -> Maybe TensorSliceProto'Extent'HasLength
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap Int64 -> TensorSliceProto'Extent'HasLength
TensorSliceProto'Extent'Length Maybe Int64
y__))
(Int64 -> Lens' (Maybe Int64) Int64
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault))
instance Data.ProtoLens.Message TensorSliceProto'Extent where
messageName :: Proxy TensorSliceProto'Extent -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.TensorSliceProto.Extent"
packedMessageDescriptor :: Proxy TensorSliceProto'Extent -> ByteString
packedMessageDescriptor _
= "\n\
\\ACKExtent\DC2\DC4\n\
\\ENQstart\CAN\SOH \SOH(\ETXR\ENQstart\DC2\CAN\n\
\\ACKlength\CAN\STX \SOH(\ETXH\NULR\ACKlengthB\f\n\
\\n\
\has_length"
packedFileDescriptor :: Proxy TensorSliceProto'Extent -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor TensorSliceProto'Extent)
fieldsByTag
= let
start__field_descriptor :: FieldDescriptor TensorSliceProto'Extent
start__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor TensorSliceProto'Extent Int64
-> FieldDescriptor TensorSliceProto'Extent
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"start"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens TensorSliceProto'Extent TensorSliceProto'Extent Int64 Int64
-> FieldAccessor TensorSliceProto'Extent Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "start" 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 @"start")) ::
Data.ProtoLens.FieldDescriptor TensorSliceProto'Extent
length__field_descriptor :: FieldDescriptor TensorSliceProto'Extent
length__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor TensorSliceProto'Extent Int64
-> FieldDescriptor TensorSliceProto'Extent
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"length"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(Lens' TensorSliceProto'Extent (Maybe Int64)
-> FieldAccessor TensorSliceProto'Extent Int64
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'length" 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'length")) ::
Data.ProtoLens.FieldDescriptor TensorSliceProto'Extent
in
[(Tag, FieldDescriptor TensorSliceProto'Extent)]
-> Map Tag (FieldDescriptor TensorSliceProto'Extent)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor TensorSliceProto'Extent
start__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor TensorSliceProto'Extent
length__field_descriptor)]
unknownFields :: LensLike' f TensorSliceProto'Extent FieldSet
unknownFields
= (TensorSliceProto'Extent -> FieldSet)
-> (TensorSliceProto'Extent -> FieldSet -> TensorSliceProto'Extent)
-> Lens' TensorSliceProto'Extent FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TensorSliceProto'Extent -> FieldSet
_TensorSliceProto'Extent'_unknownFields
(\ x__ :: TensorSliceProto'Extent
x__ y__ :: FieldSet
y__ -> TensorSliceProto'Extent
x__ {_TensorSliceProto'Extent'_unknownFields :: FieldSet
_TensorSliceProto'Extent'_unknownFields = FieldSet
y__})
defMessage :: TensorSliceProto'Extent
defMessage
= $WTensorSliceProto'Extent'_constructor :: Int64
-> Maybe TensorSliceProto'Extent'HasLength
-> FieldSet
-> TensorSliceProto'Extent
TensorSliceProto'Extent'_constructor
{_TensorSliceProto'Extent'start :: Int64
_TensorSliceProto'Extent'start = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_TensorSliceProto'Extent'hasLength :: Maybe TensorSliceProto'Extent'HasLength
_TensorSliceProto'Extent'hasLength = Maybe TensorSliceProto'Extent'HasLength
forall a. Maybe a
Prelude.Nothing,
_TensorSliceProto'Extent'_unknownFields :: FieldSet
_TensorSliceProto'Extent'_unknownFields = []}
parseMessage :: Parser TensorSliceProto'Extent
parseMessage
= let
loop ::
TensorSliceProto'Extent
-> Data.ProtoLens.Encoding.Bytes.Parser TensorSliceProto'Extent
loop :: TensorSliceProto'Extent -> Parser TensorSliceProto'Extent
loop x :: TensorSliceProto'Extent
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]))))
TensorSliceProto'Extent -> Parser TensorSliceProto'Extent
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter
TensorSliceProto'Extent TensorSliceProto'Extent FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> TensorSliceProto'Extent
-> TensorSliceProto'Extent
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
TensorSliceProto'Extent TensorSliceProto'Extent FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) TensorSliceProto'Extent
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"start"
TensorSliceProto'Extent -> Parser TensorSliceProto'Extent
loop (Setter TensorSliceProto'Extent TensorSliceProto'Extent Int64 Int64
-> Int64 -> TensorSliceProto'Extent -> TensorSliceProto'Extent
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "start" 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 @"start") Int64
y TensorSliceProto'Extent
x)
16
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"length"
TensorSliceProto'Extent -> Parser TensorSliceProto'Extent
loop (Setter TensorSliceProto'Extent TensorSliceProto'Extent Int64 Int64
-> Int64 -> TensorSliceProto'Extent -> TensorSliceProto'Extent
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "length" 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 @"length") Int64
y TensorSliceProto'Extent
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
TensorSliceProto'Extent -> Parser TensorSliceProto'Extent
loop
(Setter
TensorSliceProto'Extent TensorSliceProto'Extent FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> TensorSliceProto'Extent
-> TensorSliceProto'Extent
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
TensorSliceProto'Extent TensorSliceProto'Extent FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) TensorSliceProto'Extent
x)
in
Parser TensorSliceProto'Extent
-> String -> Parser TensorSliceProto'Extent
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do TensorSliceProto'Extent -> Parser TensorSliceProto'Extent
loop TensorSliceProto'Extent
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "Extent"
buildMessage :: TensorSliceProto'Extent -> Builder
buildMessage
= \ _x :: TensorSliceProto'Extent
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike
Int64 TensorSliceProto'Extent TensorSliceProto'Extent Int64 Int64
-> TensorSliceProto'Extent -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "start" 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 @"start") TensorSliceProto'Extent
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 8)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe TensorSliceProto'Extent'HasLength)
TensorSliceProto'Extent
TensorSliceProto'Extent
(Maybe TensorSliceProto'Extent'HasLength)
(Maybe TensorSliceProto'Extent'HasLength)
-> TensorSliceProto'Extent
-> Maybe TensorSliceProto'Extent'HasLength
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'hasLength" 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'hasLength") TensorSliceProto'Extent
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just (TensorSliceProto'Extent'Length v :: Int64
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 16)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet
TensorSliceProto'Extent
TensorSliceProto'Extent
FieldSet
FieldSet
-> TensorSliceProto'Extent -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet
TensorSliceProto'Extent
TensorSliceProto'Extent
FieldSet
FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields TensorSliceProto'Extent
_x)))
instance Control.DeepSeq.NFData TensorSliceProto'Extent where
rnf :: TensorSliceProto'Extent -> ()
rnf
= \ x__ :: TensorSliceProto'Extent
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(TensorSliceProto'Extent -> FieldSet
_TensorSliceProto'Extent'_unknownFields TensorSliceProto'Extent
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(TensorSliceProto'Extent -> Int64
_TensorSliceProto'Extent'start TensorSliceProto'Extent
x__)
(Maybe TensorSliceProto'Extent'HasLength -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(TensorSliceProto'Extent -> Maybe TensorSliceProto'Extent'HasLength
_TensorSliceProto'Extent'hasLength TensorSliceProto'Extent
x__) ()))
instance Control.DeepSeq.NFData TensorSliceProto'Extent'HasLength where
rnf :: TensorSliceProto'Extent'HasLength -> ()
rnf (TensorSliceProto'Extent'Length x__ :: Int64
x__) = Int64 -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf Int64
x__
_TensorSliceProto'Extent'Length ::
Data.ProtoLens.Prism.Prism' TensorSliceProto'Extent'HasLength Data.Int.Int64
_TensorSliceProto'Extent'Length :: p Int64 (f Int64)
-> p TensorSliceProto'Extent'HasLength
(f TensorSliceProto'Extent'HasLength)
_TensorSliceProto'Extent'Length
= (Int64 -> TensorSliceProto'Extent'HasLength)
-> (TensorSliceProto'Extent'HasLength -> Maybe Int64)
-> Prism
TensorSliceProto'Extent'HasLength
TensorSliceProto'Extent'HasLength
Int64
Int64
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
Int64 -> TensorSliceProto'Extent'HasLength
TensorSliceProto'Extent'Length
(\ p__ :: TensorSliceProto'Extent'HasLength
p__
-> case TensorSliceProto'Extent'HasLength
p__ of {
(TensorSliceProto'Extent'Length p__val :: Int64
p__val) -> Int64 -> Maybe Int64
forall a. a -> Maybe a
Prelude.Just Int64
p__val })
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
= "\n\
\,tensorflow/core/framework/tensor_slice.proto\DC2\n\
\tensorflow\"\151\SOH\n\
\\DLETensorSliceProto\DC2;\n\
\\ACKextent\CAN\SOH \ETX(\v2#.tensorflow.TensorSliceProto.ExtentR\ACKextent\SUBF\n\
\\ACKExtent\DC2\DC4\n\
\\ENQstart\CAN\SOH \SOH(\ETXR\ENQstart\DC2\CAN\n\
\\ACKlength\CAN\STX \SOH(\ETXH\NULR\ACKlengthB\f\n\
\\n\
\has_lengthB\135\SOH\n\
\\CANorg.tensorflow.frameworkB\DC1TensorSliceProtosP\SOHZSgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_slice_go_proto\248\SOH\SOHJ\206\t\n\
\\ACK\DC2\EOT\STX\NUL&\SOH\n\
\;\n\
\\SOH\f\DC2\ETX\STX\NUL\DC221 Protocol buffer representing slices of a tensor\n\
\\n\
\\b\n\
\\SOH\STX\DC2\ETX\EOT\NUL\DC3\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\NUL2\n\
\\t\n\
\\STX\b\b\DC2\ETX\a\NUL2\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\
\\NULj\n\
\\t\n\
\\STX\b\v\DC2\ETX\n\
\\NULj\n\
\P\n\
\\STX\EOT\NUL\DC2\EOT\r\NUL&\SOH\SUBD Can only be interpreted if you know the corresponding TensorShape.\n\
\\n\
\\n\
\\n\
\\ETX\EOT\NUL\SOH\DC2\ETX\r\b\CAN\n\
\\160\SOH\n\
\\EOT\EOT\NUL\ETX\NUL\DC2\EOT\SI\STX\RS\ETX\SUB' Extent of the slice in one dimension.\n\
\\"i Either both or no attributes must be set. When no attribute is set\n\
\ means: All data in that dimension.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\ETX\NUL\SOH\DC2\ETX\SI\n\
\\DLE\n\
\9\n\
\\ACK\EOT\NUL\ETX\NUL\STX\NUL\DC2\ETX\DC4\EOT\DC4\SUB* Start index of the slice, starting at 0.\n\
\\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\NUL\ENQ\DC2\ETX\DC4\EOT\t\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\NUL\SOH\DC2\ETX\DC4\n\
\\SI\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\NUL\ETX\DC2\ETX\DC4\DC2\DC3\n\
\\167\STX\n\
\\ACK\EOT\NUL\ETX\NUL\b\NUL\DC2\EOT\ESC\EOT\GS\ENQ\SUB\150\STX Length of the slice: if the length is missing or -1 we will\n\
\ interpret this as \"everything in this dimension\". We use\n\
\ \"oneof\" to preserve information about whether the length is\n\
\ present without changing the serialization format from the\n\
\ prior proto2 version of this proto.\n\
\\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\b\NUL\SOH\DC2\ETX\ESC\n\
\\DC4\n\
\\r\n\
\\ACK\EOT\NUL\ETX\NUL\STX\SOH\DC2\ETX\FS\ACK\ETB\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\SOH\ENQ\DC2\ETX\FS\ACK\v\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\SOH\SOH\DC2\ETX\FS\f\DC2\n\
\\SO\n\
\\a\EOT\NUL\ETX\NUL\STX\SOH\ETX\DC2\ETX\FS\NAK\SYN\n\
\\232\SOH\n\
\\EOT\EOT\NUL\STX\NUL\DC2\ETX%\STX\GS\SUB\218\SOH Extent of the slice in all tensor dimensions.\n\
\\n\
\ Must have one entry for each of the dimension of the tensor that this\n\
\ slice belongs to. The order of sizes is the same as the order of\n\
\ dimensions in the TensorShape.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\EOT\DC2\ETX%\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ACK\DC2\ETX%\v\DC1\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX%\DC2\CAN\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX%\ESC\FSb\ACKproto3"