| 38 | sizeof(int), sizeof(char), |
| 39 | sizeof(double), sizeof(unsigned char)}; |
| 40 | inline size_t SizeOf(DataType t) { |
| 41 | static_assert(kNumDataType == sizeof(kDataWidth) / sizeof(size_t), |
| 42 | "Num of data types not match num of data width"); |
| 43 | CHECK_GT(kNumDataType, t); |
| 44 | return kDataWidth[t]; |
| 45 | } |
| 46 | |
| 47 | /// A Tensor instance is a multi-dimensional array resident on a Device |
| 48 | /// (default device is the host CPU). The internal data is allocated in lazy |
no outgoing calls
no test coverage detected