![]() |
Blitz Support : |
From: Julian Cummings (cummings_at_[hidden])
Date: 2003-09-02 17:09:24
Hi Matthias,
The problem here was that the expression template machinery used by arrays
is separate from that used by vector types, and they are somewhat out of
sync.
In the blitz cvs repository, I have added to the generated header file
<blitz/vecuops.cc>
support for the conj() function. You can now use conj() on all
vector-like types
including TinyVector. Note that in your example program below, you
should be
including the header <blitz/tinyvec-et.h> in order to get the headers
for TinyVector
expression template support. This is no longer included by default by
<blitz/array.h>.
Regards, Julian C.
Matthias Schillinger wrote:
>Hi,
>
>if I try to compile this small program with gcc-3.2
>/******************************************/
>#include <iostream>
>#include <complex>
>#include <blitz/array.h>
>using namespace blitz;
>typedef TinyVector< std::complex<double> ,2> cVector2D;
>
>int main()
>{
> cVector2D a( std::complex<double>(1.0,1.0), std::complex<double>(2.0,2.0));
> cVector2D b;
> b=conj(a);
> return 0;
>};
>/*****************************************/
>
>I get the following error message:
>
>tinytest.cpp: In function `int main()':
>tinytest.cpp:11: cannot convert `cVector2D' to `__complex__ double' for
> argument `1' to `__complex__ double std::conj(__complex__ double)'
>
>For Arrays conj() works fine and following the blitz++ user guide it should
>also work for TinyVector.
>
>Thanks for any suggestions!
>
>Matthias
>_______________________________________________
>Blitz-support mailing list
>Blitz-support_at_[hidden]
>http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
>
>
-- Dr. Julian C. Cummings E-mail: cummings_at_[hidden] California Institute of Technology Phone: 626-395-2543 1200 E. California Blvd., Mail Code 158-79 Fax: 626-584-5917 Pasadena, CA 91125