Upgrade Intel C++ compiler to icpc (ICC) 15.0.3 20150407

This resolves a whole range of issues and work-arounds with earlier
releases.  This version of icpc is more or less compatible with the
latest gcc and clang compilers and only required one hack to avoid
warnings from PackedBoolList.H.
This commit is contained in:
Henry Weller
2015-07-17 16:50:40 +01:00
parent 69243fda22
commit 6b706cfa78
31 changed files with 55 additions and 138 deletions

View File

@ -370,7 +370,7 @@ public:
);
//- Construct from hash table, element and hash index
inline explicit iteratorBase
inline iteratorBase
(
const HashTable<T, Key, Hash>* curHashTable,
const hashedEntry* elmt,
@ -428,7 +428,7 @@ public:
);
//- Construct from hash table, element and hash index
inline explicit iterator
inline iterator
(
HashTable<T, Key, Hash>* curHashTable,
hashedEntry* elmt,
@ -483,7 +483,7 @@ public:
);
//- Construct from hash table, element and hash index
inline explicit const_iterator
inline const_iterator
(
const HashTable<T, Key, Hash>* curHashTable,
const hashedEntry* elmt,

View File

@ -297,10 +297,8 @@ public:
{
friend class StaticHashTable;
# ifndef __INTEL_COMPILER
template<class TRef2, class TableRef2>
friend class Iterator;
# endif
// Private data

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,7 +44,6 @@ Foam::ILList<LListBase, T>::ILList(const ILList<LListBase, T>& lst)
}
#ifndef __INTEL_COMPILER
template<class LListBase, class T>
template<class CloneArg>
Foam::ILList<LListBase, T>::ILList
@ -65,7 +64,6 @@ Foam::ILList<LListBase, T>::ILList
this->append(iter().clone(cloneArg).ptr());
}
}
#endif
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -95,25 +95,7 @@ public:
//- Copy constructor with additional argument for clone
template<class CloneArg>
ILList(const ILList<LListBase, T>& lst, const CloneArg& cloneArg)
#ifdef __INTEL_COMPILER
:
UILList<LListBase, T>()
{
for
(
typename UILList<LListBase, T>::const_iterator iter =
lst.begin();
iter != lst.end();
++iter
)
{
append(iter().clone(cloneArg).ptr());
}
}
#else
;
#endif
ILList(const ILList<LListBase, T>& lst, const CloneArg& cloneArg);
//- Construct from Istream using given Istream constructor class
template<class INew>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -200,7 +200,7 @@ public:
inline PackedBoolList& operator=(const PackedList<1>&);
//- Assignment operator.
PackedBoolList& operator=(const UList<bool>&);
PackedBoolList& operator=(const Foam::UList<bool>&);
//- Assignment operator,
// using the labels as indices to indicate which bits are set

View File

@ -99,14 +99,6 @@ public: \
#define defineTypeName(Type) \
defineTypeNameWithName(Type, Type::typeName_())
#ifdef __INTEL_COMPILER
//- Define the typeName as \a Name for template classes
# define defineTemplateTypeNameWithName(Type, Name) \
defineTypeNameWithName(Type, Name)
//- Define the typeName as \a Name for template sub-classes
# define defineTemplate2TypeNameWithName(Type, Name) \
defineTypeNameWithName(Type, Name)
#else
//- Define the typeName as \a Name for template classes
# define defineTemplateTypeNameWithName(Type, Name) \
template<> \
@ -115,7 +107,6 @@ public: \
# define defineTemplate2TypeNameWithName(Type, Name) \
template<> \
defineTypeNameWithName(Type, Name)
#endif
//- Define the typeName for template classes, useful with typedefs
#define defineTemplateTypeName(Type) \

View File

@ -158,7 +158,7 @@ DimensionedField<Type, GeoMesh>::DimensionedField
{}
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
template<class Type, class GeoMesh>
DimensionedField<Type, GeoMesh>::DimensionedField
(
@ -251,7 +251,7 @@ DimensionedField<Type, GeoMesh>::DimensionedField
{}
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
template<class Type, class GeoMesh>
DimensionedField<Type, GeoMesh>::DimensionedField
(

View File

@ -169,7 +169,7 @@ public:
);
//- Construct as copy of tmp<DimensionedField> deleting argument
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
DimensionedField
(
const tmp<DimensionedField<Type, GeoMesh> >&
@ -214,7 +214,7 @@ public:
);
//- Construct as copy resetting name
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
DimensionedField
(
const word& newName,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -168,7 +168,7 @@ FieldField<Field, Type>::FieldField(const PtrList<Field<Type> >& tl)
// Construct as copy of tmp<FieldField>
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
template<template<class> class Field, class Type>
FieldField<Field, Type>::FieldField(const tmp<FieldField<Field, Type> >& tf)
:
@ -197,7 +197,6 @@ tmp<FieldField<Field, Type> > FieldField<Field, Type>::clone() const
}
#ifndef __INTEL_COMPILER
template<template<class> class Field, class Type>
template<class Type2>
tmp<FieldField<Field, Type> > FieldField<Field, Type>::NewCalculatedType
@ -217,7 +216,6 @@ tmp<FieldField<Field, Type> > FieldField<Field, Type>::NewCalculatedType
return tmp<FieldField<Field, Type> >(nffPtr);
}
#endif
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,7 +108,7 @@ public:
FieldField(const PtrList<Field<Type> >&);
//- Construct as copy of tmp<FieldField>
# ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
FieldField(const tmp<FieldField<Field, Type> >&);
#endif
@ -124,24 +124,8 @@ public:
static tmp<FieldField<Field, Type> > NewCalculatedType
(
const FieldField<Field, Type2>& ff
)
# ifdef __INTEL_COMPILER
{
FieldField<Field, Type>* nffPtr
(
new FieldField<Field, Type>(ff.size())
);
forAll(*nffPtr, i)
{
nffPtr->set(i, Field<Type>::NewCalculatedType(ff[i]).ptr());
}
return tmp<FieldField<Field, Type> >(nffPtr);
}
# else
;
# endif
// Member functions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -614,10 +614,8 @@ BINARY_TYPE_FUNCTION(Type, Type, Type, cmptDivide)
UNARY_OPERATOR(Type, Type, -, negate)
#ifndef __INTEL_COMPILER
BINARY_OPERATOR(Type, Type, scalar, *, multiply)
BINARY_OPERATOR(Type, scalar, Type, *, multiply)
#endif
BINARY_OPERATOR(Type, Type, scalar, /, divide)
BINARY_TYPE_OPERATOR_SF(Type, scalar, Type, *, multiply)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -253,10 +253,8 @@ BINARY_TYPE_FUNCTION(Type, Type, Type, cmptDivide)
UNARY_OPERATOR(Type, Type, -, negate)
#ifndef __INTEL_COMPILER
BINARY_OPERATOR(Type, Type, scalar, *, multiply)
BINARY_OPERATOR(Type, scalar, Type, *, multiply)
#endif
BINARY_OPERATOR(Type, Type, scalar, /, divide)
BINARY_TYPE_OPERATOR_SF(Type, scalar, Type, *, multiply)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -222,15 +222,6 @@ Foam::Field<Type>::Field(const Xfer<Field<Type> >& f)
{}
#ifdef __INTEL_COMPILER
template<class Type>
Foam::Field<Type>::Field(const typename Field<Type>::subField& sf)
:
List<Type>(sf)
{}
#endif
template<class Type>
Foam::Field<Type>::Field(const UList<Type>& list)
:
@ -239,7 +230,7 @@ Foam::Field<Type>::Field(const UList<Type>& list)
// Construct as copy of tmp<Field>
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
template<class Type>
Foam::Field<Type>::Field(const tmp<Field<Type> >& tf)
:

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -210,13 +210,8 @@ public:
//- Construct by transferring the Field contents
Field(const Xfer<Field<Type> >&);
#ifdef __INTEL_COMPILER
//- Construct as copy of subField
Field(const typename Field<Type>::subField&);
#endif
//- Construct as copy of tmp<Field>
# ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
Field(const tmp<Field<Type> >&);
#endif

View File

@ -426,7 +426,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
}
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
template<class Type, template<class> class PatchField, class GeoMesh>
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
(
@ -488,7 +488,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
}
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
template<class Type, template<class> class PatchField, class GeoMesh>
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
(
@ -552,7 +552,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
}
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
template<class Type, template<class> class PatchField, class GeoMesh>
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
(

View File

@ -355,7 +355,7 @@ public:
);
//- Construct as copy of tmp<GeometricField> deleting argument
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
GeometricField
(
const tmp<GeometricField<Type, PatchField, GeoMesh> >&
@ -370,7 +370,7 @@ public:
);
//- Construct as copy of tmp<GeometricField> resetting IO parameters
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
GeometricField
(
const IOobject&,
@ -386,7 +386,7 @@ public:
);
//- Construct as copy resetting name
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
GeometricField
(
const word& newName,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -557,10 +557,8 @@ BINARY_TYPE_FUNCTION(Type, Type, Type, cmptDivide)
UNARY_OPERATOR(Type, Type, -, negate, transform)
#ifndef __INTEL_COMPILER
BINARY_OPERATOR(Type, Type, scalar, *, '*', multiply)
BINARY_OPERATOR(Type, scalar, Type, *, '*', multiply)
#endif
BINARY_OPERATOR(Type, Type, scalar, /, '|', divide)
BINARY_TYPE_OPERATOR_SF(Type, scalar, Type, *, '*', multiply)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -250,10 +250,8 @@ BINARY_TYPE_FUNCTION(Type, Type, Type, cmptDivide)
UNARY_OPERATOR(Type, Type, -, negate, transform)
#ifndef __INTEL_COMPILER
BINARY_OPERATOR(Type, Type, scalar, *, '*', multiply)
BINARY_OPERATOR(Type, scalar, Type, *, '*', multiply)
#endif
BINARY_OPERATOR(Type, Type, scalar, /, '|', divide)
BINARY_TYPE_OPERATOR_SF(Type, scalar, Type, *, '*', multiply)

View File

@ -114,14 +114,6 @@ public:
defineDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch); \
registerDebugSwitchWithName(Type, Type, Type::typeName_())
#ifdef __INTEL_COMPILER
//- Define the debug information for templates, lookup as \a Name
# define defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch) \
defineDebugSwitchWithName(Type, Name, DebugSwitch)
//- Define the debug information for templates sub-classes, lookup as \a Name
# define defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch) \
defineDebugSwitchWithName(Type, Name, DebugSwitch)
#else
//- Define the debug information for templates, lookup as \a Name
# define defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch) \
template<> \
@ -132,7 +124,6 @@ public:
template<> \
defineDebugSwitchWithName(Type, Name, DebugSwitch); \
registerTemplateDebugSwitchWithName(Type, Name)
#endif
//- Define the debug information for templates
// Useful with typedefs

View File

@ -38,10 +38,6 @@ SourceFiles
#include "refCount.H"
#include <cstddef>
#ifndef __INTEL_COMPILER
# define ConstructFromTmp
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -150,9 +150,8 @@ public:
}
// Destructor
~processorCyclicFvPatchField();
//- Destructor
virtual ~processorCyclicFvPatchField();
// Member functions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -131,7 +131,7 @@ public:
//- Destructor
~processorFvsPatchField();
virtual ~processorFvsPatchField();
// Member functions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -131,9 +131,8 @@ public:
}
// Destructor
~processorCyclicFvsPatchField();
//- Destructor
virtual ~processorCyclicFvsPatchField();
// Member functions

View File

@ -356,7 +356,7 @@ Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm)
}
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
template<class Type>
Foam::fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type> >& tfvm)
:

View File

@ -263,7 +263,7 @@ public:
fvMatrix(const fvMatrix<Type>&);
//- Construct as copy of tmp<fvMatrix<Type> > deleting argument
#ifdef ConstructFromTmp
#ifndef NoConstructFromTmp
fvMatrix(const tmp<fvMatrix<Type> >&);
#endif

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,7 +64,7 @@ public:
// Constructors
//- Construct from uncompacted face stencil
explicit upwindCECCellToFaceStencilObject
upwindCECCellToFaceStencilObject
(
const fvMesh& mesh,
const bool pureUpwind,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,7 +64,7 @@ public:
// Constructors
//- Construct from uncompacted face stencil
explicit upwindCFCCellToFaceStencilObject
upwindCFCCellToFaceStencilObject
(
const fvMesh& mesh,
const bool pureUpwind,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,7 +64,7 @@ public:
// Constructors
//- Construct from uncompacted face stencil
explicit upwindFECCellToFaceStencilObject
upwindFECCellToFaceStencilObject
(
const fvMesh& mesh,
const bool pureUpwind,

View File

@ -1,6 +1,7 @@
SUFFIXES += .C
c++WARN = -wd327,525,654,819,1125,1476,1505,1572
c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
-diag-disable 2304
CC = icpc -std=c++0x -fp-trap=common -fp-model precise

View File

@ -1,6 +1,7 @@
SUFFIXES += .C
c++WARN = -wd327,525,654,819,1125,1476,1505,1572
c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
-diag-disable 2304
CC = icpc

View File

@ -1,6 +1,7 @@
SUFFIXES += .C
c++WARN = -wd327,525,654,819,1125,1476,1505,1572
c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
-diag-disable 2304
CC = icpc -std=c++0x -fp-trap=common -fp-model precise