Skip to content

Commit

Permalink
Refactor .h files to .hpp files
Browse files Browse the repository at this point in the history
Refactors all left-over `.h` files and fixes cuSTL include orders
on the way.
  • Loading branch information
Tools authored and ax3l committed Jan 24, 2017
1 parent 5c81f21 commit d32a3fd
Show file tree
Hide file tree
Showing 33 changed files with 88 additions and 50 deletions.
2 changes: 1 addition & 1 deletion src/libPMacc/examples/gameOfLife2D/main.cu
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "Simulation.hpp"

#include <mpi.h>
#include "communication/manager_common.h"
#include "communication/manager_common.hpp"

namespace po = boost::program_options;

Expand Down
2 changes: 1 addition & 1 deletion src/libPMacc/include/communication/CommunicatorMPI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#pragma once

#include "communication/ICommunicator.hpp"
#include "communication/manager_common.h"
#include "communication/manager_common.hpp"
#include "dimensions/DataSpace.hpp"
#include "memory/dataTypes/Mask.hpp"
#include "pmacc_types.hpp"
Expand Down
6 changes: 4 additions & 2 deletions src/libPMacc/include/cuSTL/algorithm/mpi/Gather.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@

#pragma once

#include "mappings/simulation/GridController.hpp"
#include "cuSTL/container/copier/Memcopy.hpp"
#include "communication/manager_common.h"

#include "mappings/simulation/GridController.hpp"
#include "communication/manager_common.hpp"

#include <iostream>
#include <numeric> // std::partial_sum
#include <algorithm> // std::copy


namespace PMacc
{
namespace algorithm
Expand Down
9 changes: 6 additions & 3 deletions src/libPMacc/include/cuSTL/algorithm/mpi/Reduce.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@

#pragma once

#include "cuSTL/container/copier/Memcopy.hpp"

#include "lambda/make_Functor.hpp"
#include "mappings/simulation/GridController.hpp"
#include "communication/manager_common.hpp"

#include <iostream>
#include <utility>
#include <algorithm>
#include "cuSTL/container/copier/Memcopy.hpp"
#include "lambda/make_Functor.hpp"
#include "communication/manager_common.h"


namespace PMacc
{
Expand Down
5 changes: 4 additions & 1 deletion src/libPMacc/include/cuSTL/container/CartBuffer.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@

#pragma once

#include "cuSTL/container/allocator/tag.h"
#include "cuSTL/container/allocator/tag.hpp"

#include "eventSystem/EventSystem.hpp"
#include "Environment.hpp"

#include <iostream>
#include <exception>
#include <sstream>


namespace PMacc
{
namespace container
Expand Down
4 changes: 3 additions & 1 deletion src/libPMacc/include/cuSTL/container/DeviceBuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,18 @@
#include "cuSTL/container/copier/D2DCopier.hpp"
#include "cuSTL/container/assigner/DeviceMemAssigner.hpp"
#include "cuSTL/container/CartBuffer.hpp"
#include "cuSTL/container/allocator/tag.h"
#include "cuSTL/container/allocator/tag.hpp"
#include "cuSTL/container/copier/Memcopy.hpp"

#include <boost/assert.hpp>
#include <boost/move/move.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>

#include <exception>
#include <sstream>


namespace PMacc
{
namespace container
Expand Down
4 changes: 3 additions & 1 deletion src/libPMacc/include/cuSTL/container/HostBuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@
#include "cuSTL/container/copier/H2HCopier.hpp"
#include "cuSTL/container/assigner/HostMemAssigner.hpp"
#include "cuSTL/container/CartBuffer.hpp"
#include "cuSTL/container/allocator/tag.h"
#include "cuSTL/container/allocator/tag.hpp"
#include "cuSTL/container/copier/Memcopy.hpp"

#include <boost/assert.hpp>
#include <boost/move/move.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>

#include <exception>
#include <sstream>


namespace PMacc
{
namespace container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@

#pragma once

#include "math/vector/Size_t.hpp"
#include "tag.hpp"
#include "cuSTL/cursor/BufferCursor.hpp"
#include "tag.h"

#include "math/vector/Size_t.hpp"


namespace PMacc
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@

#pragma once

#include "math/vector/Size_t.hpp"
#include "tag.hpp"
#include "cuSTL/cursor/BufferCursor.hpp"
#include "tag.h"

#include "math/vector/Size_t.hpp"


namespace PMacc
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@

#pragma once

#include "tag.h"
#include "tag.hpp"

#include "pmacc_types.hpp"


namespace PMacc
{
namespace allocator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@

#pragma once

#include <stdint.h>
#include "math/vector/Size_t.hpp"
#include "tag.hpp"
#include "cuSTL/cursor/BufferCursor.hpp"
#include "tag.h"

#include "math/vector/Size_t.hpp"

#include <stdint.h>


namespace PMacc
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
#pragma once

#include "cuSTL/algorithm/host/Foreach.hpp"
#include "lambda/placeholder.h"
#include "lambda/placeholder.hpp"

#include <boost/mpl/placeholders.hpp>
#include <boost/mpl/int.hpp>

#include <stdint.h>


namespace PMacc
{
namespace assigner
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@

#pragma once

#include "tag.hpp"
#include "CartNavigator.hpp"
#include "cuSTL/cursor/traits.hpp"

#include "math/Vector.hpp"
#include "tag.h"

#include <boost/type_traits/remove_pointer.hpp>
#include "CartNavigator.hpp"
#include <cuSTL/cursor/traits.hpp>


namespace PMacc
{
Expand Down
8 changes: 5 additions & 3 deletions src/libPMacc/include/cuSTL/cursor/navigator/CartNavigator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@

#pragma once

#include <math/vector/Int.hpp>
#include "tag.h"
#include <cuSTL/cursor/traits.hpp>
#include "tag.hpp"
#include "math/vector/Int.hpp"

#include "cuSTL/cursor/traits.hpp"


namespace PMacc
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@

#pragma once

#include "tag.hpp"
#include "math/vector/Int.hpp"
#include "tag.h"
#include <cuSTL/cursor/traits.hpp>
#include "cuSTL/cursor/traits.hpp"


namespace PMacc
{
Expand Down
2 changes: 1 addition & 1 deletion src/libPMacc/include/eventSystem/tasks/TaskReceiveMPI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#pragma once

#include "communication/manager_common.h"
#include "communication/manager_common.hpp"
#include "communication/ICommunicator.hpp"
#include "eventSystem/tasks/MPITask.hpp"
#include "memory/buffers/Exchange.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/libPMacc/include/eventSystem/tasks/TaskSendMPI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#pragma once

#include "communication/manager_common.h"
#include "communication/manager_common.hpp"
#include "communication/ICommunicator.hpp"
#include "eventSystem/tasks/MPITask.hpp"
#include "memory/buffers/Exchange.hpp"
Expand Down
11 changes: 7 additions & 4 deletions src/libPMacc/include/lambda/CT/Eval.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,20 @@

#define BOOST_BIND_NO_PLACEHOLDERS


#include "Expression.hpp"
#include "../placeholder.h"
#include "../ExprTypes.h"
#include "../placeholder.hpp"
#include "../ExprTypes.hpp"

#include "pmacc_types.hpp"
#include "math/Tuple.hpp"
#include "RefWrapper.hpp"

#include <boost/mpl/void.hpp>
#include <boost/mpl/int.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <math/Tuple.hpp>
#include "RefWrapper.hpp"


namespace mpl = boost::mpl;

Expand Down
10 changes: 6 additions & 4 deletions src/libPMacc/include/lambda/CT/TerminalTL.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@

#pragma once

#include "../ExprTypes.h"
#include "../placeholder.h"
#include "../ExprTypes.hpp"
#include "../placeholder.hpp"
#include "../Expression.hpp"
#include "lambda/ProxyClass.hpp"

#include <boost/mpl/vector.hpp>
#include <boost/mpl/copy.hpp>
#include <boost/mpl/front_inserter.hpp>
#include "../Expression.hpp"
#include <lambda/ProxyClass.hpp>


namespace mpl = boost::mpl;

Expand Down
File renamed without changes.
13 changes: 7 additions & 6 deletions src/libPMacc/include/lambda/Expression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
#pragma once

#include "pmacc_types.hpp"
#include "ExprTypes.h"
#include "placeholder.h"
#include "ExprTypes.hpp"
#include "placeholder.hpp"
#include "is_Expression.hpp"
#include "make_Expr.hpp"
#include "make_Expr.hpp"
#include "math/Tuple.hpp"

#include <boost/mpl/void.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/int.hpp>
#include "make_Expr.hpp"
#include <math/Tuple.hpp>

#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/preprocessor/repetition/repeat.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
Expand All @@ -45,9 +45,10 @@
#include <boost/preprocessor/cat.hpp>

#ifndef LAMBDA_MAX_PARAMS
# define LAMBDA_MAX_PARAMS 8
# define LAMBDA_MAX_PARAMS 8
#endif


namespace mpl = boost::mpl;

namespace PMacc
Expand Down
4 changes: 3 additions & 1 deletion src/libPMacc/include/lambda/make_Expr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
#pragma once

#include "is_Expression.hpp"
#include "ExprTypes.h"
#include "ExprTypes.hpp"
#include "pmacc_types.hpp"

#include <boost/mpl/vector.hpp>


namespace mpl = boost::mpl;

namespace PMacc
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/libPMacc/include/mpi/MPIReduce.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#pragma once

#include "communication/manager_common.h"
#include "communication/manager_common.hpp"

#include "mpi/reduceMethods/AllReduce.hpp"
#include "mpi/GetMPI_StructAsArray.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/libPMacc/include/mpi/reduceMethods/AllReduce.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "pmacc_types.hpp"
#include <mpi.h>
#include "communication/manager_common.h"
#include "communication/manager_common.hpp"

namespace PMacc
{
Expand Down
2 changes: 1 addition & 1 deletion src/libPMacc/include/mpi/reduceMethods/Reduce.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "pmacc_types.hpp"
#include <mpi.h>
#include "communication/manager_common.h"
#include "communication/manager_common.hpp"

namespace PMacc
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "traits/PICToSplash.hpp"

#include "plugins/PhaseSpace/AxisDescription.hpp"
#include "communication/manager_common.h"
#include "communication/manager_common.hpp"
#include "mappings/simulation/GridController.hpp"
#include "mappings/simulation/SubGrid.hpp"
#include "dimensions/DataSpace.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/picongpu/include/plugins/PhaseSpace/PhaseSpace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <mpi.h>

#include "simulation_defines.hpp"
#include "communication/manager_common.h"
#include "communication/manager_common.hpp"
#include "pluginSystem/INotify.hpp"
#include "cuSTL/container/DeviceBuffer.hpp"
#include "cuSTL/container/HostBuffer.hpp"
Expand Down
Loading

0 comments on commit d32a3fd

Please sign in to comment.