Blitz logo

Blitz Devel :

From: Julian C. Cummings (cummings_at_[hidden])
Date: 2003-12-04 14:07:41


I guess I'm still puzzled by the need for the delimiter tags. Why can't you
just pass Arrays to the ListInitialization class using the comma operator as
it is? Is the issue of performance really so critical here? Presumably
this happens only once in an application.
Also, you are introducing lots of overhead already in terms of having a
switch that selects which initializer class to use based on the Array rank.
The extended list initializer class is probably much slower than the
original because it is slicing off the top row of the Array each time
delim<';'> is encountered.

Perhaps this special initialization syntax should be reserved for the blitz
Matrix class. The concept of filling "rows" only makes sense for a 2D
object anyway. If you restricted yourself to Matrix objects, you could
probably make the initializer much more efficient.

Regards, Julian C.

> -----Original Message-----
> From: blitz-dev-bounces_at_[hidden]
> [mailto:blitz-dev-bounces_at_[hidden]] On Behalf Of
> Sureshkumar Devanathan
> Sent: Wednesday, December 03, 2003 11:56 AM
> To: Support list for Blitz++
> Subject: [Blitz-dev] Re: [Blitz-support] About delim<';'>()
>
>
>
> The delim<';'>() concept goes lot more futher than padding zeros.
>
> For example:
>
>
> Array<int,1> a(1), b(2), c(3);
>
> a = 1;
> b = 2,3;
>
> c = delim<'['>() a , b , delim<']'>();
>
> // c = 1,2,3
>
> The delim<'['>() has lot more overhead than regular assignment like
>
> b = 2,3;
>
> because it has more features and it can handle array
> embedding, etc. But this overhead may not always be
> preferred. So, when that's the case, the programmer, can just
> revert to the old and simple
>
> b = 2,3
>
> instead of
>
> b = delim<'['>() , 2 , 3 , delim<']'>();
>
>
> -suresh
>
> _______________________________________________
> Blitz-dev mailing list
> Blitz-dev_at_[hidden]
> http://www.oonumerics.org/mailman/listinfo.cgi> /blitz-dev
>