func (ndr NDRange) ComputeSize() int {
	size := 1
	for _, fi := range ndr.Iths {
		size *= fi.Size
	}
	return size
}
ComputeSize returns the number of elements in this range.
package ranger
type ND []int
type NDShape ND
func (nds NDShape) ToIth(nd ND) int {
	var i int
	for j := range nd {
		i = i*nds[j] + nd[j]
	}
	return i
}
func (nds NDShape) FromIth(i int) ND {
	dim := len(nds)
	p := make([]int, dim)
	for j := dim - 1; j > -1; j-- {
		p[j] = i % nds[j]
		i /= nds[j]
	}
	return ND(p)
}
type NDRange struct {
	Shape NDShape
	Iths  []FiniteIth
}