Boost logo

Boost :

From: Benedikt Weber (weber_at_[hidden])
Date: 2002-06-25 15:43:43


Joerg

> Would you please be so kind to provide us with your changes? We don't have
> access to any Code Warrior version (and are always interested to improve
the
> conformance of uBLAS ;-)
>
Yes, of course. As I see, I only did bench1, 2, 3, but not test1, ... yet. I
will do these later!
.......

Errors in File bench12.cpp, bench22.cpp, bench32.cpp, each:

template<class M, class V, int N>
struct bench_cpp_outer_prod {
    typedef typename M::value_type value_type;

    void operator () (int runs) const {
        try {
            static M m (N * N);
            static V v1 (N), v2 (N);
            initialize_vector (v1);
            initialize_vector (v2);
            boost::timer t;
            for (int i = 0; i < runs; ++ i) {
                for (int j = 0; j < N; ++ j) {
                    for (int k = 0; k < N; ++ k) {
                        m3 [N * j + k] = - v1 [j] * v2 [k]; // <---- change
m3 to m [declared as m]
.......

Warnings in files bench12.cpp, bench22.cpp, bench32.cpp, 6 times each,
lines like

void operator () (const c_vector_traits<T, N>::type &v)
typename missing, change to:
void operator () (const typename c_vector_traits<T, N>::type &v)
.......

CodeWarrior 8 seems to have problems with the include files. There is user
path and a system path. The user path basically searches for #include
"file.h", the system path for #include <file.h> and #inlcude "file.h". I set
the system path to the boost root directory, which is D:\boost\boost_1_28_0
in my case. Then the files <boost/...> are found correctly. However then
the files exception.h and functional.h are taken from the MSL library
(Metrowerks Standard Library). As a workaround I included
D:\boost\boost_1_28_0\libs\numeric\ublas in the user path (so they had a
system and a user path). The better solution would probably be to use
#inlcude <boost/numeric/ublas/config.h> and similar in all cases, also when
including a ublas file from a ublas file. I have now changed all of them and
it works fine. I noticed that other libraries in boost do this.

MSVC seems to like it too. BTW, I set the library path in Visual Studio in
Tools: Options: Directories once to the boost root directory instead of
..\..\..\.. in additional include paths in each project. Works fine.

.......

CodeWarrior is also complaining about incorrect line endings, but fixes them
automatically. Probably a Unix/Windows problem.
........

I will also run test1,... and see what I can do about performance. There are
Macros in the code and it's not always clear what they are for and if they
are set differently for MSVC.

Benedikt


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk