Commit 32e2bbe7 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

searching for source of problems

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 2466
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 056385c0
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: dump_simplerigidarray.h,v 1.2 2006-03-28 16:03:06 tforb Exp $
* $Id: dump_simplerigidarray.h,v 1.3 2007-12-07 16:50:56 tforb Exp $
* \author Thomas Forbriger
* \date 19/12/2002
*
......@@ -41,7 +41,7 @@
#define AFF_DUMP_SIMPLERIGIDARRAY_H_VERSION \
"AFF_DUMP_SIMPLERIGIDARRAY_H V1.0 "
#define AFF_DUMP_SIMPLERIGIDARRAY_H_CVSID \
"$Id: dump_simplerigidarray.h,v 1.2 2006-03-28 16:03:06 tforb Exp $"
"$Id: dump_simplerigidarray.h,v 1.3 2007-12-07 16:50:56 tforb Exp $"
#include<iostream>
#include<aff/lib/simplearray.h>
......@@ -55,7 +55,7 @@ using std::endl;
* \ingroup group_helpers
*/
template<class T, int N>
void dump(const SimpleRigidArray<T,N>& array, std::ostream& os=std::cout)
void dump(const aff::SimpleRigidArray<T,N>& array, std::ostream& os=std::cout)
{
int i=0;
for (aff::Tsize k=0; k<N; k++)
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: strided.h,v 1.16 2006-03-28 16:03:09 tforb Exp $
* $Id: strided.h,v 1.17 2007-12-07 16:50:56 tforb Exp $
* \author Thomas Forbriger
* \since 08/12/2002
*
......@@ -69,7 +69,7 @@
#define AFF_STRIDED_H_VERSION \
"AFF_STRIDED_H V1.7"
#define AFF_STRIDED_H_CVSID \
"$Id: strided.h,v 1.16 2006-03-28 16:03:09 tforb Exp $"
"$Id: strided.h,v 1.17 2007-12-07 16:50:56 tforb Exp $"
#include<aff/lib/types.h>
#include<aff/lib/simplearray.h>
......@@ -145,7 +145,7 @@ namespace aff {
* \param shift defines offset shift (i.e. first element accessed in
* memory representation)
*/
Strided(const TSizeVec& sizes, const Tsubscript& first=1,
explicit Strided(const TSizeVec& sizes, const Tsubscript& first=1,
const Tsubscript& shift=0)
{ setup_from_size(sizes, first, shift); }
/*! \brief construct do given first and last index
......@@ -155,7 +155,7 @@ namespace aff {
* \param shift defines offset shift (i.e. first element accessed in
* memory representation)
*/
Strided(const TIndexVec& first, const TIndexVec& last,
explicit Strided(const TIndexVec& first, const TIndexVec& last,
const Tsubscript& shift=0);
/*! \brief construct from given set of Fortran style sizes
*
......@@ -164,8 +164,7 @@ namespace aff {
* \param s2 size of third dimension
* \param s3 size of fourth dimension
*/
explicit
Strided(const Tsize& s0, const Tsize& s1=1,
explicit Strided(const Tsize& s0, const Tsize& s1=1,
const Tsize& s2=1, const Tsize& s3=1);
//@}
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: types.h,v 1.5 2006-03-28 16:03:10 tforb Exp $
* $Id: types.h,v 1.6 2007-12-07 16:50:56 tforb Exp $
* \author Thomas Forbriger
* \since 08/12/2002
*
......@@ -42,18 +42,26 @@
#define AFF_TYPES_H_VERSION \
"AFF_TYPES_H V1.0 "
#define AFF_TYPES_H_CVSID \
"$Id: types.h,v 1.5 2006-03-28 16:03:10 tforb Exp $"
"$Id: types.h,v 1.6 2007-12-07 16:50:56 tforb Exp $"
#include <cstddef>
namespace aff {
/*
//! Type to hold an array dimensionality.
typedef unsigned short int Tdim;
//! Type to hold the size of an array dimension.
typedef size_t Tsize;
//! Type to hold an array's subscript value.
typedef ptrdiff_t Tsubscript;
*/
//! Type to hold an array dimensionality.
typedef unsigned int Tdim;
//! Type to hold the size of an array dimension.
typedef unsigned int Tsize;
//! Type to hold an array's subscript value.
typedef int Tsubscript;
} // namespace aff
......
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.13 2006-03-28 17:48:51 tforb Exp $
# $Id: Makefile,v 1.14 2007-12-07 16:50:56 tforb Exp $
#
# Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
#
......@@ -16,7 +16,7 @@
# ============================================================================
#
CPPFLAGS=-I$(LOCINCLUDEDIR)
LDFLAGS=-L$(SERVERLIBDIR)
LDFLAGS=-L$(LOCLIBDIR)
CXXFLAGS=-fhonor-std -Wall $(FLAGS)
CXXFLAGS=-Wall -pedantic $(FLAGS)
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: simplearraytest.cc,v 1.6 2006-03-28 16:03:12 tforb Exp $
* $Id: simplearraytest.cc,v 1.7 2007-12-07 16:50:57 tforb Exp $
* \author Thomas Forbriger
* \date 25/05/2002
*
......@@ -38,7 +38,7 @@
#define AFF_SIMPLEARRAYTEST_CC_VERSION \
"AFF_SIMPLEARRAYTEST_CC V1.3"
#define AFF_SIMPLEARRAYTEST_CC_CVSID \
"$Id: simplearraytest.cc,v 1.6 2006-03-28 16:03:12 tforb Exp $"
"$Id: simplearraytest.cc,v 1.7 2007-12-07 16:50:57 tforb Exp $"
/*! \example tests/simplearraytest.cc
*
......@@ -57,13 +57,38 @@
#include<iostream>
#include<aff/array.h>
#include<aff/dump.h>
//#include<aff/dump.h>
//#include<aff/lib/dump_simplerigidarray.h>
#include<aff/lib/dump_macros.h>
using std::cout;
using std::endl;
using namespace aff;
namespace aff {
template<typename T, int N>
void dump(const aff::SimpleRigidArray<T,N>& array, std::ostream& os=std::cout)
{
cout << "This is my dump of size " << N << endl;
int i=0;
for (aff::Tsize k=0; k<N; k++)
{
if (!i) { os << " "; }
os.width(9);
os << array[k] << " ";
if (++i>7) { i=0; os << endl; }
}
os << endl;
}
}
template<typename T, Tsize N>
Tsize myf(aff::SimpleRigidArray<T,N> a)
{
return(N);
}
//! print result of function
#define FUNC( func ) cout << #func << "=" << func << endl
......@@ -106,6 +131,8 @@ int main()
cout << "SimpleRigidArray<double, 6> A,B(8.);" << endl;
cout << "SimpleRigidArray<int, 4> C,D(100);" << endl;
myf(A);
DUMP( A );
DUMP( B );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment