rainwoodman / vast

vala and scientific numerical computation
11 stars 1 forks source link

Add a 'MultiIterator' #21

Open arteymix opened 7 years ago

arteymix commented 7 years ago

As said over the line, we will use this for broadcasting n-ary operators (e.g. n-element-wise operations) and implement tensor products. For contracting dimensions, we need a more specialized iterator or a local implementation.

rainwoodman commented 7 years ago

Some QAing then merge?

arteymix commented 7 years ago

We can treat broadcasting later if you prefer, because it will require some decisions. I guess we can only work out compatible shape for now.

arteymix commented 7 years ago

I wonder if the MultiIterator should simply be a shape-compatible iterator and we would only need to do something like:

var iterator = new MultiIterator ({a, b.broadcast_to (a.shape)});

Then only focus on providing extra information for iterating more efficiently (e.g. provide the current stride and number of scalars remaining in that setup).

rainwoodman commented 7 years ago
arteymix commented 7 years ago

It seems that we need to finish improving Iterator first before attacking this one. I really like the latest work :+1: