| 1 |
// Code generated by protoc-gen-gogo. DO NOT EDIT. |
| 2 |
// source: gorgonia.org/tensor/internal/serialization/pb/generated.proto |
| 3 |
|
| 4 |
/* |
| 5 |
Package pb is a generated protocol buffer package. |
| 6 |
|
| 7 |
It is generated from these files: |
| 8 |
gorgonia.org/tensor/internal/serialization/pb/generated.proto |
| 9 |
|
| 10 |
It has these top-level messages: |
| 11 |
AP |
| 12 |
Dense |
| 13 |
MaskedDense |
| 14 |
*/ |
| 15 |
package pb |
| 16 |
|
| 17 |
import proto "github.com/golang/protobuf/proto" |
| 18 |
import fmt "fmt" |
| 19 |
import math "math" |
| 20 |
import _ "github.com/gogo/protobuf/gogoproto" |
| 21 |
|
| 22 |
import io "io" |
| 23 |
|
| 24 |
// Reference imports to suppress errors if they are not otherwise used. |
| 25 |
var _ = proto.Marshal |
| 26 |
var _ = fmt.Errorf |
| 27 |
var _ = math.Inf |
| 28 |
|
| 29 |
// This is a compile-time assertion to ensure that this generated file |
| 30 |
// is compatible with the proto package it is being compiled against. |
| 31 |
// A compilation error at this line likely means your copy of the |
| 32 |
// proto package needs to be updated. |
| 33 |
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package |
| 34 |
|
| 35 |
var Triangle_name = map[int32]string{ |
| 36 |
0: "NOT_TRIANGLE", |
| 37 |
1: "UPPER", |
| 38 |
2: "LOWER", |
| 39 |
3: "SYMMETRIC", |
| 40 |
} |
| 41 |
var Triangle_value = map[string]int32{ |
| 42 |
"NOT_TRIANGLE": 0, |
| 43 |
"UPPER": 1, |
| 44 |
"LOWER": 2, |
| 45 |
"SYMMETRIC": 3, |
| 46 |
} |
| 47 |
|
| 48 |
func (Triangle) EnumDescriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } |
| 49 |
|
| 50 |
func (m *AP) Reset() { *m = AP{} } |
| 51 |
func (m *AP) String() string { return proto.CompactTextString(m) } |
| 52 |
func (*AP) ProtoMessage() {} |
| 53 |
func (*AP) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } |
| 54 |
|
| 55 |
func (m *Dense) Reset() { *m = Dense{} } |
| 56 |
func (m *Dense) String() string { return proto.CompactTextString(m) } |
| 57 |
func (*Dense) ProtoMessage() {} |
| 58 |
func (*Dense) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } |
| 59 |
|
| 60 |
func (m *MaskedDense) Reset() { *m = MaskedDense{} } |
| 61 |
func (m *MaskedDense) String() string { return proto.CompactTextString(m) } |
| 62 |
func (*MaskedDense) ProtoMessage() {} |
| 63 |
func (*MaskedDense) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } |
| 64 |
|
| 65 |
func init() { |
| 66 |
proto.RegisterType((*AP)(nil), "gorgonia.org.tensor.internal.serialization.pb.AP") |
| 67 |
proto.RegisterType((*Dense)(nil), "gorgonia.org.tensor.internal.serialization.pb.Dense") |
| 68 |
proto.RegisterType((*MaskedDense)(nil), "gorgonia.org.tensor.internal.serialization.pb.MaskedDense") |
| 69 |
proto.RegisterEnum("gorgonia.org.tensor.internal.serialization.pb.Triangle", Triangle_name, Triangle_value) |
| 70 |
} |
| 71 |
func (m *AP) Marshal() (dAtA []byte, err error) { |
| 72 |
size := m.ProtoSize() |
| 73 |
dAtA = make([]byte, size) |
| 74 |
n, err := m.MarshalTo(dAtA) |
| 75 |
if err != nil { |
| 76 |
return nil, err |
| 77 |
} |
| 78 |
return dAtA[:n], nil |
| 79 |
} |
| 80 |
|
| 81 |
func (m *AP) MarshalTo(dAtA []byte) (int, error) { |
| 82 |
var i int |
| 83 |
_ = i |
| 84 |
var l int |
| 85 |
_ = l |
| 86 |
if len(m.Shape) > 0 { |
| 87 |
dAtA2 := make([]byte, len(m.Shape)*10) |
| 88 |
var j1 int |
| 89 |
for _, num1 := range m.Shape { |
| 90 |
num := uint64(num1) |
| 91 |
for num >= 1<<7 { |
| 92 |
dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) |
| 93 |
num >>= 7 |
| 94 |
j1++ |
| 95 |
} |
| 96 |
dAtA2[j1] = uint8(num) |
| 97 |
j1++ |
| 98 |
} |
| 99 |
dAtA[i] = 0xa |
| 100 |
i++ |
| 101 |
i = encodeVarintGenerated(dAtA, i, uint64(j1)) |
| 102 |
i += copy(dAtA[i:], dAtA2[:j1]) |
| 103 |
} |
| 104 |
if len(m.Strides) > 0 { |
| 105 |
dAtA4 := make([]byte, len(m.Strides)*10) |
| 106 |
var j3 int |
| 107 |
for _, num1 := range m.Strides { |
| 108 |
num := uint64(num1) |
| 109 |
for num >= 1<<7 { |
| 110 |
dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) |
| 111 |
num >>= 7 |
| 112 |
j3++ |
| 113 |
} |
| 114 |
dAtA4[j3] = uint8(num) |
| 115 |
j3++ |
| 116 |
} |
| 117 |
dAtA[i] = 0x12 |
| 118 |
i++ |
| 119 |
i = encodeVarintGenerated(dAtA, i, uint64(j3)) |
| 120 |
i += copy(dAtA[i:], dAtA4[:j3]) |
| 121 |
} |
| 122 |
if m.O != 0 { |
| 123 |
dAtA[i] = 0x18 |
| 124 |
i++ |
| 125 |
i = encodeVarintGenerated(dAtA, i, uint64(m.O)) |
| 126 |
} |
| 127 |
if m.T != 0 { |
| 128 |
dAtA[i] = 0x20 |
| 129 |
i++ |
| 130 |
i = encodeVarintGenerated(dAtA, i, uint64(m.T)) |
| 131 |
} |
| 132 |
return i, nil |
| 133 |
} |
| 134 |
|
| 135 |
func (m *Dense) Marshal() (dAtA []byte, err error) { |
| 136 |
size := m.ProtoSize() |
| 137 |
dAtA = make([]byte, size) |
| 138 |
n, err := m.MarshalTo(dAtA) |
| 139 |
if err != nil { |
| 140 |
return nil, err |
| 141 |
} |
| 142 |
return dAtA[:n], nil |
| 143 |
} |
| 144 |
|
| 145 |
func (m *Dense) MarshalTo(dAtA []byte) (int, error) { |
| 146 |
var i int |
| 147 |
_ = i |
| 148 |
var l int |
| 149 |
_ = l |
| 150 |
if len(m.Shape) > 0 { |
| 151 |
dAtA6 := make([]byte, len(m.Shape)*10) |
| 152 |
var j5 int |
| 153 |
for _, num1 := range m.Shape { |
| 154 |
num := uint64(num1) |
| 155 |
for num >= 1<<7 { |
| 156 |
dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) |
| 157 |
num >>= 7 |
| 158 |
j5++ |
| 159 |
} |
| 160 |
dAtA6[j5] = uint8(num) |
| 161 |
j5++ |
| 162 |
} |
| 163 |
dAtA[i] = 0xa |
| 164 |
i++ |
| 165 |
i = encodeVarintGenerated(dAtA, i, uint64(j5)) |
| 166 |
i += copy(dAtA[i:], dAtA6[:j5]) |
| 167 |
} |
| 168 |
if len(m.Strides) > 0 { |
| 169 |
dAtA8 := make([]byte, len(m.Strides)*10) |
| 170 |
var j7 int |
| 171 |
for _, num1 := range m.Strides { |
| 172 |
num := uint64(num1) |
| 173 |
for num >= 1<<7 { |
| 174 |
dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) |
| 175 |
num >>= 7 |
| 176 |
j7++ |
| 177 |
} |
| 178 |
dAtA8[j7] = uint8(num) |
| 179 |
j7++ |
| 180 |
} |
| 181 |
dAtA[i] = 0x12 |
| 182 |
i++ |
| 183 |
i = encodeVarintGenerated(dAtA, i, uint64(j7)) |
| 184 |
i += copy(dAtA[i:], dAtA8[:j7]) |
| 185 |
} |
| 186 |
if m.O != 0 { |
| 187 |
dAtA[i] = 0x18 |
| 188 |
i++ |
| 189 |
i = encodeVarintGenerated(dAtA, i, uint64(m.O)) |
| 190 |
} |
| 191 |
if m.T != 0 { |
| 192 |
dAtA[i] = 0x20 |
| 193 |
i++ |
| 194 |
i = encodeVarintGenerated(dAtA, i, uint64(m.T)) |
| 195 |
} |
| 196 |
if len(m.Type) > 0 { |
| 197 |
dAtA[i] = 0x2a |
| 198 |
i++ |
| 199 |
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) |
| 200 |
i += copy(dAtA[i:], m.Type) |
| 201 |
} |
| 202 |
if len(m.Data) > 0 { |
| 203 |
dAtA[i] = 0x32 |
| 204 |
i++ |
| 205 |
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data))) |
| 206 |
i += copy(dAtA[i:], m.Data) |
| 207 |
} |
| 208 |
return i, nil |
| 209 |
} |
| 210 |
|
| 211 |
func (m *MaskedDense) Marshal() (dAtA []byte, err error) { |
| 212 |
size := m.ProtoSize() |
| 213 |
dAtA = make([]byte, size) |
| 214 |
n, err := m.MarshalTo(dAtA) |
| 215 |
if err != nil { |
| 216 |
return nil, err |
| 217 |
} |
| 218 |
return dAtA[:n], nil |
| 219 |
} |
| 220 |
|
| 221 |
func (m *MaskedDense) MarshalTo(dAtA []byte) (int, error) { |
| 222 |
var i int |
| 223 |
_ = i |
| 224 |
var l int |
| 225 |
_ = l |
| 226 |
if len(m.Shape) > 0 { |
| 227 |
dAtA10 := make([]byte, len(m.Shape)*10) |
| 228 |
var j9 int |
| 229 |
for _, num1 := range m.Shape { |
| 230 |
num := uint64(num1) |
| 231 |
for num >= 1<<7 { |
| 232 |
dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80) |
| 233 |
num >>= 7 |
| 234 |
j9++ |
| 235 |
} |
| 236 |
dAtA10[j9] = uint8(num) |
| 237 |
j9++ |
| 238 |
} |
| 239 |
dAtA[i] = 0xa |
| 240 |
i++ |
| 241 |
i = encodeVarintGenerated(dAtA, i, uint64(j9)) |
| 242 |
i += copy(dAtA[i:], dAtA10[:j9]) |
| 243 |
} |
| 244 |
if len(m.Strides) > 0 { |
| 245 |
dAtA12 := make([]byte, len(m.Strides)*10) |
| 246 |
var j11 int |
| 247 |
for _, num1 := range m.Strides { |
| 248 |
num := uint64(num1) |
| 249 |
for num >= 1<<7 { |
| 250 |
dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) |
| 251 |
num >>= 7 |
| 252 |
j11++ |
| 253 |
} |
| 254 |
dAtA12[j11] = uint8(num) |
| 255 |
j11++ |
| 256 |
} |
| 257 |
dAtA[i] = 0x12 |
| 258 |
i++ |
| 259 |
i = encodeVarintGenerated(dAtA, i, uint64(j11)) |
| 260 |
i += copy(dAtA[i:], dAtA12[:j11]) |
| 261 |
} |
| 262 |
if m.O != 0 { |
| 263 |
dAtA[i] = 0x18 |
| 264 |
i++ |
| 265 |
i = encodeVarintGenerated(dAtA, i, uint64(m.O)) |
| 266 |
} |
| 267 |
if m.T != 0 { |
| 268 |
dAtA[i] = 0x20 |
| 269 |
i++ |
| 270 |
i = encodeVarintGenerated(dAtA, i, uint64(m.T)) |
| 271 |
} |
| 272 |
if len(m.Type) > 0 { |
| 273 |
dAtA[i] = 0x2a |
| 274 |
i++ |
| 275 |
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) |
| 276 |
i += copy(dAtA[i:], m.Type) |
| 277 |
} |
| 278 |
if len(m.Data) > 0 { |
| 279 |
dAtA[i] = 0x32 |
| 280 |
i++ |
| 281 |
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data))) |
| 282 |
i += copy(dAtA[i:], m.Data) |
| 283 |
} |
| 284 |
if len(m.Mask) > 0 { |
| 285 |
dAtA[i] = 0x3a |
| 286 |
i++ |
| 287 |
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Mask))) |
| 288 |
for _, b := range m.Mask { |
| 289 |
if b { |
| 290 |
dAtA[i] = 1 |
| 291 |
} else { |
| 292 |
dAtA[i] = 0 |
| 293 |
} |
| 294 |
i++ |
| 295 |
} |
| 296 |
} |
| 297 |
if len(m.MaskIsSoft) > 0 { |
| 298 |
dAtA[i] = 0x42 |
| 299 |
i++ |
| 300 |
i = encodeVarintGenerated(dAtA, i, uint64(len(m.MaskIsSoft))) |
| 301 |
for _, b := range m.MaskIsSoft { |
| 302 |
if b { |
| 303 |
dAtA[i] = 1 |
| 304 |
} else { |
| 305 |
dAtA[i] = 0 |
| 306 |
} |
| 307 |
i++ |
| 308 |
} |
| 309 |
} |
| 310 |
return i, nil |
| 311 |
} |
| 312 |
|
| 313 |
func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { |
| 314 |
for v >= 1<<7 { |
| 315 |
dAtA[offset] = uint8(v&0x7f | 0x80) |
| 316 |
v >>= 7 |
| 317 |
offset++ |
| 318 |
} |
| 319 |
dAtA[offset] = uint8(v) |
| 320 |
return offset + 1 |
| 321 |
} |
| 322 |
func (m *AP) ProtoSize() (n int) { |
| 323 |
var l int |
| 324 |
_ = l |
| 325 |
if len(m.Shape) > 0 { |
| 326 |
l = 0 |
| 327 |
for _, e := range m.Shape { |
| 328 |
l += sovGenerated(uint64(e)) |
| 329 |
} |
| 330 |
n += 1 + sovGenerated(uint64(l)) + l |
| 331 |
} |
| 332 |
if len(m.Strides) > 0 { |
| 333 |
l = 0 |
| 334 |
for _, e := range m.Strides { |
| 335 |
l += sovGenerated(uint64(e)) |
| 336 |
} |
| 337 |
n += 1 + sovGenerated(uint64(l)) + l |
| 338 |
} |
| 339 |
if m.O != 0 { |
| 340 |
n += 1 + sovGenerated(uint64(m.O)) |
| 341 |
} |
| 342 |
if m.T != 0 { |
| 343 |
n += 1 + sovGenerated(uint64(m.T)) |
| 344 |
} |
| 345 |
return n |
| 346 |
} |
| 347 |
|
| 348 |
func (m *Dense) ProtoSize() (n int) { |
| 349 |
var l int |
| 350 |
_ = l |
| 351 |
if len(m.Shape) > 0 { |
| 352 |
l = 0 |
| 353 |
for _, e := range m.Shape { |
| 354 |
l += sovGenerated(uint64(e)) |
| 355 |
} |
| 356 |
n += 1 + sovGenerated(uint64(l)) + l |
| 357 |
} |
| 358 |
if len(m.Strides) > 0 { |
| 359 |
l = 0 |
| 360 |
for _, e := range m.Strides { |
| 361 |
l += sovGenerated(uint64(e)) |
| 362 |
} |
| 363 |
n += 1 + sovGenerated(uint64(l)) + l |
| 364 |
} |
| 365 |
if m.O != 0 { |
| 366 |
n += 1 + sovGenerated(uint64(m.O)) |
| 367 |
} |
| 368 |
if m.T != 0 { |
| 369 |
n += 1 + sovGenerated(uint64(m.T)) |
| 370 |
} |
| 371 |
l = len(m.Type) |
| 372 |
if l > 0 { |
| 373 |
n += 1 + l + sovGenerated(uint64(l)) |
| 374 |
} |
| 375 |
l = len(m.Data) |
| 376 |
if l > 0 { |
| 377 |
n += 1 + l + sovGenerated(uint64(l)) |
| 378 |
} |
| 379 |
return n |
| 380 |
} |
| 381 |
|
| 382 |
func (m *MaskedDense) ProtoSize() (n int) { |
| 383 |
var l int |
| 384 |
_ = l |
| 385 |
if len(m.Shape) > 0 { |
| 386 |
l = 0 |
| 387 |
for _, e := range m.Shape { |
| 388 |
l += sovGenerated(uint64(e)) |
| 389 |
} |
| 390 |
n += 1 + sovGenerated(uint64(l)) + l |
| 391 |
} |
| 392 |
if len(m.Strides) > 0 { |
| 393 |
l = 0 |
| 394 |
for _, e := range m.Strides { |
| 395 |
l += sovGenerated(uint64(e)) |
| 396 |
} |
| 397 |
n += 1 + sovGenerated(uint64(l)) + l |
| 398 |
} |
| 399 |
if m.O != 0 { |
| 400 |
n += 1 + sovGenerated(uint64(m.O)) |
| 401 |
} |
| 402 |
if m.T != 0 { |
| 403 |
n += 1 + sovGenerated(uint64(m.T)) |
| 404 |
} |
| 405 |
l = len(m.Type) |
| 406 |
if l > 0 { |
| 407 |
n += 1 + l + sovGenerated(uint64(l)) |
| 408 |
} |
| 409 |
l = len(m.Data) |
| 410 |
if l > 0 { |
| 411 |
n += 1 + l + sovGenerated(uint64(l)) |
| 412 |
} |
| 413 |
if len(m.Mask) > 0 { |
| 414 |
n += 1 + sovGenerated(uint64(len(m.Mask))) + len(m.Mask)*1 |
| 415 |
} |
| 416 |
if len(m.MaskIsSoft) > 0 { |
| 417 |
n += 1 + sovGenerated(uint64(len(m.MaskIsSoft))) + len(m.MaskIsSoft)*1 |
| 418 |
} |
| 419 |
return n |
| 420 |
} |
| 421 |
|
| 422 |
func sovGenerated(x uint64) (n int) { |
| 423 |
for { |
| 424 |
n++ |
| 425 |
x >>= 7 |
| 426 |
if x == 0 { |
| 427 |
break |
| 428 |
} |
| 429 |
} |
| 430 |
return n |
| 431 |
} |
| 432 |
func sozGenerated(x uint64) (n int) { |
| 433 |
return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
| 434 |
} |
| 435 |
func (m *AP) Unmarshal(dAtA []byte) error { |
| 436 |
l := len(dAtA) |
| 437 |
iNdEx := 0 |
| 438 |
for iNdEx < l { |
| 439 |
preIndex := iNdEx |
| 440 |
var wire uint64 |
| 441 |
for shift := uint(0); ; shift += 7 { |
| 442 |
if shift >= 64 { |
| 443 |
return ErrIntOverflowGenerated |
| 444 |
} |
| 445 |
if iNdEx >= l { |
| 446 |
return io.ErrUnexpectedEOF |
| 447 |
} |
| 448 |
b := dAtA[iNdEx] |
| 449 |
iNdEx++ |
| 450 |
wire |= (uint64(b) & 0x7F) << shift |
| 451 |
if b < 0x80 { |
| 452 |
break |
| 453 |
} |
| 454 |
} |
| 455 |
fieldNum := int32(wire >> 3) |
| 456 |
wireType := int(wire & 0x7) |
| 457 |
if wireType == 4 { |
| 458 |
return fmt.Errorf("proto: AP: wiretype end group for non-group") |
| 459 |
} |
| 460 |
if fieldNum <= 0 { |
| 461 |
return fmt.Errorf("proto: AP: illegal tag %d (wire type %d)", fieldNum, wire) |
| 462 |
} |
| 463 |
switch fieldNum { |
| 464 |
case 1: |
| 465 |
if wireType == 0 { |
| 466 |
var v int32 |
| 467 |
for shift := uint(0); ; shift += 7 { |
| 468 |
if shift >= 64 { |
| 469 |
return ErrIntOverflowGenerated |
| 470 |
} |
| 471 |
if iNdEx >= l { |
| 472 |
return io.ErrUnexpectedEOF |
| 473 |
} |
| 474 |
b := dAtA[iNdEx] |
| 475 |
iNdEx++ |
| 476 |
v |= (int32(b) & 0x7F) << shift |
| 477 |
if b < 0x80 { |
| 478 |
break |
| 479 |
} |
| 480 |
} |
| 481 |
m.Shape = append(m.Shape, v) |
| 482 |
} else if wireType == 2 { |
| 483 |
var packedLen int |
| 484 |
for shift := uint(0); ; shift += 7 { |
| 485 |
if shift >= 64 { |
| 486 |
return ErrIntOverflowGenerated |
| 487 |
} |
| 488 |
if iNdEx >= l { |
| 489 |
return io.ErrUnexpectedEOF |
| 490 |
} |
| 491 |
b := dAtA[iNdEx] |
| 492 |
iNdEx++ |
| 493 |
packedLen |= (int(b) & 0x7F) << shift |
| 494 |
if b < 0x80 { |
| 495 |
break |
| 496 |
} |
| 497 |
} |
| 498 |
if packedLen < 0 { |
| 499 |
return ErrInvalidLengthGenerated |
| 500 |
} |
| 501 |
postIndex := iNdEx + packedLen |
| 502 |
if postIndex > l { |
| 503 |
return io.ErrUnexpectedEOF |
| 504 |
} |
| 505 |
for iNdEx < postIndex { |
| 506 |
var v int32 |
| 507 |
for shift := uint(0); ; shift += 7 { |
| 508 |
if shift >= 64 { |
| 509 |
return ErrIntOverflowGenerated |
| 510 |
} |
| 511 |
if iNdEx >= l { |
| 512 |
return io.ErrUnexpectedEOF |
| 513 |
} |
| 514 |
b := dAtA[iNdEx] |
| 515 |
iNdEx++ |
| 516 |
v |= (int32(b) & 0x7F) << shift |
| 517 |
if b < 0x80 { |
| 518 |
break |
| 519 |
} |
| 520 |
} |
| 521 |
m.Shape = append(m.Shape, v) |
| 522 |
} |
| 523 |
} else { |
| 524 |
return fmt.Errorf("proto: wrong wireType = %d for field Shape", wireType) |
| 525 |
} |
| 526 |
case 2: |
| 527 |
if wireType == 0 { |
| 528 |
var v int32 |
| 529 |
for shift := uint(0); ; shift += 7 { |
| 530 |
if shift >= 64 { |
| 531 |
return ErrIntOverflowGenerated |
| 532 |
} |
| 533 |
if iNdEx >= l { |
| 534 |
return io.ErrUnexpectedEOF |
| 535 |
} |
| 536 |
b := dAtA[iNdEx] |
| 537 |
iNdEx++ |
| 538 |
v |= (int32(b) & 0x7F) << shift |
| 539 |
if b < 0x80 { |
| 540 |
break |
| 541 |
} |
| 542 |
} |
| 543 |
m.Strides = append(m.Strides, v) |
| 544 |
} else if wireType == 2 { |
| 545 |
var packedLen int |
| 546 |
for shift := uint(0); ; shift += 7 { |
| 547 |
if shift >= 64 { |
| 548 |
return ErrIntOverflowGenerated |
| 549 |
} |
| 550 |
if iNdEx >= l { |
| 551 |
return io.ErrUnexpectedEOF |
| 552 |
} |
| 553 |
b := dAtA[iNdEx] |
| 554 |
iNdEx++ |
| 555 |
packedLen |= (int(b) & 0x7F) << shift |
| 556 |
if b < 0x80 { |
| 557 |
break |
| 558 |
} |
| 559 |
} |
| 560 |
if packedLen < 0 { |
| 561 |
return ErrInvalidLengthGenerated |
| 562 |
} |
| 563 |
postIndex := iNdEx + packedLen |
| 564 |
if postIndex > l { |
| 565 |
return io.ErrUnexpectedEOF |
| 566 |
} |
| 567 |
for iNdEx < postIndex { |
| 568 |
var v int32 |
| 569 |
for shift := uint(0); ; shift += 7 { |
| 570 |
if shift >= 64 { |
| 571 |
return ErrIntOverflowGenerated |
| 572 |
} |
| 573 |
if iNdEx >= l { |
| 574 |
return io.ErrUnexpectedEOF |
| 575 |
} |
| 576 |
b := dAtA[iNdEx] |
| 577 |
iNdEx++ |
| 578 |
v |= (int32(b) & 0x7F) << shift |
| 579 |
if b < 0x80 { |
| 580 |
break |
| 581 |
} |
| 582 |
} |
| 583 |
m.Strides = append(m.Strides, v) |
| 584 |
} |
| 585 |
} else { |
| 586 |
return fmt.Errorf("proto: wrong wireType = %d for field Strides", wireType) |
| 587 |
} |
| 588 |
case 3: |
| 589 |
if wireType != 0 { |
| 590 |
return fmt.Errorf("proto: wrong wireType = %d for field O", wireType) |
| 591 |
} |
| 592 |
m.O = 0 |
| 593 |
for shift := uint(0); ; shift += 7 { |
| 594 |
if shift >= 64 { |
| 595 |
return ErrIntOverflowGenerated |
| 596 |
} |
| 597 |
if iNdEx >= l { |
| 598 |
return io.ErrUnexpectedEOF |
| 599 |
} |
| 600 |
b := dAtA[iNdEx] |
| 601 |
iNdEx++ |
| 602 |
m.O |= (DataOrder(b) & 0x7F) << shift |
| 603 |
if b < 0x80 { |
| 604 |
break |
| 605 |
} |
| 606 |
} |
| 607 |
case 4: |
| 608 |
if wireType != 0 { |
| 609 |
return fmt.Errorf("proto: wrong wireType = %d for field T", wireType) |
| 610 |
} |
| 611 |
m.T = 0 |
| 612 |
for shift := uint(0); ; shift += 7 { |
| 613 |
if shift >= 64 { |
| 614 |
return ErrIntOverflowGenerated |
| 615 |
} |
| 616 |
if iNdEx >= l { |
| 617 |
return io.ErrUnexpectedEOF |
| 618 |
} |
| 619 |
b := dAtA[iNdEx] |
| 620 |
iNdEx++ |
| 621 |
m.T |= (Triangle(b) & 0x7F) << shift |
| 622 |
if b < 0x80 { |
| 623 |
break |
| 624 |
} |
| 625 |
} |
| 626 |
default: |
| 627 |
iNdEx = preIndex |
| 628 |
skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 629 |
if err != nil { |
| 630 |
return err |
| 631 |
} |
| 632 |
if skippy < 0 { |
| 633 |
return ErrInvalidLengthGenerated |
| 634 |
} |
| 635 |
if (iNdEx + skippy) > l { |
| 636 |
return io.ErrUnexpectedEOF |
| 637 |
} |
| 638 |
iNdEx += skippy |
| 639 |
} |
| 640 |
} |
| 641 |
|
| 642 |
if iNdEx > l { |
| 643 |
return io.ErrUnexpectedEOF |
| 644 |
} |
| 645 |
return nil |
| 646 |
} |
| 647 |
func (m *Dense) Unmarshal(dAtA []byte) error { |
| 648 |
l := len(dAtA) |
| 649 |
iNdEx := 0 |
| 650 |
for iNdEx < l { |
| 651 |
preIndex := iNdEx |
| 652 |
var wire uint64 |
| 653 |
for shift := uint(0); ; shift += 7 { |
| 654 |
if shift >= 64 { |
| 655 |
return ErrIntOverflowGenerated |
| 656 |
} |
| 657 |
if iNdEx >= l { |
| 658 |
return io.ErrUnexpectedEOF |
| 659 |
} |
| 660 |
b := dAtA[iNdEx] |
| 661 |
iNdEx++ |
| 662 |
wire |= (uint64(b) & 0x7F) << shift |
| 663 |
if b < 0x80 { |
| 664 |
break |
| 665 |
} |
| 666 |
} |
| 667 |
fieldNum := int32(wire >> 3) |
| 668 |
wireType := int(wire & 0x7) |
| 669 |
if wireType == 4 { |
| 670 |
return fmt.Errorf("proto: Dense: wiretype end group for non-group") |
| 671 |
} |
| 672 |
if fieldNum <= 0 { |
| 673 |
return fmt.Errorf("proto: Dense: illegal tag %d (wire type %d)", fieldNum, wire) |
| 674 |
} |
| 675 |
switch fieldNum { |
| 676 |
case 1: |
| 677 |
if wireType == 0 { |
| 678 |
var v int32 |
| 679 |
for shift := uint(0); ; shift += 7 { |
| 680 |
if shift >= 64 { |
| 681 |
return ErrIntOverflowGenerated |
| 682 |
} |
| 683 |
if iNdEx >= l { |
| 684 |
return io.ErrUnexpectedEOF |
| 685 |
} |
| 686 |
b := dAtA[iNdEx] |
| 687 |
iNdEx++ |
| 688 |
v |= (int32(b) & 0x7F) << shift |
| 689 |
if b < 0x80 { |
| 690 |
break |
| 691 |
} |
| 692 |
} |
| 693 |
m.Shape = append(m.Shape, v) |
| 694 |
} else if wireType == 2 { |
| 695 |
var packedLen int |
| 696 |
for shift := uint(0); ; shift += 7 { |
| 697 |
if shift >= 64 { |
| 698 |
return ErrIntOverflowGenerated |
| 699 |
} |
| 700 |
if iNdEx >= l { |
| 701 |
return io.ErrUnexpectedEOF |
| 702 |
} |
| 703 |
b := dAtA[iNdEx] |
| 704 |
iNdEx++ |
| 705 |
packedLen |= (int(b) & 0x7F) << shift |
| 706 |
if b < 0x80 { |
| 707 |
break |
| 708 |
} |
| 709 |
} |
| 710 |
if packedLen < 0 { |
| 711 |
return ErrInvalidLengthGenerated |
| 712 |
} |
| 713 |
postIndex := iNdEx + packedLen |
| 714 |
if postIndex > l { |
| 715 |
return io.ErrUnexpectedEOF |
| 716 |
} |
| 717 |
for iNdEx < postIndex { |
| 718 |
var v int32 |
| 719 |
for shift := uint(0); ; shift += 7 { |
| 720 |
if shift >= 64 { |
| 721 |
return ErrIntOverflowGenerated |
| 722 |
} |
| 723 |
if iNdEx >= l { |
| 724 |
return io.ErrUnexpectedEOF |
| 725 |
} |
| 726 |
b := dAtA[iNdEx] |
| 727 |
iNdEx++ |
| 728 |
v |= (int32(b) & 0x7F) << shift |
| 729 |
if b < 0x80 { |
| 730 |
break |
| 731 |
} |
| 732 |
} |
| 733 |
m.Shape = append(m.Shape, v) |
| 734 |
} |
| 735 |
} else { |
| 736 |
return fmt.Errorf("proto: wrong wireType = %d for field Shape", wireType) |
| 737 |
} |
| 738 |
case 2: |
| 739 |
if wireType == 0 { |
| 740 |
var v int32 |
| 741 |
for shift := uint(0); ; shift += 7 { |
| 742 |
if shift >= 64 { |
| 743 |
return ErrIntOverflowGenerated |
| 744 |
} |
| 745 |
if iNdEx >= l { |
| 746 |
return io.ErrUnexpectedEOF |
| 747 |
} |
| 748 |
b := dAtA[iNdEx] |
| 749 |
iNdEx++ |
| 750 |
v |= (int32(b) & 0x7F) << shift |
| 751 |
if b < 0x80 { |
| 752 |
break |
| 753 |
} |
| 754 |
} |
| 755 |
m.Strides = append(m.Strides, v) |
| 756 |
} else if wireType == 2 { |
| 757 |
var packedLen int |
| 758 |
for shift := uint(0); ; shift += 7 { |
| 759 |
if shift >= 64 { |
| 760 |
return ErrIntOverflowGenerated |
| 761 |
} |
| 762 |
if iNdEx >= l { |
| 763 |
return io.ErrUnexpectedEOF |
| 764 |
} |
| 765 |
b := dAtA[iNdEx] |
| 766 |
iNdEx++ |
| 767 |
packedLen |= (int(b) & 0x7F) << shift |
| 768 |
if b < 0x80 { |
| 769 |
break |
| 770 |
} |
| 771 |
} |
| 772 |
if packedLen < 0 { |
| 773 |
return ErrInvalidLengthGenerated |
| 774 |
} |
| 775 |
postIndex := iNdEx + packedLen |
| 776 |
if postIndex > l { |
| 777 |
return io.ErrUnexpectedEOF |
| 778 |
} |
| 779 |
for iNdEx < postIndex { |
| 780 |
var v int32 |
| 781 |
for shift := uint(0); ; shift += 7 { |
| 782 |
if shift >= 64 { |
| 783 |
return ErrIntOverflowGenerated |
| 784 |
} |
| 785 |
if iNdEx >= l { |
| 786 |
return io.ErrUnexpectedEOF |
| 787 |
} |
| 788 |
b := dAtA[iNdEx] |
| 789 |
iNdEx++ |
| 790 |
v |= (int32(b) & 0x7F) << shift |
| 791 |
if b < 0x80 { |
| 792 |
break |
| 793 |
} |
| 794 |
} |
| 795 |
m.Strides = append(m.Strides, v) |
| 796 |
} |
| 797 |
} else { |
| 798 |
return fmt.Errorf("proto: wrong wireType = %d for field Strides", wireType) |
| 799 |
} |
| 800 |
case 3: |
| 801 |
if wireType != 0 { |
| 802 |
return fmt.Errorf("proto: wrong wireType = %d for field O", wireType) |
| 803 |
} |
| 804 |
m.O = 0 |
| 805 |
for shift := uint(0); ; shift += 7 { |
| 806 |
if shift >= 64 { |
| 807 |
return ErrIntOverflowGenerated |
| 808 |
} |
| 809 |
if iNdEx >= l { |
| 810 |
return io.ErrUnexpectedEOF |
| 811 |
} |
| 812 |
b := dAtA[iNdEx] |
| 813 |
iNdEx++ |
| 814 |
m.O |= (DataOrder(b) & 0x7F) << shift |
| 815 |
if b < 0x80 { |
| 816 |
break |
| 817 |
} |
| 818 |
} |
| 819 |
case 4: |
| 820 |
if wireType != 0 { |
| 821 |
return fmt.Errorf("proto: wrong wireType = %d for field T", wireType) |
| 822 |
} |
| 823 |
m.T = 0 |
| 824 |
for shift := uint(0); ; shift += 7 { |
| 825 |
if shift >= 64 { |
| 826 |
return ErrIntOverflowGenerated |
| 827 |
} |
| 828 |
if iNdEx >= l { |
| 829 |
return io.ErrUnexpectedEOF |
| 830 |
} |
| 831 |
b := dAtA[iNdEx] |
| 832 |
iNdEx++ |
| 833 |
m.T |= (Triangle(b) & 0x7F) << shift |
| 834 |
if b < 0x80 { |
| 835 |
break |
| 836 |
} |
| 837 |
} |
| 838 |
case 5: |
| 839 |
if wireType != 2 { |
| 840 |
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) |
| 841 |
} |
| 842 |
var stringLen uint64 |
| 843 |
for shift := uint(0); ; shift += 7 { |
| 844 |
if shift >= 64 { |
| 845 |
return ErrIntOverflowGenerated |
| 846 |
} |
| 847 |
if iNdEx >= l { |
| 848 |
return io.ErrUnexpectedEOF |
| 849 |
} |
| 850 |
b := dAtA[iNdEx] |
| 851 |
iNdEx++ |
| 852 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 853 |
if b < 0x80 { |
| 854 |
break |
| 855 |
} |
| 856 |
} |
| 857 |
intStringLen := int(stringLen) |
| 858 |
if intStringLen < 0 { |
| 859 |
return ErrInvalidLengthGenerated |
| 860 |
} |
| 861 |
postIndex := iNdEx + intStringLen |
| 862 |
if postIndex > l { |
| 863 |
return io.ErrUnexpectedEOF |
| 864 |
} |
| 865 |
m.Type = string(dAtA[iNdEx:postIndex]) |
| 866 |
iNdEx = postIndex |
| 867 |
case 6: |
| 868 |
if wireType != 2 { |
| 869 |
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) |
| 870 |
} |
| 871 |
var byteLen int |
| 872 |
for shift := uint(0); ; shift += 7 { |
| 873 |
if shift >= 64 { |
| 874 |
return ErrIntOverflowGenerated |
| 875 |
} |
| 876 |
if iNdEx >= l { |
| 877 |
return io.ErrUnexpectedEOF |
| 878 |
} |
| 879 |
b := dAtA[iNdEx] |
| 880 |
iNdEx++ |
| 881 |
byteLen |= (int(b) & 0x7F) << shift |
| 882 |
if b < 0x80 { |
| 883 |
break |
| 884 |
} |
| 885 |
} |
| 886 |
if byteLen < 0 { |
| 887 |
return ErrInvalidLengthGenerated |
| 888 |
} |
| 889 |
postIndex := iNdEx + byteLen |
| 890 |
if postIndex > l { |
| 891 |
return io.ErrUnexpectedEOF |
| 892 |
} |
| 893 |
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) |
| 894 |
if m.Data == nil { |
| 895 |
m.Data = []byte{} |
| 896 |
} |
| 897 |
iNdEx = postIndex |
| 898 |
default: |
| 899 |
iNdEx = preIndex |
| 900 |
skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 901 |
if err != nil { |
| 902 |
return err |
| 903 |
} |
| 904 |
if skippy < 0 { |
| 905 |
return ErrInvalidLengthGenerated |
| 906 |
} |
| 907 |
if (iNdEx + skippy) > l { |
| 908 |
return io.ErrUnexpectedEOF |
| 909 |
} |
| 910 |
iNdEx += skippy |
| 911 |
} |
| 912 |
} |
| 913 |
|
| 914 |
if iNdEx > l { |
| 915 |
return io.ErrUnexpectedEOF |
| 916 |
} |
| 917 |
return nil |
| 918 |
} |
| 919 |
func (m *MaskedDense) Unmarshal(dAtA []byte) error { |
| 920 |
l := len(dAtA) |
| 921 |
iNdEx := 0 |
| 922 |
for iNdEx < l { |
| 923 |
preIndex := iNdEx |
| 924 |
var wire uint64 |
| 925 |
for shift := uint(0); ; shift += 7 { |
| 926 |
if shift >= 64 { |
| 927 |
return ErrIntOverflowGenerated |
| 928 |
} |
| 929 |
if iNdEx >= l { |
| 930 |
return io.ErrUnexpectedEOF |
| 931 |
} |
| 932 |
b := dAtA[iNdEx] |
| 933 |
iNdEx++ |
| 934 |
wire |= (uint64(b) & 0x7F) << shift |
| 935 |
if b < 0x80 { |
| 936 |
break |
| 937 |
} |
| 938 |
} |
| 939 |
fieldNum := int32(wire >> 3) |
| 940 |
wireType := int(wire & 0x7) |
| 941 |
if wireType == 4 { |
| 942 |
return fmt.Errorf("proto: MaskedDense: wiretype end group for non-group") |
| 943 |
} |
| 944 |
if fieldNum <= 0 { |
| 945 |
return fmt.Errorf("proto: MaskedDense: illegal tag %d (wire type %d)", fieldNum, wire) |
| 946 |
} |
| 947 |
switch fieldNum { |
| 948 |
case 1: |
| 949 |
if wireType == 0 { |
| 950 |
var v int32 |
| 951 |
for shift := uint(0); ; shift += 7 { |
| 952 |
if shift >= 64 { |
| 953 |
return ErrIntOverflowGenerated |
| 954 |
} |
| 955 |
if iNdEx >= l { |
| 956 |
return io.ErrUnexpectedEOF |
| 957 |
} |
| 958 |
b := dAtA[iNdEx] |
| 959 |
iNdEx++ |
| 960 |
v |= (int32(b) & 0x7F) << shift |
| 961 |
if b < 0x80 { |
| 962 |
break |
| 963 |
} |
| 964 |
} |
| 965 |
m.Shape = append(m.Shape, v) |
| 966 |
} else if wireType == 2 { |
| 967 |
var packedLen int |
| 968 |
for shift := uint(0); ; shift += 7 { |
| 969 |
if shift >= 64 { |
| 970 |
return ErrIntOverflowGenerated |
| 971 |
} |
| 972 |
if iNdEx >= l { |
| 973 |
return io.ErrUnexpectedEOF |
| 974 |
} |
| 975 |
b := dAtA[iNdEx] |
| 976 |
iNdEx++ |
| 977 |
packedLen |= (int(b) & 0x7F) << shift |
| 978 |
if b < 0x80 { |
| 979 |
break |
| 980 |
} |
| 981 |
} |
| 982 |
if packedLen < 0 { |
| 983 |
return ErrInvalidLengthGenerated |
| 984 |
} |
| 985 |
postIndex := iNdEx + packedLen |
| 986 |
if postIndex > l { |
| 987 |
return io.ErrUnexpectedEOF |
| 988 |
} |
| 989 |
for iNdEx < postIndex { |
| 990 |
var v int32 |
| 991 |
for shift := uint(0); ; shift += 7 { |
| 992 |
if shift >= 64 { |
| 993 |
return ErrIntOverflowGenerated |
| 994 |
} |
| 995 |
if iNdEx >= l { |
| 996 |
return io.ErrUnexpectedEOF |
| 997 |
} |
| 998 |
b := dAtA[iNdEx] |
| 999 |
iNdEx++ |
| 1000 |
v |= (int32(b) & 0x7F) << shift |
| 1001 |
if b < 0x80 { |
| 1002 |
break |
| 1003 |
} |
| 1004 |
} |
| 1005 |
m.Shape = append(m.Shape, v) |
| 1006 |
} |
| 1007 |
} else { |
| 1008 |
return fmt.Errorf("proto: wrong wireType = %d for field Shape", wireType) |
| 1009 |
} |
| 1010 |
case 2: |
| 1011 |
if wireType == 0 { |
| 1012 |
var v int32 |
| 1013 |
for shift := uint(0); ; shift += 7 { |
| 1014 |
if shift >= 64 { |
| 1015 |
return ErrIntOverflowGenerated |
| 1016 |
} |
| 1017 |
if iNdEx >= l { |
| 1018 |
return io.ErrUnexpectedEOF |
| 1019 |
} |
| 1020 |
b := dAtA[iNdEx] |
| 1021 |
iNdEx++ |
| 1022 |
v |= (int32(b) & 0x7F) << shift |
| 1023 |
if b < 0x80 { |
| 1024 |
break |
| 1025 |
} |
| 1026 |
} |
| 1027 |
m.Strides = append(m.Strides, v) |
| 1028 |
} else if wireType == 2 { |
| 1029 |
var packedLen int |
| 1030 |
for shift := uint(0); ; shift += 7 { |
| 1031 |
if shift >= 64 { |
| 1032 |
return ErrIntOverflowGenerated |
| 1033 |
} |
| 1034 |
if iNdEx >= l { |
| 1035 |
return io.ErrUnexpectedEOF |
| 1036 |
} |
| 1037 |
b := dAtA[iNdEx] |
| 1038 |
iNdEx++ |
| 1039 |
packedLen |= (int(b) & 0x7F) << shift |
| 1040 |
if b < 0x80 { |
| 1041 |
break |
| 1042 |
} |
| 1043 |
} |
| 1044 |
if packedLen < 0 { |
| 1045 |
return ErrInvalidLengthGenerated |
| 1046 |
} |
| 1047 |
postIndex := iNdEx + packedLen |
| 1048 |
if postIndex > l { |
| 1049 |
return io.ErrUnexpectedEOF |
| 1050 |
} |
| 1051 |
for iNdEx < postIndex { |
| 1052 |
var v int32 |
| 1053 |
for shift := uint(0); ; shift += 7 { |
| 1054 |
if shift >= 64 { |
| 1055 |
return ErrIntOverflowGenerated |
| 1056 |
} |
| 1057 |
if iNdEx >= l { |
| 1058 |
return io.ErrUnexpectedEOF |
| 1059 |
} |
| 1060 |
b := dAtA[iNdEx] |
| 1061 |
iNdEx++ |
| 1062 |
v |= (int32(b) & 0x7F) << shift |
| 1063 |
if b < 0x80 { |
| 1064 |
break |
| 1065 |
} |
| 1066 |
} |
| 1067 |
m.Strides = append(m.Strides, v) |
| 1068 |
} |
| 1069 |
} else { |
| 1070 |
return fmt.Errorf("proto: wrong wireType = %d for field Strides", wireType) |
| 1071 |
} |
| 1072 |
case 3: |
| 1073 |
if wireType != 0 { |
| 1074 |
return fmt.Errorf("proto: wrong wireType = %d for field O", wireType) |
| 1075 |
} |
| 1076 |
m.O = 0 |
| 1077 |
for shift := uint(0); ; shift += 7 { |
| 1078 |
if shift >= 64 { |
| 1079 |
return ErrIntOverflowGenerated |
| 1080 |
} |
| 1081 |
if iNdEx >= l { |
| 1082 |
return io.ErrUnexpectedEOF |
| 1083 |
} |
| 1084 |
b := dAtA[iNdEx] |
| 1085 |
iNdEx++ |
| 1086 |
m.O |= (DataOrder(b) & 0x7F) << shift |
| 1087 |
if b < 0x80 { |
| 1088 |
break |
| 1089 |
} |
| 1090 |
} |
| 1091 |
case 4: |
| 1092 |
if wireType != 0 { |
| 1093 |
return fmt.Errorf("proto: wrong wireType = %d for field T", wireType) |
| 1094 |
} |
| 1095 |
m.T = 0 |
| 1096 |
for shift := uint(0); ; shift += 7 { |
| 1097 |
if shift >= 64 { |
| 1098 |
return ErrIntOverflowGenerated |
| 1099 |
} |
| 1100 |
if iNdEx >= l { |
| 1101 |
return io.ErrUnexpectedEOF |
| 1102 |
} |
| 1103 |
b := dAtA[iNdEx] |
| 1104 |
iNdEx++ |
| 1105 |
m.T |= (Triangle(b) & 0x7F) << shift |
| 1106 |
if b < 0x80 { |
| 1107 |
break |
| 1108 |
} |
| 1109 |
} |
| 1110 |
case 5: |
| 1111 |
if wireType != 2 { |
| 1112 |
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) |
| 1113 |
} |
| 1114 |
var stringLen uint64 |
| 1115 |
for shift := uint(0); ; shift += 7 { |
| 1116 |
if shift >= 64 { |
| 1117 |
return ErrIntOverflowGenerated |
| 1118 |
} |
| 1119 |
if iNdEx >= l { |
| 1120 |
return io.ErrUnexpectedEOF |
| 1121 |
} |
| 1122 |
b := dAtA[iNdEx] |
| 1123 |
iNdEx++ |
| 1124 |
stringLen |= (uint64(b) & 0x7F) << shift |
| 1125 |
if b < 0x80 { |
| 1126 |
break |
| 1127 |
} |
| 1128 |
} |
| 1129 |
intStringLen := int(stringLen) |
| 1130 |
if intStringLen < 0 { |
| 1131 |
return ErrInvalidLengthGenerated |
| 1132 |
} |
| 1133 |
postIndex := iNdEx + intStringLen |
| 1134 |
if postIndex > l { |
| 1135 |
return io.ErrUnexpectedEOF |
| 1136 |
} |
| 1137 |
m.Type = string(dAtA[iNdEx:postIndex]) |
| 1138 |
iNdEx = postIndex |
| 1139 |
case 6: |
| 1140 |
if wireType != 2 { |
| 1141 |
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) |
| 1142 |
} |
| 1143 |
var byteLen int |
| 1144 |
for shift := uint(0); ; shift += 7 { |
| 1145 |
if shift >= 64 { |
| 1146 |
return ErrIntOverflowGenerated |
| 1147 |
} |
| 1148 |
if iNdEx >= l { |
| 1149 |
return io.ErrUnexpectedEOF |
| 1150 |
} |
| 1151 |
b := dAtA[iNdEx] |
| 1152 |
iNdEx++ |
| 1153 |
byteLen |= (int(b) & 0x7F) << shift |
| 1154 |
if b < 0x80 { |
| 1155 |
break |
| 1156 |
} |
| 1157 |
} |
| 1158 |
if byteLen < 0 { |
| 1159 |
return ErrInvalidLengthGenerated |
| 1160 |
} |
| 1161 |
postIndex := iNdEx + byteLen |
| 1162 |
if postIndex > l { |
| 1163 |
return io.ErrUnexpectedEOF |
| 1164 |
} |
| 1165 |
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) |
| 1166 |
if m.Data == nil { |
| 1167 |
m.Data = []byte{} |
| 1168 |
} |
| 1169 |
iNdEx = postIndex |
| 1170 |
case 7: |
| 1171 |
if wireType == 0 { |
| 1172 |
var v int |
| 1173 |
for shift := uint(0); ; shift += 7 { |
| 1174 |
if shift >= 64 { |
| 1175 |
return ErrIntOverflowGenerated |
| 1176 |
} |
| 1177 |
if iNdEx >= l { |
| 1178 |
return io.ErrUnexpectedEOF |
| 1179 |
} |
| 1180 |
b := dAtA[iNdEx] |
| 1181 |
iNdEx++ |
| 1182 |
v |= (int(b) & 0x7F) << shift |
| 1183 |
if b < 0x80 { |
| 1184 |
break |
| 1185 |
} |
| 1186 |
} |
| 1187 |
m.Mask = append(m.Mask, bool(v != 0)) |
| 1188 |
} else if wireType == 2 { |
| 1189 |
var packedLen int |
| 1190 |
for shift := uint(0); ; shift += 7 { |
| 1191 |
if shift >= 64 { |
| 1192 |
return ErrIntOverflowGenerated |
| 1193 |
} |
| 1194 |
if iNdEx >= l { |
| 1195 |
return io.ErrUnexpectedEOF |
| 1196 |
} |
| 1197 |
b := dAtA[iNdEx] |
| 1198 |
iNdEx++ |
| 1199 |
packedLen |= (int(b) & 0x7F) << shift |
| 1200 |
if b < 0x80 { |
| 1201 |
break |
| 1202 |
} |
| 1203 |
} |
| 1204 |
if packedLen < 0 { |
| 1205 |
return ErrInvalidLengthGenerated |
| 1206 |
} |
| 1207 |
postIndex := iNdEx + packedLen |
| 1208 |
if postIndex > l { |
| 1209 |
return io.ErrUnexpectedEOF |
| 1210 |
} |
| 1211 |
for iNdEx < postIndex { |
| 1212 |
var v int |
| 1213 |
for shift := uint(0); ; shift += 7 { |
| 1214 |
if shift >= 64 { |
| 1215 |
return ErrIntOverflowGenerated |
| 1216 |
} |
| 1217 |
if iNdEx >= l { |
| 1218 |
return io.ErrUnexpectedEOF |
| 1219 |
} |
| 1220 |
b := dAtA[iNdEx] |
| 1221 |
iNdEx++ |
| 1222 |
v |= (int(b) & 0x7F) << shift |
| 1223 |
if b < 0x80 { |
| 1224 |
break |
| 1225 |
} |
| 1226 |
} |
| 1227 |
m.Mask = append(m.Mask, bool(v != 0)) |
| 1228 |
} |
| 1229 |
} else { |
| 1230 |
return fmt.Errorf("proto: wrong wireType = %d for field Mask", wireType) |
| 1231 |
} |
| 1232 |
case 8: |
| 1233 |
if wireType == 0 { |
| 1234 |
var v int |
| 1235 |
for shift := uint(0); ; shift += 7 { |
| 1236 |
if shift >= 64 { |
| 1237 |
return ErrIntOverflowGenerated |
| 1238 |
} |
| 1239 |
if iNdEx >= l { |
| 1240 |
return io.ErrUnexpectedEOF |
| 1241 |
} |
| 1242 |
b := dAtA[iNdEx] |
| 1243 |
iNdEx++ |
| 1244 |
v |= (int(b) & 0x7F) << shift |
| 1245 |
if b < 0x80 { |
| 1246 |
break |
| 1247 |
} |
| 1248 |
} |
| 1249 |
m.MaskIsSoft = append(m.MaskIsSoft, bool(v != 0)) |
| 1250 |
} else if wireType == 2 { |
| 1251 |
var packedLen int |
| 1252 |
for shift := uint(0); ; shift += 7 { |
| 1253 |
if shift >= 64 { |
| 1254 |
return ErrIntOverflowGenerated |
| 1255 |
} |
| 1256 |
if iNdEx >= l { |
| 1257 |
return io.ErrUnexpectedEOF |
| 1258 |
} |
| 1259 |
b := dAtA[iNdEx] |
| 1260 |
iNdEx++ |
| 1261 |
packedLen |= (int(b) & 0x7F) << shift |
| 1262 |
if b < 0x80 { |
| 1263 |
break |
| 1264 |
} |
| 1265 |
} |
| 1266 |
if packedLen < 0 { |
| 1267 |
return ErrInvalidLengthGenerated |
| 1268 |
} |
| 1269 |
postIndex := iNdEx + packedLen |
| 1270 |
if postIndex > l { |
| 1271 |
return io.ErrUnexpectedEOF |
| 1272 |
} |
| 1273 |
for iNdEx < postIndex { |
| 1274 |
var v int |
| 1275 |
for shift := uint(0); ; shift += 7 { |
| 1276 |
if shift >= 64 { |
| 1277 |
return ErrIntOverflowGenerated |
| 1278 |
} |
| 1279 |
if iNdEx >= l { |
| 1280 |
return io.ErrUnexpectedEOF |
| 1281 |
} |
| 1282 |
b := dAtA[iNdEx] |
| 1283 |
iNdEx++ |
| 1284 |
v |= (int(b) & 0x7F) << shift |
| 1285 |
if b < 0x80 { |
| 1286 |
break |
| 1287 |
} |
| 1288 |
} |
| 1289 |
m.MaskIsSoft = append(m.MaskIsSoft, bool(v != 0)) |
| 1290 |
} |
| 1291 |
} else { |
| 1292 |
return fmt.Errorf("proto: wrong wireType = %d for field MaskIsSoft", wireType) |
| 1293 |
} |
| 1294 |
default: |
| 1295 |
iNdEx = preIndex |
| 1296 |
skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 1297 |
if err != nil { |
| 1298 |
return err |
| 1299 |
} |
| 1300 |
if skippy < 0 { |
| 1301 |
return ErrInvalidLengthGenerated |
| 1302 |
} |
| 1303 |
if (iNdEx + skippy) > l { |
| 1304 |
return io.ErrUnexpectedEOF |
| 1305 |
} |
| 1306 |
iNdEx += skippy |
| 1307 |
} |
| 1308 |
} |
| 1309 |
|
| 1310 |
if iNdEx > l { |
| 1311 |
return io.ErrUnexpectedEOF |
| 1312 |
} |
| 1313 |
return nil |
| 1314 |
} |
| 1315 |
func skipGenerated(dAtA []byte) (n int, err error) { |
| 1316 |
l := len(dAtA) |
| 1317 |
iNdEx := 0 |
| 1318 |
for iNdEx < l { |
| 1319 |
var wire uint64 |
| 1320 |
for shift := uint(0); ; shift += 7 { |
| 1321 |
if shift >= 64 { |
| 1322 |
return 0, ErrIntOverflowGenerated |
| 1323 |
} |
| 1324 |
if iNdEx >= l { |
| 1325 |
return 0, io.ErrUnexpectedEOF |
| 1326 |
} |
| 1327 |
b := dAtA[iNdEx] |
| 1328 |
iNdEx++ |
| 1329 |
wire |= (uint64(b) & 0x7F) << shift |
| 1330 |
if b < 0x80 { |
| 1331 |
break |
| 1332 |
} |
| 1333 |
} |
| 1334 |
wireType := int(wire & 0x7) |
| 1335 |
switch wireType { |
| 1336 |
case 0: |
| 1337 |
for shift := uint(0); ; shift += 7 { |
| 1338 |
if shift >= 64 { |
| 1339 |
return 0, ErrIntOverflowGenerated |
| 1340 |
} |
| 1341 |
if iNdEx >= l { |
| 1342 |
return 0, io.ErrUnexpectedEOF |
| 1343 |
} |
| 1344 |
iNdEx++ |
| 1345 |
if dAtA[iNdEx-1] < 0x80 { |
| 1346 |
break |
| 1347 |
} |
| 1348 |
} |
| 1349 |
return iNdEx, nil |
| 1350 |
case 1: |
| 1351 |
iNdEx += 8 |
| 1352 |
return iNdEx, nil |
| 1353 |
case 2: |
| 1354 |
var length int |
| 1355 |
for shift := uint(0); ; shift += 7 { |
| 1356 |
if shift >= 64 { |
| 1357 |
return 0, ErrIntOverflowGenerated |
| 1358 |
} |
| 1359 |
if iNdEx >= l { |
| 1360 |
return 0, io.ErrUnexpectedEOF |
| 1361 |
} |
| 1362 |
b := dAtA[iNdEx] |
| 1363 |
iNdEx++ |
| 1364 |
length |= (int(b) & 0x7F) << shift |
| 1365 |
if b < 0x80 { |
| 1366 |
break |
| 1367 |
} |
| 1368 |
} |
| 1369 |
iNdEx += length |
| 1370 |
if length < 0 { |
| 1371 |
return 0, ErrInvalidLengthGenerated |
| 1372 |
} |
| 1373 |
return iNdEx, nil |
| 1374 |
case 3: |
| 1375 |
for { |
| 1376 |
var innerWire uint64 |
| 1377 |
var start int = iNdEx |
| 1378 |
for shift := uint(0); ; shift += 7 { |
| 1379 |
if shift >= 64 { |
| 1380 |
return 0, ErrIntOverflowGenerated |
| 1381 |
} |
| 1382 |
if iNdEx >= l { |
| 1383 |
return 0, io.ErrUnexpectedEOF |
| 1384 |
} |
| 1385 |
b := dAtA[iNdEx] |
| 1386 |
iNdEx++ |
| 1387 |
innerWire |= (uint64(b) & 0x7F) << shift |
| 1388 |
if b < 0x80 { |
| 1389 |
break |
| 1390 |
} |
| 1391 |
} |
| 1392 |
innerWireType := int(innerWire & 0x7) |
| 1393 |
if innerWireType == 4 { |
| 1394 |
break |
| 1395 |
} |
| 1396 |
next, err := skipGenerated(dAtA[start:]) |
| 1397 |
if err != nil { |
| 1398 |
return 0, err |
| 1399 |
} |
| 1400 |
iNdEx = start + next |
| 1401 |
} |
| 1402 |
return iNdEx, nil |
| 1403 |
case 4: |
| 1404 |
return iNdEx, nil |
| 1405 |
case 5: |
| 1406 |
iNdEx += 4 |
| 1407 |
return iNdEx, nil |
| 1408 |
default: |
| 1409 |
return 0, fmt.Errorf("proto: illegal wireType %d", wireType) |
| 1410 |
} |
| 1411 |
} |
| 1412 |
panic("unreachable") |
| 1413 |
} |
| 1414 |
|
| 1415 |
var ( |
| 1416 |
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") |
| 1417 |
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") |
| 1418 |
) |
| 1419 |
|
| 1420 |
func init() { |
| 1421 |
proto.RegisterFile("gorgonia.org/tensor/internal/serialization/pb/generated.proto", fileDescriptorGenerated) |
| 1422 |
} |
| 1423 |
|
| 1424 |
var fileDescriptorGenerated = []byte{ |
| 1425 |
// 482 bytes of a gzipped FileDescriptorProto |
| 1426 |
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x93, 0x4f, 0x6b, 0x13, 0x41, |
| 1427 |
0x18, 0xc6, 0x77, 0x92, 0x6e, 0x9b, 0x4c, 0x13, 0x0d, 0x43, 0x0f, 0x43, 0x94, 0xcd, 0xd8, 0xd3, |
| 1428 |
0x22, 0x74, 0x17, 0xf4, 0x20, 0x08, 0x1e, 0x5a, 0x1b, 0x24, 0x90, 0x7f, 0x4c, 0x52, 0x44, 0x2f, |
| 1429 |
0x61, 0xb6, 0x3b, 0xd9, 0x0e, 0x4d, 0x76, 0x96, 0x99, 0x29, 0x52, 0xef, 0x42, 0xcd, 0x27, 0xf0, |
| 1430 |
0x12, 0xa8, 0xda, 0x83, 0x1f, 0xc3, 0xa3, 0x17, 0xc1, 0x4f, 0x20, 0x92, 0x7e, 0x01, 0xcf, 0x9e, |
| 1431 |
0x64, 0x27, 0x44, 0xe2, 0xd1, 0x9b, 0x3d, 0xcd, 0xf3, 0xfc, 0x66, 0x9e, 0x77, 0xde, 0x97, 0x61, |
| 1432 |
0xe0, 0x93, 0x44, 0xaa, 0x44, 0xa6, 0x82, 0x05, 0x52, 0x25, 0xa1, 0xe1, 0xa9, 0x96, 0x2a, 0x14, |
| 1433 |
0xa9, 0xe1, 0x2a, 0x65, 0x93, 0x50, 0x73, 0x25, 0xd8, 0x44, 0xbc, 0x66, 0x46, 0xc8, 0x34, 0xcc, |
| 1434 |
0xa2, 0x30, 0xe1, 0x29, 0x57, 0xcc, 0xf0, 0x38, 0xc8, 0x94, 0x34, 0x12, 0xed, 0xad, 0xc7, 0x83, |
| 1435 |
0x65, 0x3c, 0x58, 0xc5, 0x83, 0xbf, 0xe2, 0x41, 0x16, 0xd5, 0xf7, 0x12, 0x61, 0x4e, 0xce, 0xa2, |
| 1436 |
0xe0, 0x58, 0x4e, 0xc3, 0x44, 0x26, 0x32, 0xb4, 0x55, 0xa2, 0xb3, 0xb1, 0x75, 0xd6, 0x58, 0xb5, |
| 1437 |
0xac, 0xbe, 0xfb, 0x01, 0xc0, 0xc2, 0x7e, 0x1f, 0xed, 0x40, 0x57, 0x9f, 0xb0, 0x8c, 0x63, 0x40, |
| 1438 |
0x8a, 0xbe, 0x4b, 0x97, 0x06, 0x61, 0xb8, 0xa5, 0x8d, 0x12, 0x31, 0xd7, 0xb8, 0x60, 0xf9, 0xca, |
| 1439 |
0xa2, 0x3b, 0x10, 0x48, 0x5c, 0x24, 0xc0, 0xaf, 0x1e, 0x54, 0x7f, 0x7d, 0x6f, 0x94, 0x0f, 0x99, |
| 1440 |
0x61, 0x3d, 0x15, 0x73, 0x45, 0x81, 0x44, 0x4d, 0x08, 0x0c, 0xde, 0x20, 0xc0, 0xbf, 0xf5, 0xe0, |
| 1441 |
0x51, 0xf0, 0x4f, 0xdd, 0x07, 0x43, 0x25, 0x58, 0x9a, 0x4c, 0x38, 0x05, 0xe6, 0x71, 0xe9, 0xe2, |
| 1442 |
0xb2, 0xe1, 0xfc, 0x7c, 0xdf, 0x70, 0x76, 0xbf, 0x02, 0xe8, 0x1e, 0xf2, 0x54, 0xf3, 0xff, 0xb1, |
| 1443 |
0x4f, 0x84, 0xe0, 0x86, 0x39, 0xcf, 0x38, 0x76, 0x09, 0xf0, 0xcb, 0xd4, 0xea, 0x9c, 0xc5, 0xcc, |
| 1444 |
0x30, 0xbc, 0x49, 0x80, 0x5f, 0xa1, 0x56, 0xaf, 0xcd, 0xf3, 0xb6, 0x00, 0xb7, 0x3b, 0x4c, 0x9f, |
| 1445 |
0xf2, 0xf8, 0xc6, 0x4f, 0x95, 0xb3, 0x29, 0xd3, 0xa7, 0x78, 0x8b, 0x14, 0xfd, 0x12, 0xb5, 0x1a, |
| 1446 |
0x11, 0x58, 0xc9, 0xd7, 0x91, 0xd0, 0x23, 0x2d, 0xc7, 0x06, 0x97, 0xec, 0x1e, 0xcc, 0x59, 0x4b, |
| 1447 |
0x0f, 0xe4, 0x78, 0xed, 0x6d, 0xef, 0xbf, 0x01, 0xb0, 0xb4, 0xba, 0x17, 0xdd, 0x83, 0x95, 0x6e, |
| 1448 |
0x6f, 0x38, 0x1a, 0xd2, 0xd6, 0x7e, 0xf7, 0x59, 0xbb, 0x59, 0x73, 0xea, 0xb7, 0x67, 0x73, 0xb2, |
| 1449 |
0xdd, 0x95, 0xe6, 0xcf, 0x91, 0x1d, 0xe8, 0x1e, 0xf5, 0xfb, 0x4d, 0x5a, 0x03, 0xf5, 0xf2, 0x6c, |
| 1450 |
0x4e, 0xdc, 0xa3, 0x2c, 0xe3, 0x2a, 0xa7, 0xed, 0xde, 0xf3, 0x26, 0xad, 0x15, 0x96, 0xb4, 0x2d, |
| 1451 |
0x5f, 0x71, 0x85, 0xee, 0xc2, 0xf2, 0xe0, 0x45, 0xa7, 0xd3, 0x1c, 0xd2, 0xd6, 0xd3, 0x5a, 0xb1, |
| 1452 |
0x5e, 0x9d, 0xcd, 0x49, 0x79, 0x70, 0x3e, 0x9d, 0x72, 0xa3, 0xc4, 0x71, 0xbd, 0x72, 0xf1, 0xd1, |
| 1453 |
0x73, 0x3e, 0x5d, 0x79, 0xce, 0xe7, 0x2b, 0xcf, 0x39, 0xc0, 0x5f, 0x16, 0x1e, 0xf8, 0xb6, 0xf0, |
| 1454 |
0xc0, 0x8f, 0x85, 0xe7, 0xbc, 0xbb, 0xf6, 0x9c, 0xcb, 0x6b, 0x0f, 0xbc, 0x2c, 0x64, 0x51, 0xb4, |
| 1455 |
0x69, 0x7f, 0xca, 0xc3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xff, 0xbb, 0x8f, 0xc8, 0x03, |
| 1456 |
0x00, 0x00, |
| 1457 |
} |