RE: Re: RE: lots of problems VC7.1
Bryan Leppard <[email protected]> Fri, 23 Jan 2004 19:49:53 -0700
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <000401c3e224$c198c320$6501a8c0@PILOT2> |
These attached files go in ITL-4.0.0-1\itl\interface\detail -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of mascix Sent: January 23, 2004 5:18 PM To: General Matrix Template Library (MTL) list Subject: MTL: Re: RE: lots of problems VC7.1 I guess I used that version anyway I downloaded that version of MTL and tried it again and there is no success. I have tried that MTL-2.1.2-21 but same problems again what should I do ? ----- Original Message ----- From: "Bryan Leppard" <[email protected]> To: "'General Matrix Template Library (MTL) list'" <[email protected]> Sent: Thursday, January 22, 2004 6:27 PM Subject: MTL: RE: lots of problems VC7.1 > Those error messages look a lot like what happens when you try to use MTL > version 2.1.2-20 with VC7.1 . Make sure you are using MTL version 2.1.2-21 > > I made a few modifications to the compiler specific setup code to get it to > work and posted it here. I think the changes are in the -21 version but let > me know if you continue to have problems. > > > Regards, > > Bryan Leppard > Neotechnology Consultants Ltd. > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of mascix > Sent: January 21, 2004 3:52 AM > To: [email protected] > Subject: MTL: lots of problems VC7.1 > > my name is özkan pakdil. I am developing http://s3dmesh.sf.net and tring to > make solver for FEM now. and MTL and ITL giving me hard time. I am using > VS7.1 and QT3.2.2 in win32 and these are the errors that I have from VS. > thanks. > > c:\Qt\3.2.2Educational\s3dmesh\mtl\light1D.h(87): error C2039: '_Ptrit' : is > not a member of 'std' > c:\Qt\3.2.2Educational\s3dmesh\mtl\light1D.h(87): error C2143: syntax error > : missing ';' before '<' > c:\Qt\3.2.2Educational\s3dmesh\mtl\light1D.h(87): error C2238: unexpected > token(s) preceding ';' > c:\Qt\3.2.2Educational\s3dmesh\mtl\light1D.h(88): error C2039: '_Ptrit' : is > not a member of 'std' > c:\Qt\3.2.2Educational\s3dmesh\mtl\light1D.h(88): error C2059: syntax error > : '<' > c:\Qt\3.2.2Educational\s3dmesh\mtl\light1D.h(88): error C2238: unexpected > token(s) preceding ';' > c:\Qt\3.2.2Educational\s3dmesh\mtl\light1D.h(90): error C2065: > 'ptr_iterator' : undeclared identifier > c:\Qt\3.2.2Educational\s3dmesh\mtl\light1D.h(92): error C2065: > 'ptr_const_iterator' : undeclared identifier > c:\Qt\3.2.2Educational\s3dmesh\mtl\light1D.h(102): error C3203: > 'dense_iterator' : class template invalid as template argument for template > parameter 'Iter', expected a real type > c:\Qt\3.2.2Educational\s3dmesh\mtl\light1D.h(104): error C3203: > 'dense_iterator' : class template invalid as template argument for template > parameter 'Iter', expected a real type > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(506): error C2039: 'value_type' : is not a member > of 'std::iterator_traits<int>' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(168) : see declaration of > 'std::iterator_traits<int>' > c:\Qt\3.2.2Educational\s3dmesh\mtl\reverse_iter.h(39) : see > reference to class template instantiation 'std::reverse_iterator<_RanIt>' > being compiled > with > [ > _RanIt=int > ] > c:\Qt\3.2.2Educational\s3dmesh\mtl\light1D.h(148) : see reference to > class template instantiation 'mtl::reverse_iter<Iter>' being compiled > with > [ > Iter=int > ] > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(506): error C2146: syntax error : missing ',' > before identifier 'value_type' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(506): error C2065: 'value_type' : undeclared > identifier > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(507): error C2039: 'difference_type' : is not a > member of 'std::iterator_traits<int>' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(168) : see declaration of > 'std::iterator_traits<int>' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(507): error C2146: syntax error : missing ',' > before identifier 'difference_type' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(507): error C2065: 'difference_type' : undeclared > identifier > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(508): error C2039: 'pointer' : is not a member of > 'std::iterator_traits<int>' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(508): error C2146: syntax error : missing ',' > before identifier 'pointer' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(508): error C2065: 'pointer' : undeclared > identifier > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(509): error C2039: 'reference' : is not a member > of 'std::iterator_traits<int>' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(168) : see declaration of > 'std::iterator_traits<int>' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(509): error C2146: syntax error : missing ',' > before identifier 'reference' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(509): error C2065: 'reference' : undeclared > identifier > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(509): error C2976: 'std::iterator' : too few > template arguments > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(66) : see declaration of 'std::iterator' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(513): error C2039: 'difference_type' : is not a > member of 'std::iterator_traits<int>' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(168) : see declaration of > 'std::iterator_traits<int>' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(514): error C2039: 'pointer' : is not a member of > 'std::iterator_traits<int>' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(168) : see declaration of > 'std::iterator_traits<int>' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(515): error C2039: 'reference' : is not a member > of 'std::iterator_traits<int>' > C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include\xutility(168) : see declaration of > 'std::iterator_traits<int>' > c:\Qt\3.2.2Educational\s3dmesh\mtl\linalg_vec.h(415): error C2039: '_Ptrit' > : is not a member of 'std' > c:\Qt\3.2.2Educational\s3dmesh\mtl\linalg_vec.h(415): error C2143: syntax > error : missing ';' before '<' > c:\Qt\3.2.2Educational\s3dmesh\mtl\linalg_vec.h(415): error C2238: > unexpected token(s) preceding ';' > c:\Qt\3.2.2Educational\s3dmesh\mtl\linalg_vec.h(416): error C2039: '_Ptrit' > : is not a member of 'std' > c:\Qt\3.2.2Educational\s3dmesh\mtl\linalg_vec.h(416): error C2059: syntax > error : '<' > c:\Qt\3.2.2Educational\s3dmesh\mtl\linalg_vec.h(416): error C2238: > unexpected token(s) preceding ';' > c:\Qt\3.2.2Educational\s3dmesh\mtl\linalg_vec.h(418): error C3861: > 'ptr_iterator': identifier not found, even with argument-dependent lookup > c:\Qt\3.2.2Educational\s3dmesh\mtl\linalg_vec.h(419): error C3861: > 'ptr_const_iterator': identifier not found, even with argument-dependent > lookup > c:\Qt\3.2.2Educational\s3dmesh\mtl\linalg_vec.h(428): error C3203: > 'dense_iterator' : class template invalid as template argument for template > parameter 'Iter', expected a real type > c:\Qt\3.2.2Educational\s3dmesh\mtl\linalg_vec.h(430): error C3203: > 'dense_iterator' : class template invalid as template argument for template > parameter 'Iter', expected a real type > c:\Qt\3.2.2Educational\s3dmesh\mtl\light_matrix.h(128): warning C4346: > 'mtl::light_matrix<T,SizeType,Orien,Strided>::oned::value_type' : dependent > name is not a type > c:\Qt\3.2.2Educational\s3dmesh\mtl\light_matrix.h(128): error C2146: syntax > error : missing ';' before identifier 'value_type' > c:\Qt\3.2.2Educational\s3dmesh\mtl\light_matrix.h(128): error C2838: > 'value_type' : illegal qualified name in member declaration > c:\Qt\3.2.2Educational\s3dmesh\mtl\light_matrix.h(128): error C2208: 'T1' : > no members defined using this type > c:\Qt\3.2.2Educational\s3dmesh\mtl\light_matrix.h(130): warning C4346: > 'mtl::light_matrix<T,SizeType,Orien,Strided>::oned::size_type' : dependent > name is not a type > prefix with 'typename' to indicate a type > c:\Qt\3.2.2Educational\s3dmesh\mtl\light_matrix.h(130): error C2146: syntax > error : missing ';' before identifier 'size_type' > c:\Qt\3.2.2Educational\s3dmesh\mtl\light_matrix.h(130): error C2838: > 'size_type' : illegal qualified name in member declaration > c:\Qt\3.2.2Educational\s3dmesh\mtl\light_matrix.h(130): error C2208: 'T2' : > no members defined using this type > c:\Qt\3.2.2Educational\s3dmesh\mtl\dense2D.h(200): error C2065: 'x' : > undeclared identifier > c:\Qt\3.2.2Educational\s3dmesh\mtl\dense2D.h(201): error C2433: > 'mtl::rect_offset<size_t,MM,NN>::__ctor' : 'inline' not permitted on data > declarations > c:\Qt\3.2.2Educational\s3dmesh\mtl\dense2D.h(201): warning C4346: > 'mtl::rect_offset<size_t,MM,NN>::transpose_type' : dependent name is not a > type > prefix with 'typename' to indicate a type > c:\Qt\3.2.2Educational\s3dmesh\mtl\dense2D.h(201): error C2350: > 'mtl::rect_offset<size_t,MM,NN>::__ctor' is not a static member > c:\Qt\3.2.2Educational\s3dmesh\mtl\dense2D.h(199): error C3856: > 'mtl::rect_offset<size_t,MM,NN>::__ctor': class is not a class template > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(751): warning C4003: not enough > actual parameters for macro 'max' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(751): error C2226: syntax error : > unexpected type 'VectorT' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(751): error C2988: unrecognizable > template declaration/definition > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(751): error C2059: syntax error : > ')' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(751): error C2059: syntax error : > ')' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(765): error C2653: 'VectorT' : is > not a class or namespace name > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(766): warning C4003: not enough > actual parameters for macro 'min' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(766): error C2988: unrecognizable > template declaration/definition > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(766): error C2059: syntax error : > ')' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(766): error C2059: syntax error : > ')' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(767): error C2143: syntax error : > missing ';' before '{' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(767): error C2447: '{' : missing > function header (old-style formal list?) > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1046): error C2906: > 'mtl::givens_rotation<std::complex<double>>' : explicit specialization > requires 'template <>' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1051): error C3861: 'cs': > identifier not found, even with argument-dependent lookup > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1051): error C2433: > 'mtl::givens_rotation<std::complex<double>>::__ctor' : 'inline' not > permitted on data declarations > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1051): error C2461: > 'mtl::givens_rotation<std::complex<double>>' : constructor syntax missing > formal parameters > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1051): error C2059: syntax error : > 'constant' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1055): error C2143: syntax error : > missing ';' before '{' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1055): error C2334: unexpected > token(s) preceding '{'; skipping apparent function body > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1056): error C2059: syntax error : > 'return' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1056): error C2238: unexpected > token(s) preceding ';' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1057): error C2146: syntax error : > missing ';' before identifier 'abs1' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1057): error C2065: 'C' : > undeclared identifier > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1057): error C2146: syntax error : > missing ')' before identifier 't' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1057): error C2501: 'abs1' : > missing storage-class or type specifiers > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1057): error C2059: syntax error : > ')' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1057): error C2143: syntax error : > missing ';' before '{' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1057): error C2447: '{' : missing > function header (old-style formal list?) > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1060): error C2955: > 'mtl::givens_rotation' : use of class template requires template argument > list > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(917) : see declaration of > 'mtl::givens_rotation' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1060): error C2146: syntax error : > missing ')' before identifier 'a_in' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1060): error C2146: syntax error : > missing ';' before identifier 'a_in' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1060): error C2146: syntax error : > missing ';' before identifier 'b_in' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1060): error C2059: syntax error : > ')' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1060): error C2470: 'b_in' : looks > like a function definition, but there is no formal parameter list; skipping > apparent body > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1134): error C3861: 'C': identifier > not found, even with argument-dependent lookup > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1134): error C3861: 'x': identifier > not found, even with argument-dependent lookup > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1134): error C2065: 'y' : > undeclared identifier > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1134): error C3861: 'C': identifier > not found, even with argument-dependent lookup > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1134): error C2448: 'scalar_apply' > : function-style initializer appears to be a function definition > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1139): error C2146: syntax error : > missing ';' before identifier 'c' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1139): error C2501: 'T' : missing > storage-class or type specifiers > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1139): error C3861: 'cs': > identifier not found, even with argument-dependent lookup > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1140): error C2146: syntax error : > missing ';' before identifier 's' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1140): error C2501: 'C' : missing > storage-class or type specifiers > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1140): error C2065: 'sn' : > undeclared identifier > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1144): error C2059: syntax error : > 'protected' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1145): error C2146: syntax error : > missing ';' before identifier 'cs' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1145): error C2501: 'T' : missing > storage-class or type specifiers > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1145): error C2086: 'int std::T' : > redefinition > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1139) : see declaration of > 'std::T' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1145): error C2501: 'cs' : missing > storage-class or type specifiers > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1146): error C2146: syntax error : > missing ';' before identifier 'sn' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1146): error C2501: 'C' : missing > storage-class or type specifiers > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1146): error C2086: 'int std::C' : > redefinition > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1140) : see declaration of > 'std::C' > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1146): error C2501: 'sn' : missing > storage-class or type specifiers > c:\Qt\3.2.2Educational\s3dmesh\mtl\mtl.h(1150): fatal error C1506: > unrecoverable block scoping error > _______________________________________________ > This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/ > > > > > _______________________________________________ > This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/ > _______________________________________________ This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/ _______________________________________________ This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/
mtl_amend.h
(text/plain, 710 B)
#ifndef ITL_MTL_AMEND_H
#define ITL_MTL_AMEND_H
#include <vector>
template <class T>
class pointer_vector;
namespace mtl {
template <class T>
struct linalg_traits<pointer_vector<T> > {
typedef oned_tag dimension;
typedef dense_tag sparsity;
typedef T value_type;
typedef typename number_traits<value_type>::magnitude_type
magnitude_type;
};
template <class T>
struct linalg_traits<std::vector<T> > {
typedef oned_tag dimension;
typedef dense_tag sparsity;
typedef T value_type;
typedef typename number_traits<value_type>::magnitude_type
magnitude_type;
};
}
#endif // ITL_MTL_AMEND_H
mtl_classical_gram_schmidt.h
(text/plain, 4 KB)
// -*- c++ -*-
//===========================================================================
// CVS Information:
//
// $RCSfile: mtl_classical_gram_schmidt.h,v $ $Revision: 1.1 $ $State: Exp $
// $Author: llee $ $Date: 2001/10/23 02:18:14 $
// $Locker: $
//---------------------------------------------------------------------------
//
// DESCRIPTION
//
// This is a module for the last template in gmres function. It
// provides the basis stored in MTL dense column-wise matrix
// format. The class Gram-Schmidt orthogonalization with iterative
// refinement is performed. Matrix-vector operations consist of the
// lowel level linear algebra operations.
//
//---------------------------------------------------------------------------
//
// LICENSE AGREEMENT
// $COPYRIGHT$
//---------------------------------------------------------------------------
//
// REVISION HISTORY:
//
// $Log: mtl_classical_gram_schmidt.h,v $
// Revision 1.1 2001/10/23 02:18:14 llee
// *** empty log message ***
//
// Revision 1.1 2001/10/18 14:08:32 llee
// re-organize the directory structures
//
// Revision 1.3 2001/07/05 22:28:58 llee1
// gcc 3.0 fix
//
// Revision 1.2 2000/07/25 22:57:54 llee1
// *** empty log message ***
//
//
//===========================================================================
#ifndef ITL_CLASSICAL_GRAM_SCHMIDT_ORTHOGONALIZATION_H
#define ITL_CLASSICAL_GRAM_SCHMIDT_ORTHOGONALIZATION_H
#include <itl/itl.h>
#include <itl/itl_tags.h>
#include <mtl/matrix.h>
#include <itl/interface/detail/mtl_amend.h>
namespace itl {
//in parallel envirnment, this is an all-reduce operation
template<class VecX, class VecY>
inline void all_reduce(const VecX& x, const VecY& yy, int k) {
VecY& y = const_cast<VecY&>(yy);
for (int i=0; i<k; i++)
y[i] += x[i];
}
//This is to use mtl dense column-wise matrix for orthogonal vectors
template <class Vec>
class classical_gram_schmidt {
typedef typename itl_traits<Vec>::value_type value_type;
typedef typename mtl::matrix<value_type, mtl::rectangle<>,
mtl::dense<>,
mtl::column_major>::type ColumnMatrix;
public:
typedef size_t size_type;
template <class Size>
classical_gram_schmidt(int restart, const Size& s)
: V(s, restart+1), ss(restart+1), w(s) {}
typedef typename ColumnMatrix::OneD OneD;
OneD operator[](size_type i) const {
return V[i];
}
ColumnMatrix V;
Vec ss;
Vec w;
};
template <class Vec, class VecHi>
void orthogonalize(classical_gram_schmidt<Vec>& V,
const VecHi& _Hi, int i) {
/*classical Gram-Schmidt with 1 iterative refinement.
This is faster than modified Gram-Schmidt since here
we use BLAS2 operations instead of BLAS1 operations.
*/
VecHi& Hi = const_cast<VecHi&>(_Hi);
for (int k=0; k<=i; k++) Hi[k] = 0.0;
for (int ii=0; ii<2; ii++) {
//V is a N x m+1 column-wise matrix
itl::trans_mult(V.V.sub_matrix(0, size(V[i+1]), 0, i+1), V[i+1], V.ss);
//aggregate ss
itl::all_reduce(V.ss, Hi, i+1);
itl::mult(V.V.sub_matrix(0, size(V[i+1]), 0, i+1), V.ss, V.w);
itl::add(itl::scaled(V.w, -1.0), V[i+1]);
}
}
template <class Vec, class VecS, class VecX>
void combine(classical_gram_schmidt<Vec>& KS,
const VecS& s, VecX& x, int i) {
itl::mult(KS.V.sub_matrix(0, size(x), 0, i), s, x, x);
}
}
#endif