Patch: Use <complex> and <iostream>
Jeffrey Oldham
oldham at codesourcery.com
Fri Oct 5 01:28:40 UTC 2001
This patch ensures the code uses <iostream> and <complex>, not
<iostream.h> and <complex.h>, to be consistent.
2001-10-04 Jeffrey D. Oldham <oldham at codesourcery.com>
* README: Remove comment that iostream.h and complex.h should be
used.
* benchmarks/SimpleArray/elemread.h: Change to use <complex>.
* src/Array/tests/array_test19.cpp: Likewise.
* src/Array/tests/array_test5.cpp: Likewise.
* src/Engine/tests/gmp_test1.cpp: Change to use <iostream>.
* src/Pooma/Arrays.h: Change to use <complex>.
* src/Pooma/DynamicArrays.h: Likewise.
Tested on sequential Linux using gcc 3.1 by compiling Pooma library and
+changed tests in src/
Applied to mainline
Approved by Stephen Smith
Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
-------------- next part --------------
Index: README
===================================================================
RCS file: /home/pooma/Repository/r2/README,v
retrieving revision 1.59
diff -c -p -r1.59 README
*** README 2001/09/26 20:17:46 1.59
--- README 2001/10/04 17:25:06
*************** required by the ANSI/ISO standard. This
*** 1178,1192 ****
has had to use the rather tortured conventions:
o all standard C headers must be included by the .h version
! (e.g., math.h not cmath).
- o iostreams and complex numbers must be introduced using the
- .h compatibility headers iostream.h and complex.h
- respectively. These are non-standard, but are available
- on most platforms.
-
o all other standard C++ library headers should use the
! ISO/ANSI ".h-less" convention (e.g., vector not vector.h)
We apologize for the inconvenience these guidelines might cause.
However, we viewed portability as more important than full
--- 1178,1187 ----
has had to use the rather tortured conventions:
o all standard C headers must be included by the .h version
! (e.g., <math.h> not <cmath>).
o all other standard C++ library headers should use the
! ISO/ANSI ".h-less" convention (e.g., <vector> not <vector.h>)
We apologize for the inconvenience these guidelines might cause.
However, we viewed portability as more important than full
Index: benchmarks/SimpleArray/elemread.h
===================================================================
RCS file: /home/pooma/Repository/r2/benchmarks/SimpleArray/elemread.h,v
retrieving revision 1.2
diff -c -p -r1.2 elemread.h
*** benchmarks/SimpleArray/elemread.h 2000/04/12 01:03:40 1.2
--- benchmarks/SimpleArray/elemread.h 2001/10/04 17:25:07
***************
*** 36,42 ****
#include "Pooma/Arrays.h"
#include "Utilities/Benchmark.h"
! #include <complex.h>
//-----------------------------------------------------------------------------
// elemreadArray class definition.
--- 36,42 ----
#include "Pooma/Arrays.h"
#include "Utilities/Benchmark.h"
! #include <complex>
//-----------------------------------------------------------------------------
// elemreadArray class definition.
Index: src/Array/tests/array_test19.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Array/tests/array_test19.cpp,v
retrieving revision 1.19
diff -c -p -r1.19 array_test19.cpp
*** src/Array/tests/array_test19.cpp 2000/07/20 15:36:25 1.19
--- src/Array/tests/array_test19.cpp 2001/10/04 17:25:09
***************
*** 48,54 ****
#include "Pooma/FunctorResult.h"
#include <iostream>
! #include <complex.h>
#include <math.h>
template<class Array>
--- 48,54 ----
#include "Pooma/FunctorResult.h"
#include <iostream>
! #include <complex>
#include <math.h>
template<class Array>
Index: src/Array/tests/array_test5.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Array/tests/array_test5.cpp,v
retrieving revision 1.13
diff -c -p -r1.13 array_test5.cpp
*** src/Array/tests/array_test5.cpp 2001/09/05 20:42:09 1.13
--- src/Array/tests/array_test5.cpp 2001/10/04 17:25:09
***************
*** 37,43 ****
#include "Array/Array.h"
#include "Tiny/Vector.h"
! #include <complex.h>
#include <math.h>
template<class T>
--- 37,43 ----
#include "Array/Array.h"
#include "Tiny/Vector.h"
! #include <complex>
#include <math.h>
template<class T>
Index: src/Engine/tests/gmp_test1.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Engine/tests/gmp_test1.cpp,v
retrieving revision 1.18
diff -c -p -r1.18 gmp_test1.cpp
*** src/Engine/tests/gmp_test1.cpp 2000/07/11 23:06:54 1.18
--- src/Engine/tests/gmp_test1.cpp 2001/10/04 17:25:10
***************
*** 35,41 ****
#include "Pooma/BrickArrays.h"
#include "Engine/MultiPatchEngine.h"
//#include "Evaluator/MultiPatchEval.h"
! #include "iostream.h"
#include "Domain/Grid.h"
#include "Utilities/Tester.h"
--- 35,41 ----
#include "Pooma/BrickArrays.h"
#include "Engine/MultiPatchEngine.h"
//#include "Evaluator/MultiPatchEval.h"
! #include "iostream"
#include "Domain/Grid.h"
#include "Utilities/Tester.h"
Index: src/Pooma/Arrays.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Pooma/Arrays.h,v
retrieving revision 1.16
diff -c -p -r1.16 Arrays.h
*** src/Pooma/Arrays.h 2001/09/10 21:41:27 1.16
--- src/Pooma/Arrays.h 2001/10/04 17:25:10
***************
*** 51,57 ****
#include "Functions/PackUnpack.h"
! #include <complex.h>
#endif
--- 51,57 ----
#include "Functions/PackUnpack.h"
! #include <complex>
#endif
Index: src/Pooma/DynamicArrays.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Pooma/DynamicArrays.h,v
retrieving revision 1.8
diff -c -p -r1.8 DynamicArrays.h
*** src/Pooma/DynamicArrays.h 2000/07/20 15:39:28 1.8
--- src/Pooma/DynamicArrays.h 2001/10/04 17:25:10
***************
*** 46,52 ****
#include "Layout/DynamicLayout.h"
#include "Pooma/Tiny.h"
! #include <complex.h>
#endif
--- 46,52 ----
#include "Layout/DynamicLayout.h"
#include "Pooma/Tiny.h"
! #include <complex>
#endif
More information about the pooma-dev
mailing list