[Oberon] Oberon-V?

Felix Friedrich friedrich at gsf.de
Tue Mar 1 10:10:33 CET 2005


Hi John,

> I've been thinking about this for a while, and
> I'm having a hard time picturing what you are
> attempting to do.  When I think of vector math
> I think of things like "add 1000 elements of
> array1 to 1000 elements of array2".  Such
> operations should not require any procedure
> overhead beyond the initial procedure call.
That's exactly what I was thinking of when I wrote the ArrayXd* modules. 
  In fact, they are based on the same idea as Patrick's MulitArray 
package. The initial goal was to have a most generic solution (without 
loosing efficiency). Adding one vector to another, for example, was 
implemented in low level modules (Array1d*) and did not require 
procedure overheads beyond the initial procedure call. The array part of 
CAPO has been designed for fast access in various dimensions. For 
example think of computing the product of two matrices: one has to be 
accessed column-wise and the other row-wise. If the matrices are large 
enough then cache-missings occur while computing the product. This 
problem gets more important when you deal with images or stacks of 
images and want to compute convolutions etc. Therefore in CAPO there is 
a mechanism to optimize matrices for access in different dimensions. All 
index-computations (plus global index checks)  have been implemented in 
inline-Assembler.
The many procedure calls on the object level will have to be reduced and 
in parts be replaced by inline operators. This is work in progress.
> Also, with respect to fast array access for
> dimensions higher than 1, have you looked
> at the MultiArray package?
Yes, there the old efficency problem is also present since computing the 
index means calling a procedure. The basic principle, however, is the same.

Felix.




More information about the Oberon mailing list