Skip to content

Commit fafec19

Browse files
Merge pull request ComputationalRadiationPhysics#885 from BenjaminW3/refactorPMacc
Further refactor libPMacc
2 parents d49c404 + 43c7794 commit fafec19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+201
-394
lines changed

src/libPMacc/include/algorithms/ForEach.hpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013-2014 Axel Huebl, Heiko Burau, Rene Widera
2+
* Copyright 2013-2015 Axel Huebl, Heiko Burau, Rene Widera, Benjamin Worpitz
33
*
44
* This file is part of libPMacc.
55
*
@@ -24,14 +24,7 @@
2424
#pragma once
2525

2626
#include "compileTime/accessors/Identity.hpp"
27-
28-
#include <boost/mpl/begin_end.hpp>
29-
#include <boost/mpl/next_prior.hpp>
30-
#include <boost/mpl/deref.hpp>
31-
#include <boost/mpl/bind.hpp>
32-
#include <boost/type_traits.hpp>
33-
34-
#include <boost/mpl/if.hpp>
27+
#include "forward.hpp"
3528

3629
#include <boost/preprocessor/repetition/enum.hpp>
3730
#include <boost/preprocessor/repetition/enum_params.hpp>
@@ -46,7 +39,12 @@
4639
#include <boost/preprocessor/repetition/enum_trailing.hpp>
4740
#include <boost/mpl/apply.hpp>
4841
#include <boost/mpl/transform.hpp>
49-
#include "forward.hpp"
42+
#include <boost/mpl/if.hpp>
43+
#include <boost/mpl/begin_end.hpp>
44+
#include <boost/mpl/next_prior.hpp>
45+
#include <boost/mpl/deref.hpp>
46+
#include <boost/mpl/bind.hpp>
47+
#include <boost/type_traits.hpp>
5048

5149

5250
/* Help to read this file:

src/libPMacc/include/communication/ICommunicator.hpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013 Rene Widera, Wolfgang Hoenig
2+
* Copyright 2013, 2015 Rene Widera, Wolfgang Hoenig, Benjamin Worpitz
33
*
44
* This file is part of libPMacc.
55
*
@@ -20,14 +20,12 @@
2020
* If not, see <http://www.gnu.org/licenses/>.
2121
*/
2222

23+
#pragma once
2324

24-
#ifndef _ICOMMUNICATOR_HPP
25-
#define _ICOMMUNICATOR_HPP
25+
#include "types.h"
2626

2727
#include <mpi.h>
2828

29-
#include "types.h"
30-
3129
namespace PMacc
3230
{
3331

@@ -82,7 +80,3 @@ class ICommunicator
8280
};
8381

8482
} //namespace PMacc
85-
86-
87-
#endif /* _ICOMMUNICATOR_HPP */
88-

src/libPMacc/include/compileTime/AllCombinations.hpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2014 Rene Widera
2+
* Copyright 2014-2015 Rene Widera, Benjamin Worpitz
33
*
44
* This file is part of libPMacc.
55
*
@@ -22,22 +22,19 @@
2222

2323
#pragma once
2424

25-
#include "types.h"
2625
#include "compileTime/conversion/SeqToMap.hpp"
2726
#include "compileTime/conversion/TypeToAliasPair.hpp"
2827
#include "compileTime/conversion/TypeToPair.hpp"
2928
#include "compileTime/conversion/MakeSeqFromNestedSeq.hpp"
3029
#include "compileTime/conversion/MakeSeq.hpp"
30+
#include "math/Vector.hpp"
31+
#include "types.h"
32+
3133
#include <boost/mpl/at.hpp>
3234
#include <boost/mpl/copy.hpp>
33-
34-
#include <boost/mpl/assert.hpp>
3535
#include <boost/mpl/pop_back.hpp>
36-
#include <boost/static_assert.hpp>
3736
#include <boost/type_traits/is_same.hpp>
3837

39-
#include "math/Vector.hpp"
40-
4138
namespace PMacc
4239
{
4340
namespace bmpl = boost::mpl;

src/libPMacc/include/compileTime/GetKeyFromAlias.hpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013 Rene Widera
2+
* Copyright 2013, 2015 Rene Widera, Benjamin Worpitz
33
*
44
* This file is part of libPMacc.
55
*
@@ -22,22 +22,19 @@
2222

2323
#pragma once
2424

25-
#include "types.h"
2625
#include "compileTime/conversion/SeqToMap.hpp"
2726
#include "compileTime/conversion/TypeToAliasPair.hpp"
2827
#include "compileTime/conversion/TypeToPair.hpp"
28+
#include "static_assert.hpp"
29+
#include "types.h"
30+
2931
#include <boost/mpl/at.hpp>
3032
#include <boost/mpl/copy.hpp>
31-
32-
#include <boost/mpl/assert.hpp>
33-
#include <boost/static_assert.hpp>
3433
#include <boost/type_traits/is_same.hpp>
3534

3635
namespace PMacc
3736
{
3837

39-
40-
4138
template<typename T_MPLSeq,
4239
typename T_Key
4340
>

src/libPMacc/include/cuSTL/algorithm/kernel/detail/SphericMapper.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013 Heiko Burau, Rene Widera
2+
* Copyright 2013-2015 Heiko Burau, Rene Widera, Benjamin Worpitz
33
*
44
* This file is part of libPMacc.
55
*
@@ -20,11 +20,11 @@
2020
* If not, see <http://www.gnu.org/licenses/>.
2121
*/
2222

23-
#ifndef ALGORITHM_KERNEL_DETAIL_SPHERICMAPPER_HPP
24-
#define ALGORITHM_KERNEL_DETAIL_SPHERICMAPPER_HPP
23+
#pragma once
2524

26-
#include "types.h"
2725
#include "math/vector/Size_t.hpp"
26+
#include "types.h"
27+
2828
#include <boost/mpl/void.hpp>
2929

3030
namespace PMacc
@@ -216,5 +216,3 @@ struct SphericMapper<3, mpl::void_>
216216
} // kernel
217217
} // algorithm
218218
} // PMacc
219-
220-
#endif // ALGORITHM_KERNEL_DETAIL_SPHERICMAPPER_HPP

src/libPMacc/include/cuSTL/algorithm/mpi/Gather.tpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013, 2015 Heiko Burau
2+
* Copyright 2013, 2015 Heiko Burau, Benjamin Worpitz
33
*
44
* This file is part of libPMacc.
55
*
@@ -21,23 +21,24 @@
2121
*/
2222

2323
#include "mappings/simulation/GridController.hpp"
24-
#include <iostream>
2524
#include "cuSTL/container/copier/Memcopy.hpp"
2625
#include "communication/manager_common.h"
2726

27+
#include <iostream>
28+
2829
namespace PMacc
2930
{
3031
namespace algorithm
3132
{
3233
namespace mpi
3334
{
34-
35+
3536
namespace GatherHelper
3637
{
37-
38+
3839
/** @tparam dim dimension of mpi cluster
3940
* @tparam memDim dimension of memory to be gathered
40-
*
41+
*
4142
* if memDim == dim - 1 then ``dir`` indicates the direction (orientation)
4243
* of the (meta)plane.
4344
*/

src/libPMacc/include/cuSTL/container/compile-time/SharedBuffer.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013 Heiko Burau, Rene Widera
2+
* Copyright 2013, 2015 Heiko Burau, Rene Widera, Benjamin Worpitz
33
*
44
* This file is part of libPMacc.
55
*
@@ -20,8 +20,7 @@
2020
* If not, see <http://www.gnu.org/licenses/>.
2121
*/
2222

23-
#ifndef CONTAINER_CT_SHAREDBUFFER_HPP
24-
#define CONTAINER_CT_SHAREDBUFFER_HPP
23+
#pragma once
2524

2625
#include "CartBuffer.hpp"
2726
#include "../allocator/compile-time/SharedMemAllocator.hpp"
@@ -46,5 +45,3 @@ struct SharedBuffer
4645
} // CT
4746
} // container
4847
} // PMacc
49-
50-
#endif // CONTAINER_CT_SHAREDBUFFER_HPP

src/libPMacc/include/cuSTL/container/copier/D2DCopier.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013 Heiko Burau, Rene Widera
2+
* Copyright 2013, 2015 Heiko Burau, Rene Widera, Benjamin Worpitz
33
*
44
* This file is part of libPMacc.
55
*
@@ -20,8 +20,7 @@
2020
* If not, see <http://www.gnu.org/licenses/>.
2121
*/
2222

23-
#ifndef COPIER_D2DCOPIER_HPP
24-
#define COPIER_D2DCOPIER_HPP
23+
#pragma once
2524

2625
#include "Memcopy.hpp"
2726
#include <types.h>
@@ -47,5 +46,3 @@ struct D2DCopier
4746

4847
} // copier
4948
} // PMacc
50-
51-
#endif // COPIER_D2DCOPIER_HPP

src/libPMacc/include/cuSTL/container/copier/H2HCopier.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013 Heiko Burau, Rene Widera
2+
* Copyright 2013, 2015 Heiko Burau, Rene Widera, Benjamin Worpitz
33
*
44
* This file is part of libPMacc.
55
*
@@ -20,8 +20,7 @@
2020
* If not, see <http://www.gnu.org/licenses/>.
2121
*/
2222

23-
#ifndef COPIER_H2HCOPIER_HPP
24-
#define COPIER_H2HCOPIER_HPP
23+
#pragma once
2524

2625
#include "Memcopy.hpp"
2726
#include <types.h>
@@ -47,5 +46,3 @@ struct H2HCopier
4746

4847
} // copier
4948
} // PMacc
50-
51-
#endif // COPIER_H2HCOPIER_HPP

src/libPMacc/include/cuSTL/container/copier/Memcopy.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013 Heiko Burau, Rene Widera
2+
* Copyright 2013, 2015 Heiko Burau, Rene Widera, Benjamin Worpitz
33
*
44
* This file is part of libPMacc.
55
*
@@ -20,8 +20,7 @@
2020
* If not, see <http://www.gnu.org/licenses/>.
2121
*/
2222

23-
#ifndef CUDAWRAPPERMEMCOPY_HPP
24-
#define CUDAWRAPPERMEMCOPY_HPP
23+
#pragma once
2524

2625
#include "math/vector/Size_t.hpp"
2726
#include <types.h>
@@ -105,5 +104,3 @@ struct Memcopy<3>
105104

106105
} // cudaWrapper
107106
} // PMacc
108-
109-
#endif //CUDAWRAPPERMEMCOPY_HPP

0 commit comments

Comments
 (0)