daxpy MTL impl. problems
"Olaf Petzold" <[email protected]>
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm trying to compute the daxpy y-<y+ax:
#include <iostream>
#include <mtl/dense1D.h>
#include <mtl/matrix.h>
#include <mtl/mtl.h>
#include <mtl/utils.h>
int main()
{
const size_t Sz(3);
mtl::dense1D<double> x(Sz), y(Sz, 0);
double a;
mult(scaled(x, a), y, y);
std::cout << "." << std::flush;
}
Unfortunally I get a lot of errors - imo the code should be ok:
/usr/include/mtl/matrix_traits.h: In instantiation of
`mtl::matrix_traits<mtl::scaled1D<mtl::dense1D<double, 0> > >':
/usr/include/mtl/mtl.h:1676: instantiated from `void mtl::mult(const
Matrix&, const VecX&, const VecY&, const VecZ&) [with Matrix =
mtl::scaled1D<mtl::dense1D<double, 0> >, VecX = mtl::dense1D<double, 0>,
VecY = mtl::scaled1D<mtl::dense1D<double, 0> >, VecZ = mtl::dense1D<double,
0>]'
/usr/include/mtl/mtl.h:1703: instantiated from `void mtl::mult_dim__(const
Matrix&, const VecX&, VecY&, mtl::oned_tag) [with Matrix =
mtl::scaled1D<mtl::dense1D<double, 0> >, VecX = mtl::dense1D<double, 0>,
VecY = mtl::dense1D<double, 0>]'
/usr/include/mtl/mtl.h:2054: instantiated from `void mtl::mult(const
LinalgA&, const LinalgB&, const LinalgC&) [with LinalgA =
mtl::scaled1D<mtl::dense1D<double, 0> >, LinalgB = mtl::dense1D<double, 0>,
LinalgC = mtl::dense1D<double, 0>]'
mtl_daxpy.cc:15: instantiated from here
/usr/include/mtl/matrix_traits.h:24: no type named `shape' in `class
mtl::scaled1D<mtl::dense1D<double, 0> >'
/usr/include/mtl/matrix_traits.h:26: no type named `orientation' in `class
mtl::scaled1D<mtl::dense1D<double, 0> >'
/usr/include/mtl/matrix_traits.h:31: no type named `transpose_type' in
`class mtl::scaled1D<mtl::dense1D<double, 0> >'
/usr/include/mtl/matrix_traits.h:33: no type named `strided_type' in `class
mtl::scaled1D<mtl::dense1D<double, 0> >'
/usr/include/mtl/matrix_traits.h:35: no type named `strideability' in `class
mtl::scaled1D<mtl::dense1D<double, 0> >'
/usr/include/mtl/matrix_traits.h:39: no type named `storage_loc' in `class
mtl::scaled1D<mtl::dense1D<double, 0> >'
/usr/include/mtl/matrix_traits.h:42: no type named `OneD' in `class
mtl::scaled1D<mtl::dense1D<double, 0> >'
/usr/include/mtl/mtl.h: In function `void mtl::mult(const Matrix&, const
VecX&, const VecY&, const VecZ&) [with Matrix =
mtl::scaled1D<mtl::dense1D<double, 0> >, VecX = mtl::dense1D<double, 0>,
VecY = mtl::scaled1D<mtl::dense1D<double, 0> >, VecZ = mtl::dense1D<double,
0>]':
/usr/include/mtl/mtl.h:1703: instantiated from `void mtl::mult_dim__(const
Matrix&, const VecX&, VecY&, mtl::oned_tag) [with Matrix =
mtl::scaled1D<mtl::dense1D<double, 0> >, VecX = mtl::dense1D<double, 0>,
VecY = mtl::dense1D<double, 0>]'
/usr/include/mtl/mtl.h:2054: instantiated from `void mtl::mult(const
LinalgA&, const LinalgB&, const LinalgC&) [with LinalgA =
mtl::scaled1D<mtl::dense1D<double, 0> >, LinalgB = mtl::dense1D<double, 0>,
LinalgC = mtl::dense1D<double, 0>]'
mtl_daxpy.cc:15: instantiated from here
/usr/include/mtl/mtl.h:1676: no type named `shape' in `struct
mtl::matrix_traits<mtl::scaled1D<mtl::dense1D<double, 0> > >'
/usr/include/mtl/mtl.h:1677: no type named `shape' in `struct
mtl::matrix_traits<mtl::scaled1D<mtl::dense1D<double, 0> > >'
shape and orientation confuses me. What's wrong with the code. Regards to
the docs it should compile.
Thanks
Olaf
_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/