makeCShape converts a shape specified in C.int64_t into a Shape.
(shape []C.int64_t)
| 26 | |
| 27 | // makeCShape converts a shape specified in C.int64_t into a Shape. |
| 28 | func makeCShape(shape []C.int64_t) Shape { |
| 29 | s := Shape{dims: make([]int64, len(shape))} |
| 30 | for i, n := range shape { |
| 31 | s.dims[i] = int64(n) |
| 32 | } |
| 33 | return s |
| 34 | } |
| 35 | |
| 36 | // Attr returns the value of an attribute on op. It returns an error if the |
| 37 | // attribute does not exist. |
no test coverage detected