Array size() function

Julian C. Cummings cummings at linkline.com
Wed Apr 18 08:54:17 UTC 2001


Hi,

One of the guys at Caltech using Pooma pointed 
out to me that there is no size() function in
the Array interface to return the total number 
of elements.  There is a function length(int d)
that gives the length of axis d.  But for a 1D
Array or a DynamicArray, it seems odd to say
length(0).  The length(int) function is written
using the Domain of the Array, and all Domains
provide a size() function.  So it seems sensible
to add a size() function in Array that would just
pass on the request to the Domain.  Is that OK
with everyone?  We should check that we are 
returning an appropriate size_type, such as long.

Julian C.


Dr. Julian C. Cummings
Staff Scientist, CACR/Caltech
(626) 395-2543
cummings at cacr.caltech.edu
 



More information about the pooma-dev mailing list