Blitz logo

Blitz Support :

From: Einar Otnes (einar.otnes_at_[hidden])
Date: 2003-04-23 14:26:13


I have just installed blitz-20021003 on my computer with RH9.0 and it
appears that my installation of Blitz does not support
BZ_PARTIAL_ORDERING even if its defined in config.h. I'm not allowed to
slice an array down a dimension like the code below. It won't compile.
For compilation I use g++ -o main main.cpp
-I/usr/local/Blitz++/gcc/include -L/usr/local/Blitz++/gcc/lib -lblitz

If I change the dimension of junk1 from 1 to 2, everything works ok.

If I recall correctly I haven't experienced these problems before with
earlier versions of gcc, am I right?

thanks, Einar Otnes

#include <blitz/array.h>
#include <iostream>

using namespace std;
using namespace blitz;

int main()
{
   Array<float,2> junk2(5,5);
   junk2 = 1.0f;

   Range threeRange = Range(3,3);
     Range allRange = Range::all();

   Array<float,1> junk1(junk2(allRange,threeRange));

   cerr << " junk2 = " << junk2 << endl;
   cerr << " junk1 = " << junk1 << endl;

   return EXIT_SUCCESS;
}