Commit 0bb012d0 authored by henry's avatar henry
Browse files

Corrected handling of loop macros and removed those for PtrList.

parent 03dc1554
......@@ -31,8 +31,6 @@ Description
#ifndef ListLoop_H
#define ListLoop_H
#include "undefListLoopM.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef vectorMachine
......@@ -48,8 +46,11 @@ Description
#define List_ELEM(f, fp, i) (fp[i])
#define List_ACCESS(type, f, fp) type* __restrict__ fp = (f).begin()
#define List_CONST_ACCESS(type, f, fp) const type* __restrict__ fp = (f).begin()
#define List_ACCESS(type, f, fp) \
type* const __restrict__ fp = (f).begin()
#define List_CONST_ACCESS(type, f, fp) \
const type* const __restrict__ fp = (f).begin()
#else
......@@ -64,8 +65,11 @@ Description
#define List_ELEM(f, fp, i) (*fp++)
#define List_ACCESS(type, f, fp) register type* __restrict__ fp = (f).begin()
#define List_CONST_ACCESS(type, f, fp) register const type* __restrict__ fp = (f).begin()
#define List_ACCESS(type, f, fp) \
register type* __restrict__ fp = (f).begin()
#define List_CONST_ACCESS(type, f, fp) \
register const type* __restrict__ fp = (f).begin()
#endif
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM 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 General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
A List\<Type\> is a 1D array of objects of type 'Type',
where the size of the array is known and used for subscript
bounds checking, etc.
\*---------------------------------------------------------------------------*/
#ifdef List_FOR_ALL
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#undef List_FOR_ALL
#undef List_END_FOR_ALL
#undef List_ELEM
#undef List_ACCESS
#undef List_CONST_ACCESS
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
......@@ -27,7 +27,6 @@ License
#include "error.H"
#include "PtrList.H"
#include "PtrListLoopM.H"
#include "SLPtrList.H"
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM 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 General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
simple generic PtrList MACROS for looping
\*---------------------------------------------------------------------------*/
#ifndef PtrListLoop_H
#define PtrListLoop_H
#include "undefListLoopM.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Element access looping using [] for vector and parallel machines
#define List_FOR_ALL(f, i) \
forAll(f, i) \
{ \
#define List_END_FOR_ALL }
#define List_ELEM(f, fp, i) ((f)[i])
#define List_ACCESS(type, f, fp)
#define List_CONST_ACCESS(type, f, fp)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
......@@ -27,7 +27,6 @@ License
#include "error.H"
#include "UPtrList.H"
#include "PtrListLoopM.H"
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
......
......@@ -50,7 +50,7 @@ void transform
{
TFOR_ALL_F_OP_FUNC_F_F
(
Type, rtf, =, transform, tensor, trf, Type, tf
Type, rtf, =, transform, symmTensor, trf, Type, tf
)
}
}
......
c++DBUG =
c++DBUG =
c++OPT = -O3
#c++OPT = -march=nocona -O3
# -ftree-vectorize -ftree-vectorizer-verbose=3
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