Menu

#4 current changes to blitz

Unstable (example)
closed
None
5
2018-09-22
2002-10-30
No

Anyways, before i say anything, my yahoo account has
been locked after i changed my password :-( .So, if you
want to contact me, email me at
mdsuresh@rediffmail.com.

May be, someone can show me nice documentation on
how to use diff and CVS. Then, i will just send u the diff
instead.

I haven't compiled most of the code yet. I am posting
this code only because i think it is better to coordinate
our activities.

anyways, i have changed blitz itself in some important
ways.

As usual, i have implemented newer algorithms, now
under the alg subdirectory. The code is nicely formatted
and gringed with asserts and prechecks so that error
tracing is easier now.

The most prevalent change is slicing.

That is suppose: u have Array<int, 3> A(4,4,3);
A( 4, Range(2, 3) ) is same as A( 4, Range(2,3) ,
Range::all()) . I have also added new _x classes for
slicing.

Secondly, i have add lhs and rhs functions and their
relavent classes to the blitz library so that we can return
multiple parameters.

ie. result = rhs( int(2) , Array<int,2>(2,2) , float(3) )
returns 3 parameters.

int a; Array<int,2> b(2,2); float c;
and lhs( a, b , c) = result; This will automaically set a, b,
c to their appropriate values.
Moreover, it is also possible to do.
lhs( a, ref(b), c) = result. Now, b references the array
inside the 2 result.

I have also added support for Null Ranges.

ie. Array<int, 1> A;
A( Range(1,-1,1) ) = is an empty slice.

Then, ofcourse, now, there is a nice way for
multicomponent object to expose themselves.

struct Sample {
int a, b, c;
};

EXPOSE_MEMBER_3( Sample, int, a,b,c )

Array<Sample, 1> A;
A->a() is now possible.

Moreover, i will also be changing List initializers with
comma operators so that they allow arrays to be
inserted.

That is:

Array<int, 1> a(2), b(1);
Array<int, 2> c(2,2);
a = 2; b = 1;
c = a ,
b , 0;

so that c is
2 2
1 0

I have also added a readme.txt file to the alg directory. It
loosely says what it is about.

Moreover, i am thinking of implementing auto evaluation
of multistage expressions, so that compilers dont get
confused by complicated expression.

...just a thought

Discussion

  • Suresh kumar

    Suresh kumar - 2002-10-30
     
  • Julian Cummings

    Julian Cummings - 2003-10-23
    • assigned_to: nobody --> julianc
     
  • Sylwester Arabas

    • status: open --> closed
     
  • Sylwester Arabas

     

Log in to post a comment.

MongoDB Logo MongoDB