computeFlatSize static method
Calculates number of elements in the buffer.
Implementation
static int computeFlatSize(List<int> shape) {
SupportPreconditions.checkNotNull(shape, message: "Shape cannot be null.");
int prod = 1;
for (int s in shape) {
prod = prod * s;
}
return prod;
}