github.com/wzzhu/tensor@v0.9.24/internal/serialization/pb/dense.go (about) 1 package pb 2 3 //proteus:generate 4 type DataOrder byte 5 6 // the reason for spreading the states out is because proteaus cannot handle non-iota tates 7 const ( 8 RowMajorContiguous = iota 9 RowMajorNonContiguous 10 ColMajorContiguous 11 ColMajorNonContiguous 12 ) 13 14 //proteus:generate 15 type Triangle byte 16 17 const ( 18 NotTriangle Triangle = iota 19 Upper 20 Lower 21 Symmetric 22 ) 23 24 //proteus:generate 25 type AP struct { 26 Shape []int32 27 Strides []int32 28 29 O DataOrder 30 T Triangle 31 } 32 33 //proteus:generate 34 type Dense struct { 35 AP 36 Type string // type name 37 Data []byte 38 } 39 40 //proteus:generate 41 type MaskedDense struct { 42 Dense 43 Mask []bool 44 MaskIsSoft []bool 45 }