Starting Eigen 2 development. The current plan is to use the last

release of tvmet (inactive for 2 years and developer unreachable) as the
basis for eigen2, because it provides seemingly good expression template
mechanisms, we want that, and it would take years to reinvent that
wheel. We'll see. So this commit imports the last tvmet release.
This commit is contained in:
Benoit Jacob
2007-05-30 06:24:51 +00:00
commit 3036eeca0a
244 changed files with 95342 additions and 0 deletions

View File

@@ -0,0 +1,114 @@
/*
* Tiny Vector Matrix Library
* Dense Vector Matrix Libary of Tiny size using Expression Templates
*
* Copyright (C) 2001 - 2003 Olaf Petzold <opetzold@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id: Gemm.h,v 1.8 2004/06/16 09:30:07 opetzold Exp $
*/
#ifndef TVMET_LOOP_GEMM_H
#define TVMET_LOOP_GEMM_H
namespace tvmet {
namespace loop {
/**
* \class gemm Gemm.h "tvmet/loop/Gemm.h"
* \brief class for matrix-matrix product using loop unrolling.
* using formula
* \f[
* M_1\,M_2
* \f]
* \par Example:
* \code
* template<class T, std::size_t Rows1, std::size_t Cols1, std::size_t Cols2>
* inline
* void
* prod(const Matrix<T, Rows1, Cols1>& lhs, const Matrix<T, Cols1, Cols2>& rhs,
* Matrix<T, Rows1, Cols2>& dest)
* {
* for (std::size_t i = 0; i != Rows1; ++i) {
* for (std::size_t j = 0; j != Cols2; ++j) {
* dest(i, j) = tvmet::loop::gemm<Rows1, Cols1, Cols2>().prod(lhs, rhs, i, j);
* }
* }
* }
* \endcode
* \note The number of rows of rhs matrix have to be equal to cols of lhs matrix.
* The result is a (Rows1 x Cols2) matrix.
*/
template<std::size_t Rows1, std::size_t Cols1,
std::size_t Cols2>
class gemm
{
gemm(const gemm&);
gemm& operator=(const gemm&);
private:
enum {
count = Cols1,
N = (count+7)/8
};
public:
gemm() { }
public:
template<class E1, class E2>
static inline
typename PromoteTraits<
typename E1::value_type,
typename E2::value_type
>::value_type
prod(const E1& lhs, const E2& rhs, std::size_t i, std::size_t j) {
typename PromoteTraits<
typename E1::value_type,
typename E2::value_type
>::value_type sum(0);
std::size_t k(0);
std::size_t n(N);
// Duff's device
switch(count % 8) {
case 0: do { sum += lhs(i, k) * rhs(k, j); ++k;
case 7: sum += lhs(i, k) * rhs(k, j); ++k;
case 6: sum += lhs(i, k) * rhs(k, j); ++k;
case 5: sum += lhs(i, k) * rhs(k, j); ++k;
case 4: sum += lhs(i, k) * rhs(k, j); ++k;
case 3: sum += lhs(i, k) * rhs(k, j); ++k;
case 2: sum += lhs(i, k) * rhs(k, j); ++k;
case 1: sum += lhs(i, k) * rhs(k, j); ++k;
} while(--n != 0);
}
return sum;
}
};
} // namespace loop
} // namespace tvmet
#endif /* TVMET_LOOP_GEMM_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,114 @@
/*
* Tiny Vector Matrix Library
* Dense Vector Matrix Libary of Tiny size using Expression Templates
*
* Copyright (C) 2001 - 2003 Olaf Petzold <opetzold@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id: Gemmt.h,v 1.5 2004/06/16 09:30:07 opetzold Exp $
*/
#ifndef TVMET_LOOP_GEMMT_H
#define TVMET_LOOP_GEMMT_H
namespace tvmet {
namespace loop {
/**
* \class gemmt Gemmt.h "tvmet/loop/Gemmt.h"
* \brief class for for product matrix-transpose(matrix) operations.
* using formula
* \f[
* M_1\,M_2^{T}
* \f]
* \par Example:
* \code
* template<class T, std::size_t Rows1, std::size_t Cols1, std::size_t Cols2>
* inline
* void
* prod(const Matrix<T, Rows1, Cols1>& lhs, const Matrix<T, Rows2, Cols1>& rhs,
* Matrix<T, Rows1, Rows2>& dest)
* {
* for (std::size_t i = 0; i != Rows1; ++i) {
* for (std::size_t j = 0; j != Rows2; ++j) {
* dest(i, j) = tvmet::loop::gemmt<Rows1, Cols1, Cols1>().prod(lhs, rhs, i, j);
* }
* }
* }
* \endcode
* \note The number of cols of rhs matrix have to be equal to cols of rhs matrix.
* The result is a (Rows1 x Rows2) matrix.
*/
template<std::size_t Rows1, std::size_t Cols1,
std::size_t Cols2 /* unused */>
class gemmt
{
gemmt(const gemmt&);
gemmt& operator=(const gemmt&);
private:
enum {
count = Cols1,
N = (count+7)/8
};
public:
gemmt() { }
public:
template<class E1, class E2>
static inline
typename PromoteTraits<
typename E1::value_type,
typename E2::value_type
>::value_type
prod(const E1& lhs, const E2& rhs, std::size_t i, std::size_t j) {
typename PromoteTraits<
typename E1::value_type,
typename E2::value_type
>::value_type sum(0);
std::size_t k(0);
std::size_t n(N);
// Duff's device
switch(count % 8) {
case 0: do { sum += lhs(i, k) * rhs(j, k); ++k;
case 7: sum += lhs(i, k) * rhs(j, k); ++k;
case 6: sum += lhs(i, k) * rhs(j, k); ++k;
case 5: sum += lhs(i, k) * rhs(j, k); ++k;
case 4: sum += lhs(i, k) * rhs(j, k); ++k;
case 3: sum += lhs(i, k) * rhs(j, k); ++k;
case 2: sum += lhs(i, k) * rhs(j, k); ++k;
case 1: sum += lhs(i, k) * rhs(j, k); ++k;
} while(--n != 0);
}
return sum;
}
};
} // namespace loop
} // namespace tvmet
#endif /* TVMET_LOOP_GEMMT_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,115 @@
/*
* Tiny Vector Matrix Library
* Dense Vector Matrix Libary of Tiny size using Expression Templates
*
* Copyright (C) 2001 - 2003 Olaf Petzold <opetzold@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id: Gemtm.h,v 1.5 2004/06/16 09:30:07 opetzold Exp $
*/
#ifndef TVMET_LOOP_GEMTM_H
#define TVMET_LOOP_GEMTM_H
namespace tvmet {
namespace loop {
/**
* \class gemtm Gemtm.h "tvmet/loop/Gemtm.h"
* \brief class for matrix-matrix product using loop unrolling.
* using formula
* \f[
* M_1^{T}\,M_2
* \f]
* \par Example:
* \code
* template<class T, std::size_t Rows1, std::size_t Cols1, std::size_t Cols2>
* inline
* void
* prod(const Matrix<T, Rows1, Cols1>& lhs, const Matrix<T, Rows1, Cols2>& rhs,
* Matrix<T, Cols2, Cols1>& dest)
* {
* for (std::size_t i = 0; i != Cols1; ++i) {
* for (std::size_t j = 0; j != Cols2; ++j) {
* dest(i, j) = tvmet::loop::gemtm<Rows1, Cols1, Cols2>::prod(lhs, rhs, i, j);
* }
* }
* }
* \endcode
* \note The number of rows of rhs matrix have to be equal rows of rhs matrix,
* since lhs matrix 1 is transposed.
* The result is a (Cols1 x Cols2) matrix.
*/
template<std::size_t Rows1, std::size_t Cols1,
std::size_t Cols2>
class gemtm
{
gemtm(const gemtm&);
gemtm& operator=(const gemtm&);
private:
enum {
count = Cols1,
N = (count+7)/8
};
public:
gemtm() { }
public:
template<class E1, class E2>
static inline
typename PromoteTraits<
typename E1::value_type,
typename E2::value_type
>::value_type
prod(const E1& lhs, const E2& rhs, std::size_t i, std::size_t j) {
typename PromoteTraits<
typename E1::value_type,
typename E2::value_type
>::value_type sum(0);
std::size_t k(0);
std::size_t n(N);
// Duff's device
switch(count % 8) {
case 0: do { sum += lhs(k, i) * rhs(k, j); ++k;
case 7: sum += lhs(k, i) * rhs(k, j); ++k;
case 6: sum += lhs(k, i) * rhs(k, j); ++k;
case 5: sum += lhs(k, i) * rhs(k, j); ++k;
case 4: sum += lhs(k, i) * rhs(k, j); ++k;
case 3: sum += lhs(k, i) * rhs(k, j); ++k;
case 2: sum += lhs(k, i) * rhs(k, j); ++k;
case 1: sum += lhs(k, i) * rhs(k, j); ++k;
} while(--n != 0);
}
return sum;
}
};
} // namespace loop
} // namespace tvmet
#endif /* TVMET_LOOP_GEMTM_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,109 @@
/*
* Tiny Vector Matrix Library
* Dense Vector Matrix Libary of Tiny size using Expression Templates
*
* Copyright (C) 2001 - 2003 Olaf Petzold <opetzold@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id: Gemtv.h,v 1.3 2004/06/16 09:30:07 opetzold Exp $
*/
#ifndef TVMET_LOOP_GEMTV_H
#define TVMET_LOOP_GEMTV_H
namespace tvmet {
namespace loop {
/**
* \class gemtv Gemtv.h "tvmet/loop/Gemtv.h"
* \brief class for transposed(matrix)-vector product using loop unrolling.
* using formula
* \f[
* M^T\,v
* \f]
* \par Example:
* \code
* template<class T, std::size_t Rows, std::size_t Cols>
* inline
* void
* prod(const Matrix<T, Rows, Cols>& lhs, const Vector<T, Rows>& rhs,
* Vector<T, Cols>& dest)
* {
* for (std::size_t i = 0; i != Cols; ++i) {
* dest(i) = tvmet::loop::gemtv<Rows, Cols>().prod(lhs, rhs, i);
* }
* }
* \endcode
*/
template<std::size_t Rows, std::size_t Cols>
class gemtv
{
gemtv(const gemtv&);
gemtv& operator=(const gemtv&);
private:
enum {
count = Rows,
N = (count+7)/8
};
public:
gemtv() { }
public:
template<class E1, class E2>
static inline
typename PromoteTraits<
typename E1::value_type,
typename E2::value_type
>::value_type
prod(const E1& lhs, const E2& rhs, std::size_t i) {
typename PromoteTraits<
typename E1::value_type,
typename E2::value_type
>::value_type sum(0);
std::size_t j(0);
std::size_t n(N);
// Duff's device
switch(count % 8) {
case 0: do { sum += lhs(j, i) * rhs(j); ++j;
case 7: sum += lhs(j, i) * rhs(j); ++j;
case 6: sum += lhs(j, i) * rhs(j); ++j;
case 5: sum += lhs(j, i) * rhs(j); ++j;
case 4: sum += lhs(j, i) * rhs(j); ++j;
case 3: sum += lhs(j, i) * rhs(j); ++j;
case 2: sum += lhs(j, i) * rhs(j); ++j;
case 1: sum += lhs(j, i) * rhs(j); ++j;
} while(--n != 0);
}
return sum;
}
};
} // namespace loop
} // namespace tvmet
#endif /* TVMET_LOOP_GEMTV_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,109 @@
/*
* Tiny Vector Matrix Library
* Dense Vector Matrix Libary of Tiny size using Expression Templates
*
* Copyright (C) 2001 - 2003 Olaf Petzold <opetzold@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id: Gemv.h,v 1.3 2004/06/16 09:30:07 opetzold Exp $
*/
#ifndef TVMET_LOOP_GEMV_H
#define TVMET_LOOP_GEMV_H
namespace tvmet {
namespace loop {
/**
* \class gemv Gemv.h "tvmet/loop/Gemv.h"
* \brief class for matrix-vector product using loop unrolling.
* using formula
* \f[
* M\,v
* \f]
* \par Example:
* \code
* template<class T, std::size_t Rows, std::size_t Cols>
* inline
* void
* prod(const Matrix<T, Rows, Cols>& lhs, const Vector<T, Cols>& rhs,
* Vector<T, Rows>& dest)
* {
* for (std::size_t i = 0; i != Rows; ++i) {
* dest(i) = tvmet::loop::gemv<Rows, Cols>().prod(lhs, rhs, i);
* }
* }
* \endcode
*/
template<std::size_t Rows, std::size_t Cols>
class gemv
{
gemv(const gemv&);
gemv& operator=(const gemv&);
private:
enum {
count = Cols,
N = (count+7)/8
};
public:
gemv() { }
public:
template<class E1, class E2>
static inline
typename PromoteTraits<
typename E1::value_type,
typename E2::value_type
>::value_type
prod(const E1& lhs, const E2& rhs, std::size_t i) {
typename PromoteTraits<
typename E1::value_type,
typename E2::value_type
>::value_type sum(0);
std::size_t j(0);
std::size_t n(N);
// Duff's device
switch(count % 8) {
case 0: do { sum += lhs(i, j) * rhs(j); ++j;
case 7: sum += lhs(i, j) * rhs(j); ++j;
case 6: sum += lhs(i, j) * rhs(j); ++j;
case 5: sum += lhs(i, j) * rhs(j); ++j;
case 4: sum += lhs(i, j) * rhs(j); ++j;
case 3: sum += lhs(i, j) * rhs(j); ++j;
case 2: sum += lhs(i, j) * rhs(j); ++j;
case 1: sum += lhs(i, j) * rhs(j); ++j;
} while(--n != 0);
}
return sum;
}
};
} // namespace loop
} // namespace tvmet
#endif /* TVMET_LOOP_GEMV_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,12 @@
# $Id: Makefile.am,v 1.6 2004/04/12 21:50:35 opetzold Exp $
libtvmetincludedir = $(includedir)/$(PACKAGE)/loop
libtvmetinclude_HEADERS = \
Gemm.h \
Gemtm.h \
Gemmt.h \
Gemv.h \
Gemtv.h \
Matrix.h \
Vector.h

View File

@@ -0,0 +1,417 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# $Id: Makefile.am,v 1.6 2004/04/12 21:50:35 opetzold Exp $
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = @host@
subdir = include/tvmet/loop
DIST_COMMON = $(libtvmetinclude_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/ac_c_long_long.m4 \
$(top_srcdir)/config/ac_create_prefix_config_h.m4 \
$(top_srcdir)/config/ac_cxx_have_complex.m4 \
$(top_srcdir)/config/ac_cxx_have_complex_math1.m4 \
$(top_srcdir)/config/ac_cxx_have_complex_math2.m4 \
$(top_srcdir)/config/ac_cxx_have_ieee_math.m4 \
$(top_srcdir)/config/ac_cxx_have_mutable.m4 \
$(top_srcdir)/config/ac_cxx_have_namespaces.m4 \
$(top_srcdir)/config/ac_cxx_have_sysv_math.m4 \
$(top_srcdir)/config/ac_cxx_partial_specialization.m4 \
$(top_srcdir)/config/ac_cxx_typename.m4 \
$(top_srcdir)/config/ac_set_compiler.m4 \
$(top_srcdir)/config/op_doxygen_doc.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(mkdir_p)
CONFIG_HEADER = $(top_builddir)/config/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
am__installdirs = "$(DESTDIR)$(libtvmetincludedir)"
libtvmetincludeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(libtvmetinclude_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFIG_CPPUNIT_FALSE = @CONFIG_CPPUNIT_FALSE@
CONFIG_CPPUNIT_TRUE = @CONFIG_CPPUNIT_TRUE@
CONFIG_DOC_FALSE = @CONFIG_DOC_FALSE@
CONFIG_DOC_TRUE = @CONFIG_DOC_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
CPPUNIT_CONFIG = @CPPUNIT_CONFIG@
CPPUNIT_LIBS = @CPPUNIT_LIBS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_DEBUG_FLAGS = @CXX_DEBUG_FLAGS@
CXX_OPTIMIZE_FLAGS = @CXX_OPTIMIZE_FLAGS@
CXX_WARN_FLAGS = @CXX_WARN_FLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
DOXYGEN_HAVE_DOT = @DOXYGEN_HAVE_DOT@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LATEX_BATCHMODE = @LATEX_BATCHMODE@
LATEX_MODE = @LATEX_MODE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
libtvmetincludedir = $(includedir)/$(PACKAGE)/loop
libtvmetinclude_HEADERS = \
Gemm.h \
Gemtm.h \
Gemmt.h \
Gemv.h \
Gemtv.h \
Matrix.h \
Vector.h
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/tvmet/loop/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu include/tvmet/loop/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-libtvmetincludeHEADERS: $(libtvmetinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(libtvmetincludedir)" || $(mkdir_p) "$(DESTDIR)$(libtvmetincludedir)"
@list='$(libtvmetinclude_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(libtvmetincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libtvmetincludedir)/$$f'"; \
$(libtvmetincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libtvmetincludedir)/$$f"; \
done
uninstall-libtvmetincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(libtvmetinclude_HEADERS)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f '$(DESTDIR)$(libtvmetincludedir)/$$f'"; \
rm -f "$(DESTDIR)$(libtvmetincludedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libtvmetincludedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-libtvmetincludeHEADERS
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-libtvmetincludeHEADERS
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-libtvmetincludeHEADERS install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am \
uninstall-libtvmetincludeHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -0,0 +1,65 @@
/*
* Tiny Vector Matrix Library
* Dense Vector Matrix Libary of Tiny size using Expression Templates
*
* Copyright (C) 2001 - 2003 Olaf Petzold <opetzold@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* lesser General Public License for more details.
*
* You should have received a copy of the GNU lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id: Matrix.h,v 1.7 2004/06/27 20:32:55 opetzold Exp $
*/
#ifndef TVMET_LOOP_MATRIX_H
#define TVMET_LOOP_MATRIX_H
namespace tvmet {
namespace loop {
/**
* \class Matrix Matrix.h "tvmet/loop/Matrix.h"
* \brief Loop %Matrix class using expression and loop templates.
*/
template<std::size_t Rows, std::size_t Cols>
class Matrix
{
Matrix(const Matrix&);
Matrix& operator=(const Matrix&);
public:
Matrix() { }
public:
/** assign an expression on columns on given row using the functional fn. */
template<class E1, class E2, class Assign>
static inline
void assign(E1& lhs, const E2& rhs, const Assign& assign_fn) {
for(std::size_t i = 0; i != Rows; ++i)
for(std::size_t j = 0; j != Cols; ++j)
assign_fn.apply_on(lhs(i, j), rhs(i, j));
}
};
} // namespace loop
} // namespace tvmet
#endif /* TVMET_LOOP_MATRIX_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,64 @@
/*
* Tiny Vector Matrix Library
* Dense Vector Matrix Libary of Tiny size using Expression Templates
*
* Copyright (C) 2001 - 2003 Olaf Petzold <opetzold@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* lesser General Public License for more details.
*
* You should have received a copy of the GNU lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id: Vector.h,v 1.5 2004/06/27 20:32:55 opetzold Exp $
*/
#ifndef TVMET_LOOP_VECTOR_H
#define TVMET_LOOP_VECTOR_H
namespace tvmet {
namespace loop {
/**
* \class Vector Vector.h "tvmet/loop/Vector.h"
* \brief Loop %Vector class using expression and loop templates.
*/
template<std::size_t Sz>
class Vector
{
Vector(const Vector&);
Vector& operator=(const Vector&);
public:
Vector() { }
public:
/** assign an expression on columns on given row using the functional fn. */
template<class E1, class E2, class Assign>
static inline
void assign(E1& lhs, const E2& rhs, const Assign& assign_fn) {
for(std::size_t i = 0; i != Sz; ++i)
assign_fn.apply_on(lhs(i), rhs(i));
}
};
} // namespace loop
} // namespace tvmet
#endif /* TVMET_LOOP_VECTOR_H */
// Local Variables:
// mode:C++
// End: