On Wed, 23 Jan 2008, Roy Stogner wrote:
Real min_realpart(const std::vector<T> &v)
I finally realized that here was not the best place to bring in the
template specialization. We've had some little-used functions
libmesh_norm(x) (returning std::norm(x) or x*x as appropriate) and
libmesh_real(x) (returning x.real() or x as appropriate) in one of the
numerics headers, so now I've moved those to libmesh_common.h where we
set Number=Real or Number=Complex, and I'm using them whereever
possible.
It's just the exact same thing I did in parallel.h, but for some
reason here it doesn't work? C++ just doesn't like me today.
What's really weird is that, while everything now compiles and links
fine, I'm seeing this warning from distributed_vector.C and
system_io.C:
/home/roystgnr/libmesh/svn/include/parallel/parallel.h:64: warning:
inline function ‘Parallel::data_type Parallel::datatype() [with T =
std::complex<double>]’ used but never defined
I have no idea what code is calling this (it's only used in other
parallel.h functions, but any function called with a std::complex<T>
is only supposed to be using the datatype of T, not of
std::complex<T>.
I also have no idea why it's linking correctly; if that function isn't
defined in parallel.h it's certainly not defined anywhere else. Is
the compiler trying to use a general template function, spitting out
that warning, but then changing its mind and using the correct more
specialized template function instead? I'm not even sure how to find
out more other than to try Intel's compiler instead and see if it's
more informative.
Anyway, the SVN head should be working with --enable-complex now, but
if you're using it, be paranoid and double-check your results in
parallel.
---
Roy
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel