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

improved copyout

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: 1267
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent db480fdd
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: README.changelog,v 1.31 2003-01-03 16:56:40 forbrig Exp $
* $Id: README.changelog,v 1.32 2003-01-03 20:43:52 forbrig Exp $
*
* Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
*
......@@ -21,7 +21,7 @@
/*! \page page_changelog ChangeLog (AFF)
$Id: README.changelog,v 1.31 2003-01-03 16:56:40 forbrig Exp $
$Id: README.changelog,v 1.32 2003-01-03 20:43:52 forbrig Exp $
\sa \ref page_project_status
......@@ -30,6 +30,10 @@
- \b 03/01/2003 (thof)
- introduced lib/checkedcast.h and aff::util::SizeCheckedCast
- \b !! aff::FortranArray now takes container type as template argument
- copyout function now returns an aff::Array rather
than an aff::ConstArray
- aff::Array inherits copyout from aff::ConstArray
- copyout now tested by tests/arraytest.cc
- \b 31/12/2002 (thof)
- NULL is deprecated as pointed out by Wolfgang (replaced by literal 0 in
......@@ -152,7 +156,7 @@
/*! \page page_project_status Project status (AFF)
$Id: README.changelog,v 1.31 2003-01-03 16:56:40 forbrig Exp $
$Id: README.changelog,v 1.32 2003-01-03 20:43:52 forbrig Exp $
\sa \ref page_changelog
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: array_dec.h,v 1.21 2003-01-02 10:33:42 forbrig Exp $
* $Id: array_dec.h,v 1.22 2003-01-03 20:43:52 forbrig Exp $
* \author Thomas Forbriger
* \since 08/12/2002
*
......@@ -56,6 +56,10 @@
* suggested by Wolfgang.
* - 02/01/2003 V1.9 (thof)
* - type TIndexVec was not declared
* - 03/01/2003 V1.10 (thof)
* - copyout function now returns an aff::Array rather
* than an aff::ConstArray
* - aff::Array inherits copyout from aff::ConstArray
*
* ============================================================================
*/
......@@ -64,9 +68,9 @@
#ifndef AFF_ARRAY_DEC_H_VERSION
#define AFF_ARRAY_DEC_H_VERSION \
"AFF_ARRAY_DEC_H V1.9"
"AFF_ARRAY_DEC_H V1.10"
#define AFF_ARRAY_DEC_H_CVSID \
"$Id: array_dec.h,v 1.21 2003-01-02 10:33:42 forbrig Exp $"
"$Id: array_dec.h,v 1.22 2003-01-03 20:43:52 forbrig Exp $"
#include <aff/lib/sharedheap.h>
#include <aff/lib/strided.h>
......@@ -79,6 +83,9 @@ namespace aff {
namespace prebuilt {
#endif
// forward declaration
template<class T> class Array;
/*! \brief Array base class
*
* This is a multidimensional (array) container that uses a strided memory
......@@ -230,7 +237,7 @@ namespace prebuilt {
* affect elements of \c A, this not the case for changes applied to
* \c B.
*/
Tcontainer copyout() const;
Array<T> copyout() const;
//! \name access declarations
//@{
......@@ -380,6 +387,7 @@ namespace prebuilt {
//! access to base class function
using Tbase::operator();
using Tbase::shape;
using Tbase::copyout;
//@}
/*! \brief copy values (deep copy) from other array of convertible type
......@@ -412,14 +420,6 @@ namespace prebuilt {
return(*this);
}
//! create a copy of this array
Tcontainer copyout() const
{
Tcontainer copy(Tshape(this->first(),this->last()));
copy.copyin(*this);
return(copy);
}
//! return full access representation
const Trepresentation& representation()
{ return (Mrepresentation); }
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: array_def.h,v 1.15 2002-12-29 23:02:15 forbrig Exp $
* $Id: array_def.h,v 1.16 2003-01-03 20:43:52 forbrig Exp $
* \author Thomas Forbriger
* \since 08/12/2002
*
......@@ -41,6 +41,9 @@
* constructors became more simple and are defined in
* declaration - only copy operations remain here
* - member template cannot be explicitely instantiated
* - 03/01/2003 V1.7 (thof)
* - copyout function now returns an aff::Array rather
* than an aff::ConstArray
*
* ============================================================================
*/
......@@ -53,9 +56,9 @@
#ifndef AFF_ARRAY_DEF_H_VERSION
#define AFF_ARRAY_DEF_H_VERSION \
"AFF_ARRAY_DEF_H V1.6"
"AFF_ARRAY_DEF_H V1.7"
#define AFF_ARRAY_DEF_H_CVSID \
"$Id: array_def.h,v 1.15 2002-12-29 23:02:15 forbrig Exp $"
"$Id: array_def.h,v 1.16 2003-01-03 20:43:52 forbrig Exp $"
#include<aff/lib/error.h>
......@@ -88,10 +91,10 @@ namespace prebuilt {
//! create a value (deep) copy
template<class T>
ConstArray<T> ConstArray<T>::copyout() const
Array<T> ConstArray<T>::copyout() const
{
aff::Array<T> copy(Tshape(this->first(),this->last()));
copy.copyin(Mrepresentation);
copy.copyin(*this);
return(copy);
}
......
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